[Libvirt] Attach qemu commands to an running xml domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, 

I see in libvirt you are supporting attach/detach devices to existing xml domain using attachDeviceFlags and detachDeviceFlags APIs.
Now we are adding some qemu command to the xml domain related to some interfaces using alias names before starting the VM, but we will face an issue with hot plug such devices, so I have two question here:
  1. Is it applicable to set the alias names for interfaces because I saw it's ignored when I add it to xml domain before starting the VM?
  2. Is there a way or API to attach qemu commands to running domain as you are doing in attaching the device using  attachDeviceFlags?
Example of my xml
<domain type='kvm' id='5' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <devices>
    <interface type='vhostuser'>
      <mac address='fa:16:3e:ac:12:4c'/>
      <source type='unix' path='/var/lib/vhost_sockets/sockbbb6bbe9-eb5' mode='server'/>
      <target dev='tapbbb6bbe9-eb'/>
      <model type='virtio'/>
      <driver queues='4' rx_queue_size='512' tx_queue_size='512'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.net0.page-per-vq=on'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.net0.host_mtu=8942'/>
  </qemu:commandline>
</domain>


Regards,
Waleed Mousa
Software Engineer, 


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux