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 632021 - Cannot unplug emulated ide and rtl8139 devices in RHEL6 HVM xen guest
Summary: Cannot unplug emulated ide and rtl8139 devices in RHEL6 HVM xen guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Don Dutile (Red Hat)
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 653816 667354
TreeView+ depends on / blocked
 
Reported: 2010-09-08 22:17 UTC by Don Dutile (Red Hat)
Modified: 2011-11-09 03:53 UTC (History)
10 users (show)

Fixed In Version: kernel-2.6.32-83.el6
Doc Type: Bug Fix
Doc Text:
If a Xen guest which specifies a physical path such as /dev/sda1 in its /etc/fstab configuration file, instead of a labeled path, then the following workaround procedure should be followed: 1. The "xen_emul_unplug=never" option should be added to the guest's kernel boot line. 2. The /etc/fstab entry should be modified to specify a partition such as /dev/xvda1 for the /boot partition, or a proper partition label should be used for the file systems on the emulated block device. 3. Finally, if the Xen guest configuration spec uses a line similar to the following: disk = [ 'file:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ] …then that line should be changed to: disk = [ 'tap:aio:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ] This line needs to be changed because the Xen para-virtualized disk driver is not supported with file-backed IO.
Clone Of:
Environment:
Last Closed: 2011-05-23 20:51:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Changes xen_pv_hvm kernel param from setup to early_param() (1.08 KB, patch)
2010-09-08 22:17 UTC, Don Dutile (Red Hat)
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0542 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6.1 kernel security, bug fix and enhancement update 2011-05-19 11:58:07 UTC

Description Don Dutile (Red Hat) 2010-09-08 22:17:00 UTC
Created attachment 446096 [details]
Changes xen_pv_hvm kernel param from setup to early_param()

Description of problem:
With the added support of unplugging the emulated ide and rtl8139 devices in qemu-dm (in rhel5.6), it should be possible to boot a RHEL6 HVM xen guest
with xvd and vnif disk and network devices (virtualized xen disk and network devices, respectively).
A late change in RHEL6 to conditionalize the execution of xen-emul-unplug on xen_pv_hvm_enable didn't take into account that the latter is not parsed until after the xen-emul-unplug code is executed, so the conditional execution can never happen.

Version-Release number of selected component (if applicable):
RHEL6.0 (since -71)

How reproducible:
Always

Steps to Reproduce:
1. Boot a rhel6 HVM xen guest on rhel5.6 host, adding the following to 
   the RHEL6 guest kernel command line:
      xen-emul-unplug=all xen_pv_hvm=enable
2.
3.
  
Actual results:
RHEL6 guest boots with emulated IDE disks and hangs on rtl8139 network device configuration.

Expected results:
RHEL6 guest HVM boots with xvd disks and xen-vnif network.

Additional info:
See attachment for working fix.

Comment 2 RHEL Program Management 2010-10-08 15:40:42 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 3 Don Dutile (Red Hat) 2010-10-08 19:57:02 UTC
Patches posted for 6.1.

Comment 4 Don Dutile (Red Hat) 2010-10-08 20:02:00 UTC
Tech Note:

With the patches posted for this bz in 6.1, it is possible to make a guest
not boot if it's fstab spec'd a physical path, like /dev/sda1, for its /boot
instead of a labeled path.
In this case, the guest must be booted with xen_emul_unplug=never and the fstab can be modified to something like /dev/xvda1 for /boot, or use proper label for the filesystems on the emulated block device.

Additionally, if the xen guest configuration spec used something like:
    disk = [ 'file:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
it should be changed to:
    disk = [ 'tap:aio:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
Since the xen pv disk driver will be configured as the block device driver.

Comment 5 Ryan Lerch 2010-10-20 08:27:22 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:
With the patches posted for this bz in 6.1, it is possible to make a guest
not boot if it's fstab spec'd a physical path, like /dev/sda1, for its /boot
instead of a labeled path.
In this case, the guest must be booted with xen_emul_unplug=never and the fstab
can be modified to something like /dev/xvda1 for /boot, or use proper label for
the filesystems on the emulated block device.

Additionally, if the xen guest configuration spec used something like:
    disk = [ 'file:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
it should be changed to:
    disk = [ 'tap:aio:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
Since the xen pv disk driver will be configured as the block device driver.

Comment 6 Aristeu Rozanski 2010-11-17 19:46:03 UTC
Patch(es) available on kernel-2.6.32-83.el6

Comment 9 Jinxin Zheng 2011-04-06 09:26:28 UTC
I can't reproduce this when doing QA. Can you help to see what's the problem?

The xen config file:

#
kernel = "/usr/lib/xen/boot/hvmloader"
vif = ['mac=00:21:7F:B7:08:06,script=vif-bridge,bridge=xenbr0,model=rtl8139']
vnclisten = "0.0.0.0"
disk = ['tap:aio:/mnt/part/var/lib/xen/images/RHEL-Server-6.0-64-hvm.raw,hda,w']
boot = "c"
vncunused = "1"
soundhw = "es1370"
on_reboot = "restart"
on_crash = "restart"
on_poweroff = "destroy"
pae = "1"
memory = "1024"
maxmem = "1024"
acpi = "1"
localtime = "0"
vnc = "1"
apic = "1"
sdl = "0"
name = "rhel6-hvm"
device_model = "/usr/lib64/xen/bin/qemu-dm"
builder = "hvm"
vcpus = "1"
serial = "pty"

RHEL 6 hvm kernel:
2.6.32-71.el6

guest cmdline: 
ro root=/dev/mapper/vg_dhcp669266-lv_root rd_LVM_LV=vg_dhcp669266/lv_root rd_LVM_LV=vg_dhcp669266/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us  console=tty0 console=ttyS0,115200n8 xen-emul-unplug=all xen_pv_hvm=enable

Comment 10 Don Dutile (Red Hat) 2011-04-06 13:42:47 UTC
Note: 6.0 will boot with above command lines, but it won't unplug the ide & rtl8139 and use xen-pv drivers, as described/outlined.
rhel6.1 does all the right things (without any of these cmdline switches).

So, when you say "you can't reproduce", do you mean you can't fail on boot,
you actually see the xen-pv drivers being hooked up?? details please...

Comment 11 Jinxin Zheng 2011-04-07 03:27:58 UTC
Sorry I think I misunderstood this. I guess I have already reproduced it.

-71 kernel boots without failure, but the ide disk and rtl8139 vif is not unplugged after booting up. The guest still uses the emulated devices. I can see rtl8139 from lspci and sda disk from fdisk.

With -128 kernel it also boots fine. After booting up the ide and rtl8139 has gone. No rtl8139 in lspci, and fdisk outputs xvda disk.

It was the 'hangs on rtl8139' in the bug description which led me to the wrong way. Actually either -71 or -128 does not hang, the difference is just the presence of the pv devices. I think this could be put to VERIFIED now.

Comment 12 Martin Prpič 2011-05-17 11:40:52 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,12 +1,15 @@
-With the patches posted for this bz in 6.1, it is possible to make a guest
-not boot if it's fstab spec'd a physical path, like /dev/sda1, for its /boot
-instead of a labeled path.
-In this case, the guest must be booted with xen_emul_unplug=never and the fstab
-can be modified to something like /dev/xvda1 for /boot, or use proper label for
-the filesystems on the emulated block device.
+If a Xen guest which specifies a physical path such as /dev/sda1 in its /etc/fstab configuration file, instead of a labeled path, then the following workaround procedure should be followed:
 
-Additionally, if the xen guest configuration spec used something like:
+1. The "xen_emul_unplug=never" option should be added to the guest's kernel boot line.
+
+2. The /etc/fstab entry should be modified to specify a partition such as /dev/xvda1 for the /boot partition, or a proper partition label should be used for the file systems on the emulated block device.
+
+3. Finally, if the Xen guest configuration spec uses a line similar to the following:
+
     disk = [ 'file:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
-it should be changed to:
+
+    …then that line should be changed to:
+
     disk = [ 'tap:aio:/var/lib/xen/images/rhel6-guest.dsk,hda,w', ]
-Since the xen pv disk driver will be configured as the block device driver.+
+    This line needs to be changed because the Xen para-virtualized disk driver is not supported with file-backed IO.

Comment 13 errata-xmlrpc 2011-05-23 20:51:42 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-0542.html


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