This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 612308 - qemu -net / vlan option deprecated. Use -netdev instead.
qemu -net / vlan option deprecated. Use -netdev instead.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.1
All Linux
low Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: 612307 613593
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-07 16:14 EDT by Richard W.M. Jones
Modified: 2015-09-27 22:26 EDT (History)
5 users (show)

See Also:
Fixed In Version: libguestfs-1.7.17-4.el6
Doc Type: Bug Fix
Doc Text:
The "-net" and "vlan=..." options in the qemu package have been deprecated for some time. To avoid relying on these deprecated options, libguestfs now uses the "-netdev" option instead.
Story Points: ---
Clone Of: 612307
Environment:
Last Closed: 2011-05-19 07:44:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-07-07 16:14:01 EDT
+++ This bug was initially created as a clone of Bug #612307 +++

Description of problem:

In qemu 0.12.x, the -net / vlan=... option is deprecated and upstream
have even threatened to remove this option.  We should change
libguestfs to detect this and use -netdev instead.

Version-Release number of selected component (if applicable):

libguestfs 1.3.21
Comment 2 Richard W.M. Jones 2010-10-16 09:34:06 EDT
This will be fixed if we rebase (bug 613593).
Comment 3 Richard W.M. Jones 2011-01-04 09:02:30 EST
Fixed in the rebase.
Comment 4 Richard W.M. Jones 2011-01-04 10:28:14 EST
Just a note: New code is using:

 -netdev user,id=usernet -device virtio-net-pci,netdev=usernet

This is only used if the user enables networking
eg. using guestfs_set_network (g, 1) or using an
option like --network to virt-rescue:

http://libguestfs.org/guestfs.3.html#guestfs_set_network
http://libguestfs.org/virt-rescue.1.html#network

In the vast majority of cases networking is not
used at all.
Comment 6 Jinxin Zheng 2011-01-27 02:48:10 EST
This is VERIFIED by:

$ guestfish
verbose 1
network 1
run

...
[00149ms] /usr/libexec/qemu-kvm \
    -drive file=test.qcow2,cache=off,if=virtio \
    -nodefconfig \
    -enable-kvm \
    -nodefaults \
    -nographic \
    -m 500 \
    -no-reboot \
    -device virtio-serial \
    -serial stdio \
    -chardev socket,path=/tmp/libguestfswfSlM5/sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -netdev user,id=usernet,net=169.254.0.0/16 \
    -device virtio-net-pci,netdev=usernet \
    -kernel /tmp/.guestfs-0/kernel.16293 \
    -initrd /tmp/.guestfs-0/initrd.16293 \
    -append 'panic=1 console=ttyS0 udevtimeout=300 noapic acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=xterm ' \
    -drive file=/tmp/.guestfs-0/root.16293,snapshot=on,if=virtio,cache=writeback
...

no -net args for the qemu. -netdev and -device was used instead.
Comment 9 Laura Bailey 2011-04-17 22:33:13 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The "-net" and "vlan=..." options in the qemu package have been deprecated for some time. To avoid relying on these deprecated options, libguestfs now uses the "-netdev" option instead.
Comment 10 Richard W.M. Jones 2011-04-18 03:36:33 EDT
This is fine, thanks.
Comment 11 errata-xmlrpc 2011-05-19 07:44:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html
Comment 12 errata-xmlrpc 2011-05-19 09:16:35 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html

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