Bug 488879

Summary: [DELL 6.0 FEAT] Update QEMU to use gPXE roms for iSCSI boot support
Product: Red Hat Enterprise Linux 6 Reporter: Matt Domsch <matt_domsch>
Component: qemu-kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: atodorov, berrange, charles_rose, clalance, crobinso, ehabkost, gyue, jfeeney, jjarvis, martinez, mjenner, qzhang, riek, shiyer, tburke, virt-maint, wwlinuxengineering, xen-maint
Target Milestone: rcKeywords: FutureFeature
Target Release: 6.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 457979 Environment:
Last Closed: 2010-05-24 08:32:25 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: 457979, 509208    
Bug Blocks: 253443, 356741, 524565, 554559, 555199, 555224    

Description Matt Domsch 2009-03-06 02:25:48 UTC
Cloning into RHEL 6.  This belongs on package qemu, but as that isn't available in the bugzilla package list for RHEL6 yet, nor is kvm, it'll have to go here for now...

+++ This bug was initially created as a clone of Bug #457979 +++

Description of problem:
To enable guests to directly boot from an iSCSI target, without libvirt one can manually start qemu-kvm  with the added command line parameter:

–option-rom pci_10ec_8139.rom 

where the .rom file came from the gPXE (etherboot) project, and provides an iSCSI initiator as an option ROM.  qemu then uses this option rom to retrieve the grub boot sectors, and it's off to the races.

libvirt needs the capability of passing such extra command line parameters to qemu.

Version-Release number of selected component (if applicable):
libvirt-0.4.4-2.fc10.x86_64

--- Additional comment from berrange on 2008-08-06 05:55:40 EDT ---

QEMU already automatically loads option ROMs for PXE boot - any reason why the updated ROM with iSCSI support can't just be integrated into QEMU so we don't have to specify a -option-rom explicitly.

Having users of libvirt need to know about loading option ROMs for booting isn't really going to lead to a good experiance. Most applications using libvirt will never even think to enable the option ROM support, even if we have it. Making it 'just work' in upstream QEMU will ensure all applications using libvirt can use the capability without needing special args.

--- Additional comment from matt_domsch on 2008-08-06 08:20:22 EDT ---

I'd be happy for qemu to start using the gPXE option ROMs directly for this capability.  But I also suspect there may be good reasons to want to pass other command line options to qemu from libvirt in the future, so having a general method to pass such options would be beneficial, even if the specific need for -option-rom isn't needed for long.

--- Additional comment from berrange on 2008-08-06 10:09:59 EDT ---

I've spoken with upstream KVM/QEMU maintainers and they would like to switch QEMU to using gPXE option ROMS by default, so I don't want to add any option ROM support into libvirt at this time. Re-assigning this bug component to track gPXE in KVM/QEMU


NB, we also explicitly do NOT enable passing of arbitrary QEMU command line args in libvirt. The libvirt XML format needs to be hypervisor agnostic and thus requires that we come up with a standardized representation for any piece of functionality. Allowing QEMU command line args would violate this requirement.

--- Additional comment from matt_domsch on 2008-08-06 11:14:25 EDT ---

that works for me.

Comment 1 Marizol Martinez 2009-05-13 14:27:28 UTC
Charles -- Please update us with the upstream status of this request.

Comment 2 IBM Bug Proxy 2009-08-19 17:35:54 UTC
 IBM is also interested in seeing the feature in RHEL 6

Comment 3 IBM Bug Proxy 2009-08-26 13:52:53 UTC
------- Comment From ratliff.com 2009-08-18 14:58 EDT-------
1. Feature Overview:
Feature Id:	[202015]
a. Name of Feature:	Switch qemu to use gpxe option rom for netboot
b. Feature Description
Switch qemu over to using gpxe option rom for network booting

2. Feature Details:
Sponsor:	LTC
Architectures:
x86
x86_64

