Re: How to hot plugin a new vhost-user-blk-pci device to running VM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :|




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux