You are not logged in.

#1 2017-01-26 10:45:23

M4L
Member
Registered: 2014-01-29
Posts: 11

[SOLVED] KVM/QEMU Can no longer passthrough disks by-id

G'day guys

I've performed an update today and found I can no longer passthrough disks to the virtual machines using the source from /dev/disk/by-id/

Previously this worked in my defined virtual machine config:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/disk/by-id/ata-Samsung_SSD_840_PRO_Series_S12RNEACC63383B'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
</disk>

I get the following error now when I start up a virtual machine:

error: Failed to start domain WINDOWS-10
error: An error occurred, but the cause is unknown

This is an output from the log /var/log/libvirt/qemu/WINDOWS-10

libvirt:  error : libvirtd quit during handshake: Input/output error
2017-01-26 10:39:08.519+0000: shutting down, reason=failed

I can now only use this method and virtual machine appears to boot up fine:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sdb'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
</disk>

The problem with the second method is the generic name /dev/sdb which can change around and the virtual machine sometimes doesn't work after the host reboots and tries to allocate a different drive.

Let me know if I need to post any more information. Any ideas on what else I can try? I can still use the second method, just kinda gets annoying as i have to manually change the config to get my virtual machines started.

Cheers,

Edit: For anyone that needs a workaround, refer to abefar's suggestion of rolling back to the previous libvirt package.

Last edited by M4L (2017-01-27 09:07:15)

Offline

#2 2017-01-26 14:24:33

abefar
Member
Registered: 2010-04-28
Posts: 14

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

libvirt 3.0.0 does not support symlinked devices anymore, such as the ones in /dev/disk/by-id/. Hopefully this will get fixed in a future release.
Until then, the only solution is to downgrade to the previous version of libvirt: https://archive.archlinux.org/packages/ … pkg.tar.xz

Offline

#3 2017-01-27 09:05:25

M4L
Member
Registered: 2014-01-29
Posts: 11

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

Ah k, I'm getting it has something to do with this?

A downgrade to the previous verion of libvirt has fixed my issues.

Thanks so much abefar. smile

Last edited by M4L (2017-01-30 09:56:55)

Offline

#4 2017-01-27 21:18:17

nikzy
Member
Registered: 2017-01-19
Posts: 10

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

I have been strugling with the same issue since i updated libvirt about a week ago. Downgrading libvirt, as abefar sugested worked perfectly.

I just wonder how you found the "bug". I did not find the logs very helpful, and i did not seem to find anything helpful online (until this post).

I am still new to Arch, as you might have guessed.

Offline

#5 2017-01-28 12:21:17

pierro78
Member
Registered: 2013-05-18
Posts: 14

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

thanks so much for the info, I would probably never have guessed it by myself ...

after downgrading libvirt I had to reboot to start my VMs again ...

Offline

#6 2017-01-28 14:10:38

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

Offline

#7 2017-01-30 16:45:54

abefar
Member
Registered: 2010-04-28
Posts: 14

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

nikzy wrote:

I have been strugling with the same issue since i updated libvirt about a week ago. Downgrading libvirt, as abefar sugested worked perfectly.

I just wonder how you found the "bug". I did not find the logs very helpful, and i did not seem to find anything helpful online (until this post).

I am still new to Arch, as you might have guessed.

Took me a while to figure out, too. I have been using Arch since 2007, and this is the worst - or at least the most annoying - breakage I have experienced so far. Not even starting libvirtd with LIBVIRT_DEBUG=1 was able to output a useful error message.
I ended up grepping for "virt" in /var/log/pacman.log and saw that libvirtd had been upgraded a few days ago, so I connected the dots and tried to downgrade it. However, that was after having wasted half a working day on this issue (now I understand why many companies tend to prefer "stable" distributions like RHEL wink).

Offline

#8 2017-01-31 12:16:50

M4L
Member
Registered: 2014-01-29
Posts: 11

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

abefar wrote:
nikzy wrote:

I have been strugling with the same issue since i updated libvirt about a week ago. Downgrading libvirt, as abefar sugested worked perfectly.

I just wonder how you found the "bug". I did not find the logs very helpful, and i did not seem to find anything helpful online (until this post).

I am still new to Arch, as you might have guessed.

Took me a while to figure out, too. I have been using Arch since 2007, and this is the worst - or at least the most annoying - breakage I have experienced so far. Not even starting libvirtd with LIBVIRT_DEBUG=1 was able to output a useful error message.
I ended up grepping for "virt" in /var/log/pacman.log and saw that libvirtd had been upgraded a few days ago, so I connected the dots and tried to downgrade it. However, that was after having wasted half a working day on this issue (now I understand why many companies tend to prefer "stable" distributions like RHEL wink).

I agree, for my servers at home and work I tend to stick to CentOS and RHEL for my VMs, but with my desktop I've set up GPU passthrough with VFIO and Arch seems more suitable here. With this fault not much information is provided in any logs, I tend to try and lurk and figure out if its widely known issue.
To be honest I actually went with a full reinstall before realising it may have been a bug and posting here. I figured I might have broken something somewhere and had the previous install running since 2012.

Last edited by M4L (2017-01-31 12:18:31)

Offline

#9 2017-02-12 02:18:36

abefar
Member
Registered: 2010-04-28
Posts: 14

Re: [SOLVED] KVM/QEMU Can no longer passthrough disks by-id

After libvirt-python has been upgraded to 3.0.0, virt-manager is now broken for those who have performed the libvirt downgrade.
Here's the previous version of libvirt-python for downgrading: https://archive.archlinux.org/packages/ … pkg.tar.xz

Set the following in /etc/pacman.conf to skip upgrading those packages until the issue has been resolved:

IgnorePkg = libvirt libvirt-python

(Cross-posted from the other thread about this issue)

Last edited by abefar (2017-02-12 02:19:59)

Offline

Board footer

Powered by FluxBB