WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Cannot open root device

On Sun, 2005-06-05 at 10:42 +0200, Hsing-Foo Wang wrote:
> Lyndsay Roger wrote:
> > On Sun, 2005-06-05 at 10:19 +0200, Hsing-Foo Wang wrote:
> > 
> >>>I use Ubuntu and with partitions I just cp -a /* /mnt/dom1
> >>>to copy the whole thing to another partition, then change a few config
> >>>files and I have the other domains running.
> >>>Depending on the size of your disk you may be able to copy your existing
> >>>system to a file and use that as a guest.
> >>
> >>Without kernel changes?? I thought the guest OS needs be recompiled to 
> >>be used under Xen as a guest OS.
> > 
> > 
> > The guest does not use the kernel from the guest filesystem. It uses the
> > vmlinuz-2.?.??-xenU kernel from dom0 file system but it uses the modules
> > from its own file system so you need to copy
> > the /lib/modules/kernel-version modules that are supplied in the xen
> > binary package or that you complied, to the guest filesystem.
> > 
> > Hope I don't confuse things more :-)
> 
> Oh yes you did :-)
> 
> So for example i want to use Centos 3.4 as a guest OS, how would I go 
> about please? Let's say I have 1 Centos 3.4 ISO file.

Never used Centos or installed from an ISO cdrom image. With Debian
based systems you can install in a chroot environment to a particular
file system but I have never done that either :-)

What I have done is -

- Installed the minimum Ubuntu system to a machine as you normally
would. (hda1)
- tar the system to a file
- Install xen to the machine & compile so it has support for the chipset
- create another partition for the guest (hda2) system & untar the file
created above
- chroot to the new partition (hda2) & un-install the kernel packages
- edit the files on hda2 to change hostname, ip address etc
- create a config file, on dom0(hda1), for the guest which maps hda2 on
dom0 to be hda1 on the guest
- xm create /path/to/config/file and the guest should boot & run
- guest uses kernel from dom0 (hda1) but sees what it thinks is hda1
(but is actually hda2) as its root file system

The result is I have a 67MB tar.gz file that contains a base Ubuntu
system so if I want another guest I just create a partition, untar the
file, edit the config files and boot another guest system. 
I should, but have not tried yet, be able to untar the base system file
to a file mounted on a loop mount point & create a system that uses a
file on dom0 instead of a separate partition for the guests. (like the
xen example using ttylinux)

I have the advantage of having a different system to test on and can
therefore install a system from scratch. It makes life a bit easier :-)

Others may be able to provide help installing a guest from an ISO image
file.

Have I made you more confused :-)


Lyndsay.



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users