Skip to content

Commit b51b7d4

Browse files
committed
drop support for virtualbox
1 parent a2c08f8 commit b51b7d4

File tree

6 files changed

+8
-114
lines changed

6 files changed

+8
-114
lines changed

Makefile

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ VAR_FILE :=
55
VAR_FILE_OPTION := $(addprefix -var-file=,$(VAR_FILE))
66

77
help:
8-
@echo type make build-libvirt, make build-uefi-libvirt, make build-proxmox, make build-uefi-proxmox, make build-virtualbox, make build-hyperv, or make build-vsphere
8+
@echo type make build-libvirt, make build-uefi-libvirt, make build-proxmox, make build-uefi-proxmox, make build-hyperv, or make build-vsphere
99

1010
build-libvirt: proxmox-ve-amd64-libvirt.box
1111
build-uefi-libvirt: proxmox-ve-uefi-amd64-libvirt.box
1212
build-proxmox: proxmox-ve-amd64-proxmox.box
1313
build-uefi-proxmox: proxmox-ve-uefi-amd64-proxmox.box
14-
build-virtualbox: proxmox-ve-amd64-virtualbox.box
1514
build-hyperv: proxmox-ve-amd64-hyperv.box
1615
build-vsphere: proxmox-ve-amd64-vsphere.box
1716

