SLES: Adjusting Xen VM to run on KVM

add the right modules to the kernel config

/etc/sysconfig/kernel

 

# This variable contains the list of modules to be added to the initial
# ramdisk by calling the script "mkinitrd"
# (like drivers for scsi-controllers, for lvm or reiserfs)
#
INITRD_MODULES="sd_mod virtio virtio_blk"


you'd figure they would give a hint what separator to use so you could easily use this variable.

They: How about no.

add kernel

zypper install kernel-default

if you had the right kernel already installed you can add -f to rebuild it.

 

add acpid and enable it

zypper install acpid && service acpid start

 

change the boot config

title SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11
    root (hd0,0)
    kernel /boot/vmlinuz-3.0.76-0.11-default root=/dev/xvda1 disk=/dev/xvda  splash=silent console=xvc console=tty   quiet showopts vga=0x314
    initrd /boot/initrd-3.0.76-0.11-default

You have a standard and a single user entry for the "default" and the "xen" kernels.

The default should be the first two. In those change the following parts where they occur. Ideally you'll keep the Xen entries unchanged, that way you can still use it with Xen if the need arises.

 
 
Original entryUpdated entry
root=/dev/xvda1
root=/dev/vda1
disk=/dev/xvda
disk=/dev/vda
splash=silent
remove
console=tty
console=xvc
remove

 

vga=0x314
nomodeset

change /etc/inittab

Comment the following line:

# end of /etc/inittab
#X0:12345:respawn:/sbin/mingetty --noclear xvc0 linux

 

 

 

Update:

There's an /etc/sysconfig/bootloader

LOADER_TYPE="grub"
LOADER_LOCATION="mbr"
DEFAULT_VGA="0x314"
DEFAULT_APPEND="root=/dev/xvda1 splash=silent   showopts"
FAILSAFE_VGA="0x314"
FAILSAFE_APPEND="root=/dev/xvda1 splash=silent   ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processsor.max+cstate=1 nomodeset x11failsafe"

So the above changes might be doable right there.