SUSE Support

Here When You Need Us

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 11
SUSE Linux Enterprise Server 10
 

Situation

A customer created a SLES / OES DomU on a SLES10/SLES11 Dom0 and is asking how to increase performance. While reviewing the supportconfig you notice the DomU in question is a full virtualized system. The answer in this case should be "Use a para virtualized DomU." So the return question will be "ok, how do I turn the DomU into a para virtualized one?". Actually turning the DomU from full to para is a matter of the installed kernel, entries in several files plus the configuration file on the Dom0.

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

  1. Make a backup of the DomU
     
  2. Make a backup of the DomU config file
     
  3. 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
     
  4. Boot the copy DomU and install kernel-xen
     
  5. Shutdown the copy DomU
     
  6. 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
     
  7. 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)
     
  8. 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)
     
  9. mkinitrd
     
  10. See #3 and check the IP settings in /etc/sysconfig/network/ifcfg-*, change if necessary
     
  11. type 'exit' to leave chroot
     
  12. umount /mnt/*
     
  13. umount /mnt
     
  14. kpartx -d /path/to/DomU/diskimage/disk0    #delete the DomU partition mappings from Dom0
As a next step the existing config of the DomU needs to be changed from full virtualization to para virtualization:

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
 
xm delete name-of-domU

and add it again to re-read the new config:
 
xm new name-of-domU

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.