Linux Archive

Linux Archive (
-   Ubuntu Server Development (
-   -   Xen in Hardy (

Mark Goldfinch 04-03-2008 01:40 AM

Xen in Hardy
Hi Leandro,

Leandro Pereira de Lima e Silva wrote:
That's what I did:

- I was trying to create a virtual machine with hardy on it (hardy on
the host too) using xen-create-image.

- xen-tools isn't coming with hooks for installing hardy (I've already
filled a bug report about that), so I tried symlinking hardy.d to
edgy.d just like the symlinks from feisty.d and gutsy.d.

- Runned: xen-create-image --force --fs ext3 --image-dev
/dev/group/volume_root --memory 512 --passwd --swap-dev
/dev/group/volume_swap --dist hardy --mirror
--gateway gateway_ip_addr --ip ip_addr --netmask netmask_addr
--hostname hostname_addr, where "group/volume_root",
"group/volume_swap", "gateway_ip_addr", "ip_addr", "netmask_addr",
"hostname_addr" are actually other things that I've changed to get some

- Tried to boot, but initramfs can't find the root.

- Fixed a few things on the configuration file generated by
xen-create-image (tried different combinations, this is how it ended):

* - Add "root******* = '/dev/sda2 ro'" after the memory line.

* - Fixed the disk section that just contained "',sda1,w'," inside of
it, at the end it became:

***** disk******* = [ 'phy:group/volume_swap,sda1,w',
'phy:group/volume_root,sda2,w' ]

- Add "xenblk" to /etc/initramfs-tools/modules and recreated the initrd
file. (the same as the above item, what seemd to work after a few

- Runned xm create -c hostname_addr

- Machine starts to boot and hangs at:

** Running local boot scripts
(/etc/rc.local)*************************** [ OK ]

- Switched to gutsy (in xen-create-image), thinking that maybe it hangs
because of some new hook needed for hardy.

- Got the same problem that I had with hardy.

The LVM group and the volumes existed previously, the machine is an
Athlon 64 X2 with 3.5gb of ram. I'm using a custom linux kernel version based
on the available source for 2.6.24-12-xen. Tried also using the
official kernel (2.6.24-12-xen) with the original initrd but failed on
the initrd problem that I described above, tried it with a new initrd
and it got stuck in the same "Running local boot scripts [ OK ]" as

I'm using xen-tools version 3.8-4ubuntu2 and xen-hypervisor-3.2 version

I tried to cover every aspect that may be relevant to the setup, please
tell me if I've missed anything.

Does the machine actually hang or are you missing just missing your
login prompt?

If its the latter then it could be that Xen is running its /dev/console
on a device which there isn't a getty running for.

Have a look at the configuration file for your Xen image, does it
contain a like like either:

extra = "console=hvc0"


extra = "xencons=xvc console=xvc0"

If so, then you need to update upstart by creating a new file within
/etc/event.d with the following contents:


# xvc0 - getty


# This service maintains a getty on xvc0 from the point the system is

# started until it is shut down again.

start on runlevel 2

start on runlevel 3

start on runlevel 4

start on runlevel 5

stop on runlevel 0

stop on runlevel 1

stop on runlevel 6



******* if [ ! -c /dev/xvc0 ]; then

*************** mknod --mode=600 /dev/xvc0 c 204 191;

******* fi

******* exec /sbin/getty 38400 xvc0

end script


Then you can run "sudo start xvc0" to start your system console,
or just reboot. If you feel like doing so you can remove all your
tty[1-6] files from /etc/event.d as there's no virtual consoles on DomU

Hopefully this should then get you a working system console..



ubuntu-server mailing list
More info:

All times are GMT. The time now is 10:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.