Bug 505106 - libvirt-generated qemu command line incorrect 'script' usage for -net (but not fatal)
Summary: libvirt-generated qemu command line incorrect 'script' usage for -net (but no...
Keywords:
Status: CLOSED DUPLICATE of bug 503275
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-10 16:48 UTC by erikj
Modified: 2009-06-26 18:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-22 13:12:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description erikj 2009-06-10 16:48:31 UTC
I found an issue where the libvirt-generated qemu command line uses the
'script' parameter incorrectly in combination with -net.  It turns out it
does not lead to a failure today but could later if qemu behaviour changes.

The F11 virtualization host has its primary interface configured as a bridge.
When using virt-manager to set up the guest, therefore, I made use of the host
bridged interface and that is reflected in the qemu-kvm command line.

This is the command line that ended up being used:

/usr/bin/qemu-kvm -S -M pc -m 2048 -smp 8 -name f11-test -uuid 41ed0f4f-cb0d-7d6a-ffb6-b33106d519ef -monitor pty -pidfile /var/run/libvirt/qemu//f11-test.pid -boot c -drive file=/var/lib/libvirt/images/f11-test-1.img,if=virtio,index=0,boot=on -drive file=/dev/sdb,if=virtio,index=1 -net nic,macaddr=54:52:00:4a:ee:0e,vlan=0,model=virtio -net tap,fd=21,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -soundhw es1370

The important part with respect to this bug is:
-net tap,fd=21,script=,vlan=0,ifname=vnet0

As far as I can tell in the documentation and my own by-hand runs of this,
'script=' is not correct.  It should be 'script=no'

It turns out that this doesn't generate an error.  When I was trying my own
runs of qemu-kvm based on the libvirt-generated command line, I added my own
tap interface with tunctl and tried to point qemu-kvm at that.  Because I did
it this way, I did not have the 'fd=x' piece in there.  In that scenario,
qemu-kvm refused to start with this syntax error:

/etc/qemu-ifup: could not launch network script
Could not initialize device 'tap'

This was the FAILING attempted command line:
/usr/bin/qemu-kvm -M pc -m 2048 -smp 8 -name f11-test -uui41ed0f4f-cb0d-7d6a-ffb6-b33106d519ef -pidfile /var/run/libvirt/qemu//f11-test.pid -boot c -drive file=/var/lib/libvirt/images/f11-test-1.img,if=virtio,index=0,boot=on -drive file=/dev/sdb,if=virtio,index=1,cache=none -net nic,macaddr=54:52:00:4a:ee:0e,vlan=0,model=virtio -net tap,script=,vlan=0,ifname=tap0 -parallel none -usb -usbdevice tablet -soundhw es1370

And this is the important part with respect to this bug:
-net tap,script=,vlan=0,ifname=tap0

The final command line I used was this, and it worked (replacing the script=
with script=no):

/usr/bin/qemu-kvm -M pc -m 2048 -smp 8 -name f11-test -uuid 41ed0f4f-cb0d-7d6a-ffb6-b33106d519ef -pidfile /var/run/libvirt/qemu//f11-test.pid -boot c -drive file=/var/lib/libvirt/images/f11-test-1.img,if=virtio,index=0,boot=on -drive file=/dev/sdb,if=virtio,index=1,cache=none -net nic,macaddr=54:52:00:4a:ee:0e,vlan=0,model=virtio -net tap,script=no,vlan=0,ifname=tap0 -parallel none -usb -usbdevice tablet -soundhw es1370

And this is the important part with respect to this bug:
-net tap,script=no,vlan=0,ifname=tap0


So I've filed this minor bug just in case, if qemu-kvm changes so that
script= isn't ignored entirely when fd=x is supplied, that libvirt doesn't
start tripping on this.

Not a show-stopper by any means.

qemu-kvm-0.10.4-4.fc11.x86_64
libvirt-0.6.2-11.fc11.x86_64
virt-manager-0.7.0-5.fc11.x86_64

Comment 1 Mark McLoughlin 2009-06-22 13:12:17 UTC
Thanks Erik, try libvirt-0.6.2-12.fc11 from updates-testing

*** This bug has been marked as a duplicate of bug 503275 ***

Comment 2 erikj 2009-06-26 18:41:14 UTC
Hello.  Looks like this showed up as a released update.

I cranked up a virtual machine.  I can confirm that the qemu command line 
doesn't use the script parameter any more for the use case I reported on.

[root@nada1 ~]# ps -ef | grep qemu
root      3189     1 33 13:39 ?        00:00:02 /usr/bin/qemu-kvm -S -M pc -m 2048 -smp 8 -name f11-test -uuid 41ed0f4f-cb0d-7d6a-ffb6-b33106d519ef -monitor pty -pidfile /var/run/libvirt/qemu//f11-test.pid -boot c -drive file=/var/lib/libvirt/images/f11-test-1.img,if=virtio,index=0,boot=on -drive file=/dev/sdb,if=virtio,index=1 -net nic,macaddr=54:52:00:4a:ee:0e,vlan=0,model=virtio -net tap,fd=19,vlan=0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -soundhw es1370
root      3222  3111  0 13:39 pts/0    00:00:00 grep qemu
[root@nada1 ~]# rpm -q libvirt
libvirt-0.6.2-12.fc11.x86_64

Looks good. thanks.


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