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):
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
The're is no downscript section in sample.xml, which seems to be simply ignored.
/domain/devices/interface should contain downscript section.
It seems that current master HEAD git repository does not have downscript support yet.
Moving to upstream tracker
Currently we support XML like:
Where script path maps to qemu -net ...,script=/etc/qemu-ifup
Seems sensible to add
Some info for LibvirtFirstBug:
Here is an example git commit that could be followed as a template:
Author: Marc-André Lureau <firstname.lastname@example.org>
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.