# Gentoo as PVM on Citrix Xenserver hangs at boot

## Robelix

I'm trying to get a Gentoo running as PVM on a Citrix Xenserver - following the Instructions:

http://community.citrix.com/display/ocb/2008/07/02/Installing+Ubuntu+on+XenServer

I built gentoo-sources-2.6.32-r7 with all the xen-related stuff on:

```

CONFIG_XEN=y

CONFIG_XEN_MAX_DOMAIN_MEMORY=32

CONFIG_XEN_SAVE_RESTORE=y

CONFIG_XEN_BLKDEV_FRONTEND=y

CONFIG_XEN_NETDEV_FRONTEND=y

CONFIG_XEN_KBDDEV_FRONTEND=y

CONFIG_HVC_XEN=y

CONFIG_XEN_FBDEV_FRONTEND=y

CONFIG_XEN_BALLOON=y

CONFIG_XEN_SCRUB_PAGES=y

CONFIG_XEN_DEV_EVTCHN=y

CONFIG_XENFS=y

CONFIG_XEN_COMPAT_XENFS=y

CONFIG_XEN_SYS_HYPERVISOR=y

```

But boot always hangs after:

```

VFS: Mounted root (ext3 filesystem) on device 202:2.

Freeing unused kernel memory: 484k freed

```

No matter if I try it with or without initrd, always the same.

I found http://wiki.xensource.com/xenwiki/XenFaq#head-ea8b39d71e49cc16d287257de4c482f99d883097 - but dev/null and dev/console do exist.

Any ideas?

----------

## BradN

It looks as though the kernel is at the point where it's about to run init, so perhaps it's a problem in creating a user process.

----------

## idella4

Robelix,

VFS: Mounted root (ext3 filesystem) on device 202:2. 

Freeing unused kernel memory: 484k freed 

says it has mounted root.  Is that the last entry that appears?  It should next move onto init.

The above isn't an error message.  

It's worth posting the file you're using to boot it; the .cfg.  Generally the answer to fix it lies in the entries in that.  Ubuntu 2.6.24 is about three years old.  The kernel has some other entries to those cited.

However, Ubuntu has dropped xen support as a host, however they did make a guest xen kernel, a 2.6.31.

Google for it.  That's how I found it, but don't have a record of the site.  It's likely your gentoo made kernel isn't quite there.  My gentoo kernel was fine for booting hosts, but I didn't quite get it  right to boot guests.

Get the ubuntu guest kernel and its config, then run it as oldconfig in the gentoo kernel and updaye the config and re-compile.

Here;   http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=config-domU;att=5;bug=582021

That should get you in.

----------

## nmonroe1

you need to add some kernel args

xencons=hvc console=hvc0

and add hvc0 to /etc/securetty so you can log into the xen console as root if needed.

----------

## nighthawker

I saw the same thing on my recently paravirtualized gentoo VM on xenserver 6.  The VM wasn't hung, I could ssh into it.  I did as poster above directed... 

on dom0 i ran...

xe vm-param-set uuid=$UUID PV-args="console=hvc0 xencons=hvc"

on my gentoo vm...

echo "hvc0" >> /etc/securetty

changed /etc/inittab as folllows

# TERMINALS

#c1:12345:respawn:/sbin/agetty 38400 tty1 linux

c1:12345:respawn:/sbin/agetty 38400 hvc0 linux

At this point the VM would come up and display every fine in the xenserver console.  I got a login: prompt, but it wouldn't accept keyboard input.  All this was happening in the windows XenCenter app.   I read in another post that the XenCenter is flaky and I restarted it and everything was fine.  Keyboard input worked, I could login.

----------

