18.04: VM stalls at initramfs due to not finding the rootfs block device

Bug #1784241 reported by TJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vagrant-libvirt
New
Unknown
vagrant-libvirt (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ vagrant up tactyle
...
==> tactyle: Creating shared folders metadata...
==> tactyle: Starting domain.
==> tactyle: Waiting for domain to get an IP address...

And it stalls there.

Using Virtual Machine Manager GUI I was able to monitor what the vagrant-libvirt VM was doing and found it had dropped to the initramfs shell.

Using 'blkid' and also checking /sys/block/ and /dev/block/ revealed there were no storage devices (only loop device nodes).

Looking at the device config revealed the "Controller SCSI" was using the type "Hypervisor default" instead of "VirtIO SCSI". Changing that manually via Virtual Machine Manager and forcing a reboot solved the issue.

Currently vagrant-libvirt does not provide a way to set the device type. It seems that the QEMU default may have changed relatively recently to cause this.

The relevant differences in the libvirt domain XML are:

     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/var/lib/libvirt/images/tactyle_tactyle.img'/>
- <target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ <target dev='vda' bus='scsi'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='pci' index='0' model='pci-root'/>
- <controller type='scsi' index='0'>
+ <controller type='scsi' index='0' model='virtio-scsi'>
     </controller>

TJ (tj)
description: updated
Changed in vagrant-libvirt:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.