Thanks Laine,

Adding  the driver_name o the config did the trick,  thanks ☺

Regarding the vifo error it seem that openstack does roleback if operation 
failed so that why you see the virDomainAttachDeviceFlags
Anyhow I found that the in qemu 2.1 suspend is not working (I got error [1] )  
so I upgrade to qemu 2.5 and then suspend work but it failed on resume.

So Just to clarify vfio is not supporting “attach device” right?  is qemu going 
to support it?
Now I wonder if I need to hardcode in the hostdev config to be with 
driver_name=kvm…


[1] -ERROR:qom/object.c:725:object_unref: assertion failed: (obj->ref > 0)




From: sendmail [mailto:[email protected]] On Behalf Of Laine 
Stump
Sent: Wednesday, March 30, 2016 9:25 PM
To: Libvirt <[email protected]>
Cc: Moshe Levi <[email protected]>
Subject: Re: [libvirt] Host device assignment driver name vfio/ kvm

On 03/29/2016 07:45 AM, Moshe Levi wrote:
Hi,

I was  testing Host device assignment  in OpenStack environment where the 
driver name is vfio or kvm.

My setup is as follow:

1.       Fedora 21

2.       Libvirt 1.3.0 which I compiled

3.       OpenStack master

I have also other setups with older Libvirt version and the same OpenStack 
environment.

I notice that on my fedora environment the driver name is vfio were in my old 
environment the driver name is kvm.

According to Libvirt documentation default is "vfio" on systems where the VFIO 
driver is available and loaded, see [1]
I remove the vfio modules by removing vfio, vfio_iommu_type1, vfio_pci but when 
I boot a vm the drive name is vfio
How can change the driver name to be kvm?

libvirt tries very hard to use vfio rather than legacy kvm, because legacy kvm 
is old, deprecated, and "declared bad" :-). But it won't changed it to vfio if 
you've explicitly said that you want to use kvm. If you really want to use 
legacy kvm device assignment, manually set that in the config. When you do 
that, if the system you're running on doesn't support it, it will error out 
rather than switching.



Another thing that I encounter is an error when suspending VM (in OpenStack 
environment)  when the driver name is  vfio.
In such case I am getting  the following error from Libvirt:
2016-03-28 11:42:59.527 1966 ERROR oslo_messaging.rpc.dispatcher   File 
"/usr/lib64/python2.7/site-packages/libvirt.py", line 560, in attachDeviceFlags
2016-03-28 11:42:59.527 1966 ERROR oslo_messaging.rpc.dispatcher     if ret == 
-1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2016-03-28 11:42:59.527 1966 ERROR oslo_messaging.rpc.dispatcher libvirtError: 
internal error: unable to execute QEMU command 'device_add': Device 
initialization failed.

I would appreciate for some pointers on what can cause this issue.

Assuming that openstack uses libvirt's virDomainSave API I would expect 
suspending a guest to fail if it had an assigned device (since libvirt 
implements this by "migrating to disk", and qemu doesn't allow migration of a 
guest with an assigned device. But your problem is that it's trying to *attach* 
a device, which I wouldn't consider to be a part of a save or suspend or 
whatever operation. Is it possible to get more information about what leads up 
to this?




[1] https://libvirt.org/formatdomain.html#elementsHostDev







--

libvir-list mailing list

[email protected]<mailto:[email protected]>

https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to