[libvirt] [PATCH 10/14] Basic qemu NIC hotplug support

Mark McLoughlin markmc at redhat.com
Mon Jul 20 13:08:42 UTC 2009


On Mon, 2009-07-20 at 14:53 +0200, Daniel Veillard wrote:
> On Mon, Jul 20, 2009 at 12:51:20PM +0100, Mark McLoughlin wrote:
> > Implement basic NIC hotplug support using the 'host_net_add' and
> > 'pci_add' qemu monitor commands.
> > 
> > For now, we don't support 'bridge' or 'network' types.
> > 
> > Also, if pci_add fails, we currently fail to remove the backend
> > which we added.
> > 
> > Finally, NIC hot-unplug support is missing.
> > 
> > * src/qemu_driver.c: add qemudDomainAttachNetDevice()
> > 
> > * src/qemu_conf.[ch]: export qemuBuildNicStr(), qemuBuildHostNetStr()
> >   and qemuAssignNames()
> > 
> > * src/libvirt_private.syms: export virDomainNetTypeToString()
> [...]
> > +static int qemudDomainAttachNetDevice(virConnectPtr conn,
> > +                                      virDomainObjPtr vm,
> > +                                      virDomainDeviceDefPtr dev,
> > +                                      unsigned int qemuCmdFlags)
> > +{
> > +    virDomainNetDefPtr net = dev->data.net;
> > +    char *cmd, *reply;
> > +    int i;
> > +
> > +    if (!(qemuCmdFlags & QEMUD_CMD_FLAG_HOST_NET_ADD)) {
> > +        qemudReportError(conn, dom, NULL, VIR_ERR_NO_SUPPORT, _("%s"),
> > +                         "installed qemu version does not support host_net_add");
> 
>   Hum, _() seems to be around the wrong string :-)

Thanks, fixed now.

Cheers,
Mark.




More information about the libvir-list mailing list