Michal Prívozník
2021-May-24 11:04 UTC
How to hot plugin a new vhost-user-blk-pci device to running VM?
On 5/21/21 5:28 PM, ??? wrote:> Thanks all of you for your help. > One more question regarding vhost-user-blk-pci type device, how to identify a vhost-blk disk in QEUM VM ? for example, disk name looks like vda,vdb,..., but that some application in VM want to detect that a certain entry is really the device it is waiting for. Specific for windows , they always show as disk 0, 1, 2?.etc > Is there any way to identify those disk with each other in VM?In general no. Usually disks will be enumerated sequentially - thus the first disk on a sata/scsi/usb/.. bus will be sda, the second will be sdb, and so on. But libvirt can't guarantee it - the same way you can't guarantee how a disk is going to be called with real HW. Michal
Daniel P. Berrangé
2021-May-24 11:08 UTC
How to hot plugin a new vhost-user-blk-pci device to running VM?
On Mon, May 24, 2021 at 01:04:44PM +0200, Michal Pr?vozn?k wrote:> On 5/21/21 5:28 PM, ??? wrote: > > Thanks all of you for your help. > > One more question regarding vhost-user-blk-pci type device, how to identify a vhost-blk disk in QEUM VM ? for example, disk name looks like vda,vdb,..., but that some application in VM want to detect that a certain entry is really the device it is waiting for. Specific for windows , they always show as disk 0, 1, 2?.etc > > Is there any way to identify those disk with each other in VM? > > In general no. Usually disks will be enumerated sequentially - thus the > first disk on a sata/scsi/usb/.. bus will be sda, the second will be > sdb, and so on. But libvirt can't guarantee it - the same way you can't > guarantee how a disk is going to be called with real HW.You can set the 'serial' property in the disk in libvirt, and then match that in the guest. For Linux guests that's used in /dev/disk/by-id symlinks. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
梁朝军
2021-Jun-04 11:22 UTC
How to hot plugin a new vhost-user-blk-pci device to running VM?
Hi Guys: Who can help me ? What does this issue mean? When I attach a network I hit this issue. libvirt: QEMU Driver error : internal error: unable to execute QEMU command 'netdev_add': Invalid parameter type for 'vhost', expected: boolean Thanks!> ? 2021?5?24????7:08?Daniel P. Berrang? <berrange at redhat.com> ??? > > On Mon, May 24, 2021 at 01:04:44PM +0200, Michal Pr?vozn?k wrote: >> On 5/21/21 5:28 PM, ??? wrote: >>> Thanks all of you for your help. >>> One more question regarding vhost-user-blk-pci type device, how to identify a vhost-blk disk in QEUM VM ? for example, disk name looks like vda,vdb,..., but that some application in VM want to detect that a certain entry is really the device it is waiting for. Specific for windows , they always show as disk 0, 1, 2?.etc >>> Is there any way to identify those disk with each other in VM? >> >> In general no. Usually disks will be enumerated sequentially - thus the >> first disk on a sata/scsi/usb/.. bus will be sda, the second will be >> sdb, and so on. But libvirt can't guarantee it - the same way you can't >> guarantee how a disk is going to be called with real HW. > > You can set the 'serial' property in the disk in libvirt, and then match > that in the guest. For Linux guests that's used in /dev/disk/by-id > symlinks. > > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| >