@@ -73,20 +72,6 @@ proxmox-ve-uefi-amd64-proxmox.box: provisioners/*.sh proxmox-ve.pkr.hcl Vagrantf
7372
PKR_VAR_vagrant_box=$@ \
7473
packer build -only=proxmox-iso.proxmox-ve-uefi-amd64 -on-error=abort -timestamp-ui $(VAR_FILE_OPTION) proxmox-ve.pkr.hcl
7574

76-
proxmox-ve-amd64-virtualbox.box: provisioners/*.sh proxmox-ve.pkr.hcl Vagrantfile.template $(VAR_FILE)
77-
rm -f $@
78-
CHECKPOINT_DISABLE=1 \
79-
PACKER_LOG=1 \
80-
PACKER_LOG_PATH=$@.init.log \
81-
packer init proxmox-ve.pkr.hcl
82-
PACKER_OUTPUT_BASE_DIR=$${PACKER_OUTPUT_BASE_DIR:-.} \
83-
CHECKPOINT_DISABLE=1 \
84-
PACKER_LOG=1 \
85-
PACKER_LOG_PATH=$@.log \
86-
PKR_VAR_vagrant_box=$@ \
87-
packer build -only=virtualbox-iso.proxmox-ve-amd64 -on-error=abort -timestamp-ui $(VAR_FILE_OPTION) proxmox-ve.pkr.hcl
88-
@./box-metadata.sh virtualbox proxmox-ve-amd64 $@
89-
9075
proxmox-ve-amd64-hyperv.box: provisioners/*.sh proxmox-ve.pkr.hcl Vagrantfile.template $(VAR_FILE)
9176
rm -f $@
9277
mkdir -p tmp
@@ -124,4 +109,4 @@ proxmox-ve-amd64-vsphere.box: provisioners/*.sh proxmox-ve-vsphere.pkr.hcl $(VAR
124109
clean:
125110
rm -rf packer_cache $${PACKER_OUTPUT_BASE_DIR:-.}/output-proxmox-ve*
126111

127-
.PHONY: help build-libvirt build-virtualbox build-hyperv clean
112+
.PHONY: help build-libvirt build-uefi-libvirt build-proxmox build-uefi-proxmox build-hyperv build-vsphere clean

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ After the example vagrant environment is started, you can access the [Proxmox We
1212

1313
For a cluster example see [rgl/proxmox-ve-cluster-vagrant](https://github.com/rgl/proxmox-ve-cluster-vagrant).
1414

15-
## libvirt/VirtualBox
15+
## libvirt
1616

1717
Create the base box:
1818

1919
```bash
20-
make build-libvirt # or build-virtualbox
20+
make build-libvirt
2121
```
2222

2323
Add the base box as suggested in make output:
2424

2525
```bash
26-
vagrant box add -f proxmox-ve-amd64 proxmox-ve-amd64-libvirt.box # or proxmox-ve-amd64-virtualbox.box
26+
vagrant box add -f proxmox-ve-amd64 proxmox-ve-amd64-libvirt.box
2727
```
2828

2929
Start the example vagrant environment with:
3030

3131
```bash
3232
cd example
33-
vagrant up --no-destroy-on-error --provider=libvirt # or --provider=virtualbox
33+
vagrant up --no-destroy-on-error --provider=libvirt
3434
```
3535

3636
## Proxmox
@@ -211,7 +211,7 @@ tied to a specific Proxmox VE version. Also take care when you decide to overrid
211211
Create the base box:
212212

213213
```bash
214-
make build-libvirt VAR_FILE=example.pkrvars.hcl # or build-virtualbox or build-hyperv
214+
make build-libvirt VAR_FILE=example.pkrvars.hcl
215215
```
216216

217217
The following content of `example.pkrvars.hcl`:

Vagrantfile-uefi.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,4 @@ Vagrant.configure(2) do |config|
99
lv.channel :type => 'unix', :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio'
1010
lv.channel :type => 'spicevmc', :target_name => 'com.redhat.spice.0', :target_type => 'virtio'
1111
end
12-
config.vm.provider 'virtualbox' do |vb|
13-
vb.customize ['modifyvm', :id, '--firmware', 'efi']
14-
end
1512
end

example/Vagrantfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ Vagrant.configure('2') do |config|
1818
lv.machine_virtual_size = VM_ROOT_DISK_SIZE_GB
1919
config.vm.synced_folder '.', '/vagrant', type: 'nfs', nfs_version: '4.2', nfs_udp: false
2020
end
21-
config.vm.provider :virtualbox do |vb|
22-
vb.linked_clone = true
23-
vb.memory = VM_MEMORY_GB*1024
24-
vb.cpus = VM_CPU
25-
vb.customize ['modifyvm', :id, '--nested-hw-virt', 'on']
26-
end
2721
config.vm.provider :hyperv do |hv, config|
2822
hv.vmname = "#{File.basename(File.dirname(File.dirname(__FILE__)))}-example"
2923
hv.linked_clone = true

provisioners/provision.sh

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,7 @@ chown -R vagrant:vagrant .
3939
popd
4040

4141
# install the Guest Additions.
42-
if [ -n "$(lspci | grep VirtualBox)" ]; then
43-
# install the VirtualBox Guest Additions.
44-
# this will be installed at /opt/VBoxGuestAdditions-VERSION.
45-
# NB You can unpack the VBoxLinuxAdditions.run file contents with:
46-
# VBoxLinuxAdditions.run --target /tmp/VBoxLinuxAdditions.run.contents --noexec
47-
# NB REMOVE_INSTALLATION_DIR=0 is to fix a bug in VBoxLinuxAdditions.run.
48-
# See http://stackoverflow.com/a/25943638.
49-
apt-get -y -q install gcc dkms pve-headers
50-
mkdir -p /mnt
51-
mount /dev/sr1 /mnt
52-
while [ ! -f /mnt/VBoxLinuxAdditions.run ]; do sleep 1; done
53-
# NB we ignore exit code 2 (cannot find vboxguest module) because of what
54-
# seems to be a bug in VirtualBox 5.1.20. there isn't actually a problem
55-
# loading the module.
56-
REMOVE_INSTALLATION_DIR=0 /mnt/VBoxLinuxAdditions.run --target /tmp/VBoxGuestAdditions || [ $? -eq 2 ]
57-
rm -rf /tmp/VBoxGuestAdditions
58-
umount /mnt
59-
eject /dev/sr1
60-
elif [ -n "$(lspci | grep VMware | head -1)" ]; then
42+
if [ -n "$(lspci | grep VMware | head -1)" ]; then
6143
# install the VMware Guest Additions.
6244
# NB the open-vm-tools package was already installed from the packer boot_command.
6345
true

proxmox-ve.pkr.hcl

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ packer {
1010
version = "1.1.7"
1111
source = "github.com/hashicorp/proxmox"
1212
}
13-
# see https://github.com/hashicorp/packer-plugin-virtualbox
14-
virtualbox = {
15-
version = "1.0.5"
16-
source = "github.com/hashicorp/virtualbox"
17-
}
1813
# see https://github.com/hashicorp/packer-plugin-hyperv
1914
hyperv = {
2015
version = "1.1.3"
@@ -375,63 +370,6 @@ source "proxmox-iso" "proxmox-ve-uefi-amd64" {
375370
]
376371
}
377372

378-
source "virtualbox-iso" "proxmox-ve-amd64" {
379-
guest_os_type = "Debian_64"
380-
guest_additions_mode = "upload"
381-
headless = true
382-
http_directory = "."
383-
vboxmanage = [
384-
["modifyvm", "{{.Name}}", "--memory", var.memory],
385-
["modifyvm", "{{.Name}}", "--cpus", var.cpus],
386-
["modifyvm", "{{.Name}}", "--nested-hw-virt", "on"],
387-
["modifyvm", "{{.Name}}", "--vram", "16"],
388-
["modifyvm", "{{.Name}}", "--graphicscontroller", "vmsvga"],
389-
["modifyvm", "{{.Name}}", "--audio", "none"],
390-
["modifyvm", "{{.Name}}", "--nictype1", "82540EM"],
391-
["modifyvm", "{{.Name}}", "--nictype2", "82540EM"],
392-
["modifyvm", "{{.Name}}", "--nictype3", "82540EM"],
393-
["modifyvm", "{{.Name}}", "--nictype4", "82540EM"],
394-
]
395-
vboxmanage_post = [
396-
["storagectl", "{{.Name}}", "--name", "IDE Controller", "--remove"],
397-
]
398-
disk_size = var.disk_size
399-
hard_drive_interface = "sata"
400-
hard_drive_discard = true
401-
iso_url = var.iso_url
402-
iso_checksum = var.iso_checksum
403-
output_directory = "${var.output_base_dir}/output-{{build_name}}"
404-
ssh_username = "root"
405-
ssh_password = "vagrant"
406-
ssh_timeout = "60m"
407-
boot_wait = "5s"
408-
boot_command = [
409-
"<enter>",
410-
"<wait5m>",
411-
"<enter><wait>",
412-
"<enter><wait>",
413-
"${var.step_country}<tab><wait>",
414-
"${var.step_timezone}<tab><wait>",
415-
"${var.step_keyboard_layout}<tab><wait>",
416-
"<tab><wait>",
417-
"<enter><wait5>",
418-
"vagrant<tab><wait>",
419-
"vagrant<tab><wait>",
420-
"${var.step_email}<tab><wait>",
421-
"<tab><wait>",
422-
"<enter><wait5>",
423-
"${var.step_hostname}<tab><wait>",
424-
"<tab><wait>",
425-
"<tab><wait>",
426-
"<tab><wait>",
427-
"<tab><wait>",
428-
"<tab><wait>",
429-
"<enter><wait5>",
430-
"<enter><wait5>",
431-
]
432-
shutdown_command = "poweroff"
433-
}
434-
435373
source "hyperv-iso" "proxmox-ve-amd64" {
436374
temp_path = "tmp"
437375
headless = true
@@ -495,7 +433,6 @@ build {
495433
"source.qemu.proxmox-ve-uefi-amd64",
496434
"source.proxmox-iso.proxmox-ve-amd64",
497435
"source.proxmox-iso.proxmox-ve-uefi-amd64",
498-
"source.virtualbox-iso.proxmox-ve-amd64",
499436
"source.hyperv-iso.proxmox-ve-amd64",
500437
]
501438

@@ -512,7 +449,6 @@ build {
512449
only = [
513450
"qemu.proxmox-ve-amd64",
514451
"hyperv-iso.proxmox-ve-amd64",
515-
"virtualbox-iso.proxmox-ve-amd64",
516452
]
517453
output = var.vagrant_box
518454
vagrantfile_template = "Vagrantfile.template"

0 commit comments

Comments
 (0)