Description of problem: qemu-kvm controls tap device attachment and detachment with script. libvirt does support interface up script, but does not support down script. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. $ echo "/usr/libexec/qemu-kvm -name hoge -smp 2 -m 1024 -hda hoge.img -net nic,macaddr=54:52:00:01:02:03,model=virtio -net tap,ifname=tap0,script=no,downscript=no" > sample.kvm-native 2. $ virsh domxml-from-native qemu-argv sample.kvm-native > sample.xml Actual results: The're is no downscript section in sample.xml, which seems to be simply ignored. Expected results: /domain/devices/interface should contain downscript section. Additional info: It seems that current master HEAD git repository does not have downscript support yet.
Moving to upstream tracker
Currently we support XML like: <interface type='ethernet'> <mac address='00:11:22:33:44:55'/> <script path='/etc/qemu-ifup'/> </interface> Where script path maps to qemu -net ...,script=/etc/qemu-ifup Seems sensible to add <interface type='ethernet'> <mac address='00:11:22:33:44:55'/> <script path='/etc/qemu-ifup'/> <downscript path='/path/to/my/downscript'/> </interface>
Some info for LibvirtFirstBug: Here is an example git commit that could be followed as a template: commit 937ebba00e1bbbb7f67e00f5522511e6e650fd0a Author: Marc-André Lureau <marcandre.lureau> Date: Fri Feb 19 15:30:15 2016 +0100 qemu: add spice opengl support The main components are: - Parsing the new parameter out of the XML (src/conf/domain_conf.c) - Putting the new parameter on the qemu command line (src/qemu/qemu_command.c) - Updating the documentation (docs/formatdomain.html.in) - Adding a test case to the test suite
Hi, i want to work for this, with this i want to get started with opensource , can any one guide me about the floe to make this possible, i will be extremely happy to continue like this.
The best thing is to look at the libvirt code for places that deal with the existing "script" parameter - the support for "downscript" will be 90% the same as that.
This issue is now tracked in https://gitlab.com/libvirt/libvirt/-/issues/13