How to turn a full virtualized DomU into a para virtualized
This document (7006035) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 10
Situation
However, as this procedure is not supported by NTS, this article is only intended for internal usage and was created to document the necessary steps.
Resolution
- Make a backup of the DomU
- Make a backup of the DomU config file
- In case the original system is online while work is being done on a copy, make sure the copy has a different network address to avoid IP conflicts when you try to boot the system
- Boot the copy DomU and install kernel-xen
- Shutdown the copy DomU
- On the Dom0:
* kpartx -a /path/to/DomU/diskimage/disk0
to add the partitions of the DomU to the Dom0
* cd /dev/mapper
Check for the root device in /dev/mapper and mount it to /mnt:
* mount rootdev /mnt
Check for the boot device in /dev/mapper and mount it to /mnt/boot
* mount bootdev /mnt/boot
* mount any other device (e.g. /usr, /var) you need to /mnt/*
* mount -o bind /proc /mnt/proc
* mount -o bind /dev /mnt/dev
* mount -o bind /sys /mnt/sys
chroot into the mounted system:
* chroot /mnt
- Change all entries in /etc/fstab, /boot/grub/device.map, /boot/grub/menu.lst from their current device names to the para virtualized /dev/xvdXY naming scheme (X = device letter, Y = partition number)
- In order to prevent any issues with different kernel flavors use rpm -qa | grep kernel to determine which kernels are installed and remove all others except the XEN kernel (e.g. rpm -e kernel-default)
- mkinitrd
- See #3 and check the IP settings in /etc/sysconfig/network/ifcfg-*, change if necessary
- type 'exit' to leave chroot
- umount /mnt/*
- umount /mnt
- kpartx -d /path/to/DomU/diskimage/disk0 #delete the DomU partition mappings from Dom0
Full:
name="sascha"
uuid="5b60bc28-88db-5cd8-d09b-a66497da272f"
memory=512
maxmem=512
vcpus=1
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=1
builder="hvm"
extid=0
device_model="/usr/lib/xen/bin/qemu-dm"
kernel="/usr/lib/xen/boot/hvmloader"
boot="c"
disk=[ 'file:/var/lib/xen/images/sascha/disk0,hda,w', ]
vif=[ 'bridge=br0,mac=00:16:3e:7c:6b:f3,model=rtl8139,type=ioemu', ]
stdvga=0
vnc=1
vncunused=1
apic=1
acpi=1
pae=1
usb=1
usbdevice='tablet'
serial="pty"
Para:
name="sascha"
uuid="5b60bc28-88db-5cd8-d09b-a66497da272f"
memory=512
maxmem=512
vcpus=1
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
builder="linux"
bootloader="/usr/lib/xen/boot/domUloader.py"
bootargs="--entry=xvda2:/boot/vmlinuz-xen,/boot/initrd-xen"
extra=""
disk=[ 'file:/var/lib/xen/images/sascha/disk0,xvda,w', ]
vif=[ 'mac=00:16:3e:7c:6b:f3', ]
vfb=['type=vnc,vncunused=1']
NOTE: The device in --bootargs has to be xvdXY, not /dev/xvdXY as else the error "Bootloader did not return any data" is experienced.
In case the DomU is managed by the xenstore, it is necessary to remove the DomU
and add it again to re-read the new config:
Also make sure the UUID of the DomU was changed.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7006035
- Creation Date: 19-May-2010
- Modified Date:10-Mar-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com