Arch Specificity: Both
Affects Kernel Modules: Yes
Delivery Mechanism: Backport
Category:	Xen
Request Type:	Driver - Feature from Upstream
d. Upstream Acceptance:	In Progress
Sponsor Priority	2
f. Severity: Medium
IBM Confidential:	no
Code Contribution:	IBM code
g. Component Version Target:	gPXE 0.97 or newer, gemu-0.12 or newer

3. Business Case
IBM has a number of products that require a richer netweork booting environment.  Tivoli Provision manager has a program that makes extensive use of PXE UNDI mode which has much better support in gPXE than the current etherboot module.  Additionally, gPXE also includes iSCSI booting support which is a key diskless technology that IBM employs in bare-metal scenarios.  Adding gPXE allows virtualization to fit more seamlessly into existing customer environments.

4. Primary contact at Red Hat:
John Jarvis
jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Stephanie Glass, sglass.com, 512-838-9284

Technical contact(s):
Ryan Arnold, ryanarn.com

IBM Manager:
Warren Grunbok II, grunbok.com

Comment 4 Cole Robinson 2009-09-24 12:48:44 UTC
Reassigning to KVM as was initially intended.

Comment 8 Dor Laor 2009-10-01 10:53:10 UTC
*** Bug 464589 has been marked as a duplicate of this bug. ***

Comment 10 Eduardo Habkost 2010-01-14 18:05:38 UTC
qemu-kvm uses gpxe since the first RHEL-6 packages were out. marking as MODIFIED.

Comment 12 Qunfang Zhang 2010-04-19 10:19:40 UTC
Test in qemu-kvm-0.12.1.2-2.38.el6.x86_64,kernel-2.6.32-19.el6.x86_64.

#rpm -qf /usr/share/qemu-kvm/pxe-virtio.bin
qemu-kvm-0.12.1.2-2.38.el6.x86_64
#ls -l /usr/share/qemu-kvm/pxe-virtio.bin
lrwxrwxrwx. 1 root root 22 Apr 19 17:11 /usr/share/qemu-kvm/pxe-virtio.bin -> ../gpxe/virtio-net.rom


Boot guest from network

   1. /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -no-kvm-pit-reinjection -startdate now -drive file=RHEL-Server-5.5-64-virtio.qcow2,media=disk,format=qcow2,if=virtio,boot=on,cache=off,index=0 -net nic,vlan=0,macaddr=10:1a:4a:10:20:40,model=e1000 -net tap,vlan=0,ifname=e1000_11_1,script=/etc/qemu-ifup -cpu qemu64,+sse2 -balloon none -vnc :10 -uuid `uuidgen` -monitor stdio -m 2G -smp 2 -boot n

Can boot and install the guest successfully.

Comment 13 Qunfang Zhang 2010-05-24 08:32:08 UTC
Change the status to verified then close it according to Comment 12.

Comment 14 Shyam Iyer 2010-11-23 21:19:24 UTC
Doing  root boot using iSCSI requires that the NIC option ROM gets the root path from a source -
Some of the methods are -

1) DHCP server ( option 17) 
2) iBFT

gpxe option rom being part of qemu-kvm is step 1) that has been accomplished but the testing done above does not seem to be accurate.

The test has to be performed in the following way -

1) Install OS on the remote iSCSI LUN. (This can be done normally as is done using physical servers)

2) Patch the DHCP server with the following option and restart it -

filename "";
  option root-path "iscsi:my.target.dns.name::::iqn.2007-08.name.dns.target.my:iscsiboot";



I don't think creating a local disk image is necessary.. as we are booting from the remote target
Steps too boot from iSCSI target

3) The gpxe option rom would obtain the IP + root-path info from the DHCP server. 

4) Now that gpxe is already part of the qemu-kvm package booting with PXE option should provide the root path if the DHCP server is properly patched.


I can't setup my own DHCP server in (: so unable to test this..


-Shyam