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

Daniel Veillard veillard at redhat.com
Mon Jul 20 12:53:43 UTC 2009


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

I'm a bit worried about the FIXMEs, are they too hard or just not ready yet ?

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list