0

I have a vanilla Arch linux VM with disk in qcow2 format. I recently upgraded it and it stopped working. Every time I run $ virsh start Arch I get:

Starting version 243.78-2-arch
ERROR: device 'UUID=<ID>' not found. Skipping fsck
mount: new_root: can't find UUID=<ID>.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off.
[rootfs ]#

I used a live CD and chrooted in it, I check fstab and my /dev/sda1 is being mounted to / with UUID as the same indicated in the error message. I re-ran grub-mkconfig and mkinitcpio, but the error message persisted.

I then tried to create a new VM and keep my drive with the command:

$ sudo virt-install -n archlinux --description "Arch installation because of failure of Arch VM" --os-type=archlinux --ram=1024 --vcpu=1 --disk path='/var/lib/libvirt/images/Arch.qcow2',bus=virtio --network bridge:virbr0 --check path_in_use=off --import

but it didn't work either. I finally decided to start this disk outside virsh, and to my surprise the command below started my VM just fine:

$ sudo qemu-system-x86_64 -drive file=/var/lib/libvirt/images/Arch.qcow2,format=qcow2 -m 1G

So, what in my virsh configuration could be causing the issue?

here is the dumpxml of this VM:

$ virsh dumpxml Arch
<domain type='kvm' id='20'>
  <name>Arch</name>
  <uuid>e8fa46c2-7b5e-42a5-87ae-f9eaccc13529</uuid>
  <description>Arch Linux</description>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-4.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/Arch.qcow2'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:7e:e5:69'/>
      <source bridge='virbr0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/8'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/8'>
      <source path='/dev/pts/8'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+65534:+992</label>
    <imagelabel>+65534:+992</imagelabel>
  </seclabel>
</domain>
  • Have you tried creating a new VM with *virt-manager*? I checked my xml file against yours (new VM under Mint 19.2 host) - besides the locations of the disk and the number of CPUs, nothing jumped out at me. – ajgringo619 Nov 18 '19 at 04:25
  • Thank you for suggesting that. I installed virt-manager and at first, when I tried to import the disk it complained about permissions. I followed [this](https://askubuntu.com/questions/722034/permission-error-in-virtual-machine-manager) and it stopped complaining. I thought it could work, but when I started the machine, the same thing happened. – Adriano_epifas Nov 18 '19 at 05:06
  • Did you run virsh as sudo? You just wrote `$ virsh start Arch` – Broco Nov 18 '19 at 10:41
  • I didn't run as wth sudo because I have `LIBVIRT_DEFAULT_URI` set to `"qemu:///system"`. And, just in case, I also ran with sudo. All to the same result – Adriano_epifas Nov 18 '19 at 23:24

0 Answers0