Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 612308

Summary: qemu -net / vlan option deprecated. Use -netdev instead.
Product: Red Hat Enterprise Linux 6 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: dallan, jzheng, llim, mbooth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Bug Depends On: 612307, 613593    
Bug Blocks:    

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