Golo Roden
Golo Roden

Reputation: 150614

Ubuntu 18.04.1 on VMware Fusion 11 results in kernel panic with Packer

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:

enter image description here

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:

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.

Upvotes: 3

Views: 1661

Answers (1)

Golo Roden
Golo Roden

Reputation: 150614

It seems that I found a solution (workaround?) for this problem: If you simply remove

noapic<wait>

from the boot command, everything works fine (and this is true for both, VMware as well as VirtualBox). I don't know whether it's the best solution, but at least this makes things work again 😊

Upvotes: 4

Related Questions