I am trying to create a VMware virtual machine using Packer, with Ubuntu Server 18.04.1 as guest OS. However, creation of the VM fails after having sent the boot command.
The specific error seems to be related to APIC, although the boot command contains noapic
. Also, setting acpi=off
does not change anything. See the following screenshot for the detailed error message:
The Packer configuration looks like this:
{
"type": "vmware-iso",
"vmx_data": {
"numvcpus": "2",
"memsize": "2048"
},
"http_directory" : "http",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debconf/frontend=noninteractive<wait>",
" debian-installer=en_US<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" locale=en_US<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname=vagrant<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
" -- <wait>",
"<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 10000,
"guest_os_type": "ubuntu-64",
"headless": false,
"iso_url": "http://cdimage.ubuntu.com/releases/18.04.1/release/ubuntu-18.04.1-server-amd64.iso",
"iso_checksum": "e8264fa4c417216f4304079bd94f895e",
"iso_checksum_type": "md5",
"ssh_username": "guest",
"ssh_password": "guest",
"ssh_timeout": "30m",
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
}
As said, booting the machine basically works, until Packer enters the boot command and presses <Enter>
. Then, a number of lines rush over the screen, until you get to the kernel panic message.
The specific machine configuration is:
- macOS Mojave 10.14.1
- VMware Fusion 11.0.2
- Packer 1.3.2
- Ubuntu 18.04.1
Any ideas of what might be the problem, and how to fix this?
PS: The exact same configuration works perfectly when using VirtualBox instead of VMware Fusion.