Ubuntu Core 18 running in VirtualBox


#1

I had a conversation yesterday with a user who was having issues running Ubuntu Core 18 inside of a VirtualBox VM running on Ubuntu 18.04. After some initial issues, I figured out how to configure the VirtualBox VM so that it would successfully run Ubuntu Core 18.
Below are the steps I took to make it work:

  1. Download the Ubuntu Core 18 Stable image from here: http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-amd64.img.xz
  2. I then unxz the image: unxz ubuntu-core-18-amd.img.xz
  3. I then use VBoxManage to convert the raw disk image to VDI: VBoxManage convertdd ubuntu-core-18-amd64.img core18.vdi
  4. I then created a new Virtual Machine, said it was Linux and Ubuntu 64-bit, and pointed the storage to the vdi image I created in the previous step.
  5. Before you start the VM, go to settings:
    a. Go to the system tab, and disable I/O APIC (clear the check)
    b. Adjust memory as necessary, but I left it at the default of 1GB
    c. Click on the Processor tab, and make sure there is no check in Enable PAE/NX
    d. Click on the Acceleration tab and verify Paravirtualization interface is default and Enable Nested Paging is checked.
    e. Click on the Storage Tab on the top and verify that the disk image is using the SATA controller.
  6. Apply the changes to settings and start the VM. It should start Ubuntu Core 18. When you get the prompt that says Press enter to continue. You are ready to go.

These instructions work with VirtualBox 6.0, I have not tested it with older versions.

  • Luke

#2

These instructions work with VirtualBox 6.0, I have not tested it with older versions.

I tested this using VirtualBox 5.0 on Ubuntu Desktop 18.04 with the above instructions, no issues at all. For ease of logging into the system after booting up if you’re not familiar, I recommend doing the following:

  1. Go to Machine->Settings->Network
  2. Switch “Attached to:” to “Bridged Adapter”
  3. The default network adapter name to attach to should be fine. Mine is my wireless adapter interface name “wlps0”.
  4. Click Ok to apply the settings, then ACPI shutdown the VM and start it again.
  5. ssh into your VM using ssh username@<your_ip> which is listed on the console once Ubuntu Core 18 finishes booting up.
  6. If you’d like to be able to log in from the VM console without needing to use ssh, create a local user via sudo adduser --extrausers <username>. Do an ACPI shutdown of the VM, start it again and you should be able to log in from the VM console.

#3

alternatively, to just enable the default user to be able to log in on console:

sudo passwd $USER

…while you are ssh’d into the VM.

and hit enter once on the console screen to make the login prompt appear (you can indeed also reboot)


#4

I realize this is an old issue, but I have no issues running Ubuntu Core 18 on VirtualBox 6.0.6 on Bionic without needing any of the tweaks outlined in the OP. Can someone mention the actual issues that were encountered? Is something subtly broken that I haven’t noticed?