On 01.02.2016 22:48, Vaknin, Rami wrote: > Hi, > > I'm trying to attach a host FC HBA to VM (NPIV). > > Running ovirt 3.5 on CentOS 6.7, libvirt-0.10.2-46.el6_6.6.x86_64, I created vHBA using nodedev-create command - see below HBA and vHBA. > I wrote a vdsm hook which appends the vHBA xml stanza to the devices xml element but the vm start starts without the vHBA device. > > Also, when trying to attach the device manually as a live device - I get: > 2016-02-01 21:30:24.216+0000: 129764: debug : qemuDomainObjBeginJobInternal:847 : Starting job: modify (async=none) > 2016-02-01 21:30:24.216+0000: 129764: error : virDomainDeviceDefParse:8136 : XML error: unknown device type > > Could you please help? > > virsh # nodedev-dumpxml scsi_host6 > <device> > <name>scsi_host6</name> > <parent>pci_0000_08_00_0</parent> > <capability type='scsi_host'> > <host>6</host> > <capability type='fc_host'> > <wwnn>20000024ff57d848</wwnn> > <wwpn>21000024ff57d848</wwpn> > <fabric_wwn>20018c604f101321</fabric_wwn> > </capability> > <capability type='vport_ops' /> > </capability> > </device> > > > virsh # nodedev-dumpxml scsi_host15 > <device> > <name>scsi_host15</name> > <parent>scsi_host6</parent> > <capability type='scsi_host'> > <host>15</host> > <capability type='fc_host'> > <wwnn>5001a4a84992572a</wwnn> > <wwpn>5001a4a76965d7b8</wwpn> > <fabric_wwn>20018c604f101321</fabric_wwn> > </capability> > </capability> > </device> > > > The xml I appends: > > <devices> > ... > <device> > <name>scsi_host16</name> > <parent>scsi_host7</parent> > <capability type="scsi_host"> > <host>16</host> > <capability type="fc_host"> > <wwnn>5001a4a8cd978a73</wwnn> > <wwpn>5001a4afa86a7378</wwpn> > <fabric_wwn>20018c604f101411</fabric_wwn> > </capability> > </capability> > </device> > <device> > <name>scsi_host15</name> > <parent>scsi_host6</parent> > <capability type="scsi_host"> > <host>15</host> > <capability type="fc_host"> > <wwnn>5001a4a84992572a</wwnn> > <wwpn>5001a4a76965d7b8</wwpn> > <fabric_wwn>20018c604f101321</fabric_wwn> > </capability> > </capability> > </device> > > </devices> > This is not how you attach a hostdev to a domain. You need to be looking at <hostdev/>: http://libvirt.org/formatdomain.html#elementsHostDev Michal _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users