Bug 825939 - RFE: qemu: support -net downscript=
RFE: qemu: support -net downscript=
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
LibvirtFirstBug
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 03:04 EDT by Hiroaki KAWAI
Modified: 2017-02-06 05:25 EST (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hiroaki KAWAI 2012-05-29 03:04:16 EDT
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.
Comment 1 Cole Robinson 2012-06-07 10:32:33 EDT
Moving to upstream tracker
Comment 2 Cole Robinson 2016-03-23 18:09:24 EDT
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>
Comment 3 Cole Robinson 2016-04-15 10:42:38 EDT
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@gmail.com>
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
Comment 4 sachidananda sahu 2017-02-06 01:45:46 EST
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.
Comment 5 Daniel Berrange 2017-02-06 05:25:16 EST
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.

Note You need to log in before you can comment on or make changes to this bug.