[libvirt] [PATCH v6] npiv: Auto-generate WWN if it's not specified

Matthias Bolte matthias.bolte at googlemail.com
Tue Feb 7 13:15:41 UTC 2012

2012/2/7 Osier Yang <jyang at redhat.com>:
> The auto-generated WWN comply with the new addressing schema of WWN:
> <quote>
> the first nibble is either hex 5 or 6 followed by a 3-byte vendor
> identifier and 36 bits for a vendor-specified serial number.
> </quote>
> We choose hex 5 for the first nibble. And for the 3-bytes vendor ID,
> we uses the OUI according to underlying hypervisor type, (invoking
> virConnectGetType to get the virt type). e.g. If virConnectGetType
> returns "QEMU", we use Qumranet's OUI (00:1A:4A), if returns
> ESX|VMWARE, we use VMWARE's OUI (00:05:69). Currently it only
> supports qemu|xen|libxl|xenapi|hyperv|esx|vmware drivers. The last
> 36 bits are auto-generated.

A step in the right direction :)

But why should we use a string here and call virConnectGetType when we
already have a virDomainVirtType enum and the virDomainDef struct has
a virtType member that holds the required information?

Matthias Bolte

More information about the libvir-list mailing list