<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi all, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I see in libvirt you are supporting attach/detach devices to existing xml domain using <b>attachDeviceFlags
</b>and <b>detachDeviceFlags </b>APIs.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Now we are adding some qemu command to the xml domain <span style="background-color:rgb(255, 255, 255);display:inline !important">
related to some interfaces using alias names before</span> starting the VM, but we will face an issue with hot plug such devices, so I have two question here:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ol>
<li><span>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?</span></li><li><span>Is there a way or API to attach qemu commands to running domain as you are doing in attaching the device using  <b style="text-align:start;background-color:rgb(255, 255, 255)">attachDeviceFlags?</b></span></li></ol>
<div><span><b style="text-align:start;background-color:rgb(255, 255, 255)">Example of my xml</b></span></div>
<div><span><b style="text-align:start;background-color:rgb(255, 255, 255)"><domain type='kvm' id='5' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'><br>
</b></span></div>
<div><span><b style="text-align:start;background-color:rgb(255, 255, 255)">  <devices><br>
</b></span></div>
<div><span><span style="text-align:start;background-color:rgb(255, 255, 255)">    <interface type='vhostuser'>
<div style="">      <mac address='fa:16:3e:ac:12:4c'/></div>
<div style="">      <source type='unix' path='/var/lib/vhost_sockets/sockbbb6bbe9-eb5' mode='server'/></div>
<div style="">      <target dev='tapbbb6bbe9-eb'/></div>
<div style="">      <model type='virtio'/></div>
<div style="">      <driver queues='4' rx_queue_size='512' tx_queue_size='512'/></div>
<div style="">      <<span style="background-color: rgb(255, 255, 0);">alias name=</span><span style="background-color: rgb(255, 255, 0);">'net0'</span>/></div>
<div style="">      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/></div>
<div style="">    </interface></div>
<div style=""><b>  </devices><br>
</b></div>
<b>  <qemu:commandline></b>
<div>    <qemu:arg value='-set'/></div>
<div>    <qemu:arg value='device.<span style="background-color: rgb(255, 255, 0);">net0</span>.page-per-vq=on'/></div>
<div>    <qemu:arg value='-set'/></div>
<div>    <qemu:arg value='device.net0.host_mtu=8942'/></div>
<div><b>  </qemu:commandline></b></div>
<div><b></domain></b></div>
<br>
</span></span></div>
<div><span><b style="text-align:start;background-color:rgb(255, 255, 255)"><br>
</b></span></div>
<div><span><span style="text-align:start;background-color:rgb(255, 255, 255)">Regards,<br>
Waleed Mousa</span></span></div>
<div><span><span style="text-align:start;background-color:rgb(255, 255, 255)">Software Engineer, </span></span></div>
<div><span><span style="text-align: start; background-color: rgb(255, 255, 255); color: rgb(111, 192, 64);"><b><a href="https://www.nvidia.com/en-me/geforce/" title="https://www.nvidia.com/en-me/geforce/"><span style="color: rgb(111, 192, 64);">Nvidia </span></a></b></span></span></div>
<div><span><span style="text-align:start;background-color:rgb(255, 255, 255)"><br>
</span></span></div>
</div>
</body>
</html>