Leroy Tennison
2016-Nov-18 04:55 UTC
[libvirt-users] Understanding and converting between type='drive' and type='pci'
First, if this isn't the right list please tell me where i should post. I've searched for an explanation and I'm either searching for the wrong thing or it's not there. I'm trying to get an understanding of the "controller='0' bus='0' target='0' unit='0' " parameters for 'drive' compared to the "domain='0x0000' bus='0x00' slot='0x05' function='0x0' " parameters for 'pci'. It appears that 'dev hda' to 'dev hdd' is the maximum associated with 'drive', how many are available with 'pci' and what are the valid ranges for those parameters? If I have an xml using 'drive' and want to convert it to 'pci' what do I need to do? I've had trouble with this when moving disk images between hypervisors but have never had the time to investigate fully, does it have to do with how the drives are referenced (/dev/disk/by0id or /dev/[h|s|v]da as opposed to UUID)? Thanks for your help.
Martin Kletzander
2016-Dec-02 13:15 UTC
[libvirt-users] Understanding and converting between type='drive' and type='pci'
On Thu, Nov 17, 2016 at 10:55:43PM -0600, Leroy Tennison wrote:>First, if this isn't the right list please tell me where i should post. > >I've searched for an explanation and I'm either searching for the wrong >thing or it's not there. I'm trying to get an understanding of the >"controller='0' bus='0' target='0' unit='0' " parameters for 'drive' >compared to the "domain='0x0000' bus='0x00' slot='0x05' function='0x0' " >parameters for 'pci'. It appears that 'dev hda' to 'dev hdd' is the >maximum associated with 'drive', how many are available with 'pci' and >what are the valid ranges for those parameters? >The <address/> tells libvirt where the device should be plugged in. How many ports there are available for the address type really depends on the controller and hypervisor etc. There's a lot of code dealing with different scenarios. You should rely on libvirt to do the placement for you and just adjust the <target/> instead of the <address/> unless you know what you are doing.>If I have an xml using 'drive' and want to convert it to 'pci' what do I >need to do? I've had trouble with this when moving disk images betweenWhat is the problem you are trying to fix? Can you paint a bigger picture of what you are trying to achieve? It's hard to help when I don't know what is the goal =)>hypervisors but have never had the time to investigate fully, does it >have to do with how the drives are referenced (/dev/disk/by0id or >/dev/[h|s|v]da as opposed to UUID)? >Libvirt is trying to get close, but due to the fact how that works we cannot in any way guarantee what the device name in the guest will be. I'm not sure where the uuid of the disk comes from exactly and how to set that in the host.>Thanks for your help. > >_______________________________________________ >libvirt-users mailing list >libvirt-users at redhat.com >https://www.redhat.com/mailman/listinfo/libvirt-users-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20161202/b19a45e7/attachment.sig>