Bug 612308 - qemu -net / vlan option deprecated. Use -netdev instead.
Summary: qemu -net / vlan option deprecated. Use -netdev instead.
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs   
(Show other bugs)
Version: 6.1
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On: 612307 613593
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-07 20:14 UTC by Richard W.M. Jones
Modified: 2015-09-28 02:26 UTC (History)
5 users (show)

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 11:44:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0586 normal SHIPPED_LIVE Low: libguestfs security, bug fix, and enhancement update 2011-05-19 11:44:03 UTC

Description Richard W.M. Jones 2010-07-07 20:14:01 UTC
+++ 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 13:34:06 UTC
This will be fixed if we rebase (bug 613593).

Comment 3 Richard W.M. Jones 2011-01-04 14:02:30 UTC
Fixed in the rebase.

Comment 4 Richard W.M. Jones 2011-01-04 15:28:14 UTC
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 07:48:10 UTC
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-18 02:33:13 UTC
    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 07:36:33 UTC
This is fine, thanks.

Comment 11 errata-xmlrpc 2011-05-19 11:44:57 UTC
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 13:16:35 UTC
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.