SUSE Conversations


How to Boot Paravirtual Xen DomU to CD-ROM or ISO in SLES 10 SP1 or OpenSUSE 10.3



By: mike_garcia

December 20, 2007 11:18 am

Reads:5470

Comments:5

Rating:0

We needed to boot from a CD-ROM to perform maintenance to a paravirtualized DomU.

We were unable to find any info googling. It appears you cannot boot a Paravirtualized DomU directly to CD-ROM? So we temporarily changed our Paravirtual Xen DomU to boot from HVM or Full Virtual Machine.

Our environment has Xen running on HVM capable hardware (we can run Full Virtualization) with LVM Block devices for disks.

Our Paravirtual DomU is called guest-1

First backup your Running Xen config.
Save it to /etc/xen/vm/guest-1.run
xm list -l guest-1 >/etc/xen/vm/guest-1.run
You will use this file later on.

Novell’s documentation on how to save Running Xen DomU config.
http://www.novell.com/documentation/vmserver/pdfdoc/config_options/config_options.pdf
Look for “Virtual Machine Settings”.

I found it easier to modify the startup config in /etc/xen/vm/guest-1 than modify the file that is outputted from the Novell Running config backup.

Backup the original Startup config (I believe this file gets created when you first build a new VM in virt-manager.)

/etc/xen/vm/#cp guest-1 guest-1.stp

Open your DomU (guest-1) config.

/etc/xen/vm/# vi guest-1

example below some things are xxx out.:

name=”guest-1”
ostype=opensuse”
uuid=”xxxxxx”
memory=”1024
vcpus=1
on_crash=”destroy”
on_poweroff=”destroy”
on_reboot=”restart”
localtime=0
builder=”linux”
bootloader=”/usr/lib/xen/boot/domUloader.py”
bootargs=”--entry=xvda1:/boot/vmlinuz-xen,/boot/initrd-xen”
extra=” “
disk=[ ‘phy:/dev/array1/guest-1,xvda,w’ , ‘phy:/dev/hda,xvdb:cdrom,r’ , ]
vif=[ ‘mac=xxxx’, ]
vfb=[ ‘type=vnc,vncunused=1’]

Modify the file.
Items with semi-colon we deleted

name=”guest-1”
ostype=opensuse”
uuid=”xxxxxx”
memory=”1024
vcpus=1
on_crash=”destroy”
on_poweroff=”destroy”
on_reboot=”restart”
localtime=0
builder=”hvm”
device_model=”/usr/lib/xen/bin/qemu-dm”
kernel=”/usr/lib/xen/boot/hvmloader”
boot=”d”
;bootloader=”/usr/lib/xen/boot/domUloader.py”
;bootargs=”--entry=xvda1:/boot/vmlinuz-xen,/boot/initrd-xen”
;extra=” “
disk=[ ‘phy:/dev/array1/guest-1,hda,w’ , ‘file:/usr/local/src/systemrescue-x86.iso,hdc:cdrom,r’ , ]
vif=[ ‘mac=xxxx’, ]
vfb=[ ‘type=vnc,vncunused=1’]
apci=0
acpi=1
pae=1
<usb=1
usbdevice=’tablet’
serial=”pty”

Save it.

Note: file:/usr/local/src/systemrescue-x86.iso lives on Dom0 (Host) filesystem.
In order to for Xen to read the modified config you need to undefine the guest-1 DomU.
We just delete it. That works. :)
xm delete guest-1 (remember earlier we backedup the running config)
Before starting your modified DomU make sure you have a valid boot file path or cdrom disk inserted.

Start your modified DomU

xm create guest-1

Now in the virt-manager graphical console you can see that it is booting to cdrom and loading system rescue.
Once you are finished with your work, you can shutdown the guest.
Then undefine it. (aka delete)

Rename the modified guest-1 file to guest-1.cdrom
Next rename or copy your original Running config back to guest-1.

/etc/xen/vm/#cp guest-1.run guest-1

Then start your original running VM.

xm create guest-1

In the virt-manager you can now see your guest-1 booting.
You need to run:

xm new guest-1

This will load the VM config back into virt-manager. Otherwise when you shutdown the VM it disappears out of virt-manager.

Hope someone finds this useful.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: , ,
Categories: openSUSE, SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

5 Comments

  1. By:anonymous

    This is a full virtual machine, not a paravirtual one, as described.

  2. By:Anonymous

    You obviously didnt read the instructions

  3. By:anonymous

    If you are running a paravirtual machine, and you need to boot it off an iso/cdrom to perform maintenance.. You basically have to convert it to a full virtual machine. Set it to boot to iso/cdrom, do your work, then change it back to original paravirtual machine setting.

  4. By:ziizog

    Tried this, but did not work: (This is line 13 in the config file)
    disk=[ ‘phy:/dev/array1/guest-1,hda,w’ , ‘file:/usr/local/src/systemrescue-x86.iso,hdc:cdrom,r’ , ]

    My version was:
    disk=[ 'file:/xen/test-disk0,xvda,w', ‘file:/xen/ISO/SLES-11-DVD-x86_64-GM-DVD1.iso,hdc:cdrom,r’, ]

    Result was:
    # xm create !$
    xm create test
    Using config file “./test”.
    Error: Errors were found at line 13 while processing ./test:
    None

  5. By:dwojew

    My entry was: “‘file:/srv/install/SLES11/SLES-11-DVD-x86_64-GM-DVD1.iso,dvd,r’,”

    The result is:
    Error: Bootloader isn’t executable

Comment

RSS