Bug 632021
| Summary: | Cannot unplug emulated ide and rtl8139 devices in RHEL6 HVM xen guest | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Don Dutile (Red Hat) <ddutile> | ||||
| Component: | kernel | Assignee: | Don Dutile (Red Hat) <ddutile> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.1 | CC: | ajia, drjones, jzheng, leiwang, lihuang, pbonzini, qcai, weizhan, xhu, yuzhang | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| 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.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-05-23 20:51:42 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: | |||||||
| Bug Blocks: | 653816, 667354 | ||||||
| Attachments: |
|
||||||
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. Patches posted for 6.1. 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.
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.
Patch(es) available on kernel-2.6.32-83.el6 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 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... 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.
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.
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 |
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.