Hi all I have a stupid question... How do you actually install a new OS inside a new domainU ? I assumed it''d be vmware like, meaning, given the following config: kernel = "/boot/vmlinuz-2.6.12-xenU" memory = 512 name = "oes1" disk = [ ''phy:vgdata/lv_xen_oes1,hda1,w'' ] disk = [ ''phy:md2,hda2,w'' ] dhcp="dhcp" root = "/dev/hda1 ro" extra = "4" and starting it like ''xm create oes1 -c'', the console opens, sees nothing (lv_xen_oes1 is empty), it would prompt me to install the new OS.. But since I get a VFS: Cannot open root device "hda1" or unknown-block(2,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) I am assuming there needs to be something on it before I start the domain? In that case, how do I install a new OS inside that domain? Thanks a lot for pointing me to relevant documentation, or answering this stupid question. fred _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, Fred Blaise <chapeaurouge@gmail.com> wrote:> Hi all > > I have a stupid question... > > How do you actually install a new OS inside a new domainU ? > I assumed it''d be vmware like, meaning, given the following config: > > kernel = "/boot/vmlinuz-2.6.12-xenU" > memory = 512 > name = "oes1" > disk = [ ''phy:vgdata/lv_xen_oes1,hda1,w'' ] > disk = [ ''phy:md2,hda2,w'' ] > dhcp="dhcp" > root = "/dev/hda1 ro" > extra = "4"I got a little farther doing this: disk = [ ''phy:hdd,hdd,r'' , ''phy:vgdata/lv_xen_oes1,hda1,w'' , ''phy:hda5,hda2,w'' ] where hdd is my cdrom device, lv_xen_oes1 the /, and hda2 my swap space.. but i still get this: Freeing unused kernel memory: 152k freed Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel.> > and starting it like ''xm create oes1 -c'', the console opens, sees > nothing (lv_xen_oes1 is empty), it would prompt me to install the new > OS.. > > But since I get a > VFS: Cannot open root device "hda1" or unknown-block(2,0) > Please append a correct "root=" boot option > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) > > I am assuming there needs to be something on it before I start the > domain? In that case, how do I install a new OS inside that domain? > > Thanks a lot for pointing me to relevant documentation, or answering > this stupid question. > > fred >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fred Blaise wrote: > Hi all > > I have a stupid question... > > How do you actually install a new OS inside a new domainU ? No, it''s not a stupid question. However I didn''t find a general answer to that question, so I asked myself two different questions. How do I install two or more linux distributions onto a disk containing several root filesystems so that can I boot into any the distributions? Having solved that, I asked myself: Which distribution/root filesystem will be the dom0 and how how do I bring up the Xen and the dom0/domU''s? I made things more difficult for myself by wanting to just use the one box, but there is no reason why you couldn''t use two physical machines. One box runs Xen and contains filesystems for each domain. The second box is just a ''scratch'' box. You install a distribution on the second box, copy the filesystem image to the first box (new domain), then wipe the disk on the second box ready for a fresh install. I have found that getting an arbitrary distribution to install on a virutal machine of any type is sufficiently difficult that it is often easier not to bother and to use a physical machine instead. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, Robbie Dinn <robbie@microbus.com> wrote:> Fred Blaise wrote: > > Hi all > > > > I have a stupid question... > > > > How do you actually install a new OS inside a new domainU ? > > No, it''s not a stupid question. > > However I didn''t find a general answer to that question, so I asked > myself two different questions. > > How do I install two or more linux distributions onto a disk > containing several root filesystems so that can I boot into any > the distributions? > > Having solved that, I asked myself: > > Which distribution/root filesystem will be the dom0 and how > how do I bring up the Xen and the dom0/domU''s? > > I made things more difficult for myself by wanting to just use the > one box, but there is no reason why you couldn''t use two > physical machines. One box runs Xen and contains filesystems for > each domain. The second box is just a ''scratch'' box. You install > a distribution on the second box, copy the filesystem image to the > first box (new domain), then wipe the disk on the second box ready > for a fresh install. > > I have found that getting an arbitrary distribution to install > on a virutal machine of any type is sufficiently difficult that > it is often easier not to bother and to use a physical machine > instead.I tried to pass extra parameters, as to have the domU boot from the cdrom, like extra = ''boot=/dev/hdd 4'' but it wouldn''t work. Also, apparently, it finds my /dev/hda 1 time out of 5. Sucks :\ I will try to check out the newest hg.> > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> > Hi all > > > > I have a stupid question... > > > > How do you actually install a new OS inside a new domainU ? > > No, it''s not a stupid question. > > However I didn''t find a general answer to that questionThat may be different. If you''re using SUSE 10.0 you can it do this way: First create a filesystem which will be the root filesystem for your domU. If you have lvm installed and a volume group created you can create this filesystem as following: lvcreate -L 8g -n root xenvg # this creates a volume named root with a size of 8 GB in the volume group xenvg mkfs -t reiserfs /dev/xenvg/root # this makes a reiser filesystem on this volume mount -t reiserfs /dev/xenvg/root /mnt # this mounts the filesystem on /mnt Now can fill up this filesystem: yast dirinstall # this starts the yast module called dirinstall. Select here as target directory /mnt and all your software you like to install. Then go to "Next". The packages will be installed now. Finally you can exit yast again. cd /mnt/boot cp /boot/*xen* . cd /mnt/etc echo "/dev/hda1 / reiserfs defaults 1 1" > fstab rm -f mtab cp /etc/passwd . cp /etc/shadow . cp /etc/ssh/sshd_config ssh/sshd_config cd /mnt/var/adm/YaST/ProdDB cp /var/adm/YaST/ProdDB/prod_* . cd / umount /mnt Now your domU is created. Stephan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2005/10/18, Fred Blaise <chapeaurouge@gmail.com>:> How do you actually install a new OS inside a new domainU ? > I assumed it''d be vmware like, meaning, given the following config:If you want to install a Debian based distro in DomU it''s quite simple: in your Dom0 install the debootsrap package, its a debian package but I''ve heard that it''s also available for other distros. This package allows you to ''install'' a Debian distro inside a directory, so now you need that directory. Create a new partition, or a file to use as a loopback device and mount it, for example in /mnt now run: debootstrap --arch i386 distro /mnt url where: distro is the name of the distro to install (depending on the version of debootstrap you could lack the script to install some distros/versions but you should be able to find them in the net easily) url is the url to the repositories archives, that depends on your choosen distro after the initial process, you have a filesystem with a base debian-like system. Now you should configure the following files: /etc/fstab /etc/hosts /etc/network/interfases /etc/hostname unmount the new filesystem start a DomU using that filesystem as / after login as root without password, run base-config and your system will be finally configured. then use apt-get or aptitude to install wathever software you like/need/want Cheers -- Gabriel E. Patiño _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, Gabriel Patiño <gepatino@gmail.com> wrote:> 2005/10/18, Fred Blaise <chapeaurouge@gmail.com>: > > How do you actually install a new OS inside a new domainU ? > > I assumed it''d be vmware like, meaning, given the following config: > > If you want to install a Debian based distro in DomU it''s quite simple: > > in your Dom0 install the debootsrap package, its a debian package but > I''ve heard that it''s also available for other distros. > > This package allows you to ''install'' a Debian distro inside a > directory, so now you need that directory. > > Create a new partition, or a file to use as a loopback device and > mount it, for example in /mnt > > now run: > > debootstrap --arch i386 distro /mnt url > > where: > distro is the name of the distro to install (depending on the version > of debootstrap you could lack the script to install some > distros/versions but you should be able to find them in the net > easily) > url is the url to the repositories archives, that depends on your > choosen distro > > after the initial process, you have a filesystem with a base > debian-like system. Now you should configure the following files: > /etc/fstab > /etc/hosts > /etc/network/interfases > /etc/hostname > > unmount the new filesystem > start a DomU using that filesystem as / > after login as root without password, run base-config and your system > will be finally configured. > > then use apt-get or aptitude to install wathever software you like/need/wantok, I got the idea... but has anyone succeeded in installing directly from cdrom? Is that even possible at this time?> > Cheers > -- > Gabriel E. Patiño > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> > > ok, I got the idea... but has anyone succeeded in installing directly > from cdrom? Is that even possible at this time? > >No, at this time. VMware has virtual BIOS and not Xen at this time. Right now, the closest you can do with this idea is to boot off the cdrom and install it in a different partition. Then you configure a domU pointing to that partition. The archive should have a lot of info about this. -- benjamin rualthanzauva _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, benjamin <benjaminrtz@gmail.com> wrote:> > > > ok, I got the idea... but has anyone succeeded in installing directly > > from cdrom? Is that even possible at this time? > > > > > No, at this time. VMware has virtual BIOS and not Xen at this time. Right > now, the closest you can do with this idea is to boot off the cdrom and > install it in a different partition. Then you configure a domU pointing to > that partition. The archive should have a lot of info about this. > > > -- > benjamin rualthanzauva >You may also download xen-images from * http://xen-get.org/ * http://jailtime.org/ -- benjamin rualthanzauva _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 10/18/05, benjamin <benjaminrtz@gmail.com> wrote:> > > On 10/18/05, benjamin <benjaminrtz@gmail.com> wrote: > > > > > > > > > > ok, I got the idea... but has anyone succeeded in installing directly > > > from cdrom? Is that even possible at this time? > > > > > > > > > > No, at this time. VMware has virtual BIOS and not Xen at this time. Right > now, the closest you can do with this idea is to boot off the cdrom and > install it in a different partition. Then you configure a domU pointing to > that partition. The archive should have a lot of info about this. > > > > > > -- > > benjamin rualthanzauva > > > > You may also download xen-images from > > * http://xen-get.org/ > > * http://jailtime.org/Thanks for the info. I had searched on google about the cdrom stuff, but nothing came back. Guess I put the wrong keywords then. Now, I know ;)> > -- > benjamin rualthanzauva >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fred Blaise wrote:>Hi all > >I have a stupid question... > >How do you actually install a new OS inside a new domainU ? >I assumed it''d be vmware like, meaning, given the following config: > >Xen does paravirtualization which means that it cannot run unmodified Operating Systems (like VMware can). This makes installation a little challenging since distro installers (while just userspace processes) are very picky about how/where they are run. The easiest approach to installing domUs is to just use qemu. Do a normal install into a qemu disk and then use that disk image as /dev/hda in Xen. For instance, if you install a domU with the following qemu command line: qemu -hda /dev/volumnes/fedora4 -cdrom /dev/cdrom -boot d Then in Xen, you would use a config that had at least these parameters: kernel=''/boot/vmlinuz-2.6-xenU'' memory=512 name=''oes1'' disk=[''phy:volumes/fedora3'', ''hda'', ''w''] root=''/dev/hda1'' And it should Just Work. Regards, Anthony Liguori>kernel = "/boot/vmlinuz-2.6.12-xenU" >memory = 512 >name = "oes1" >disk = [ ''phy:vgdata/lv_xen_oes1,hda1,w'' ] >disk = [ ''phy:md2,hda2,w'' ] >dhcp="dhcp" >root = "/dev/hda1 ro" >extra = "4" > >and starting it like ''xm create oes1 -c'', the console opens, sees >nothing (lv_xen_oes1 is empty), it would prompt me to install the new >OS.. > >But since I get a >VFS: Cannot open root device "hda1" or unknown-block(2,0) >Please append a correct "root=" boot option >Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) > >I am assuming there needs to be something on it before I start the >domain? In that case, how do I install a new OS inside that domain? > >Thanks a lot for pointing me to relevant documentation, or answering >this stupid question. > >fred > >_______________________________________________ >Xen-users mailing list >Xen-users@lists.xensource.com >http://lists.xensource.com/xen-users > > >\ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, This just happens to be something I tried last weekend :-) What I did was download ''mini.iso'' cdrom image from Ubuntu Breezy, which can be used for a net based install (but looking at the method I used, a cdrom based install might work as well). Here''s what I did: 1) Copy the initrd.gz from the iso image, and unzip it. 2) I mounted the image using -o loop, mostly just to look under the hood, to see if it might work, but while at it, I removed the vc2-vc4 entries in inittab since they complain otherwise. 3) Create an sparse image file of a disk (not partition, but entire disk!) for the os to use as hda during install. In my case, I used a sparse file I created using dd (5.4G size). I used a LVM partition (5G) for hda1 and another for swap on hda2 (256M). 4) in my config I put the following line: disk = [ ''file:/root/initrd,sda1,w'' , ''file:/etc/xen/breezy_hda,hda,w'', ''phy:/dev/linux/breezy,hda1,w'' , ''phy:/dev/linux/breezy_swap,hda2,w'' , ] and of course: root = "/dev/sda1" (xen will now use the sparse file for partition table handling of /dev/hda, and the two LVM partitions for accessing /dev/hda1 and /dev/hda2. Don''t know if this is intended, or will stay this way, but it worked for me). 5) After creating the swap image, fire up xen domU with a decent kernel (I used a homebuild kernel based on FC4-xen0 config). 6) The Ubuntu text-mode installer will come up, and will complain about a few things (the partition table being missing a.o.), but you can fix that using the install tool manual partition option. 7) After selecting a few basics like timezone, locale, and networking, I got the installer to download stuff and start the basic installation. 8) After some time, it was ready, and asked me to remove install medium so that it could reboot. So I edited the two lines in my config file to read: disk = [ ''file:/etc/xen/breezy_hda,hda,w'', ''phy:/dev/linux/breezy,hda1,w'' , ''phy:/dev/linux/breezy_swap,hda2,w'' , ] and: root = "/dev/hda1" 9) The installer shutdown the domain, and so I restarted it with xm. 10) The installer finishes the basic installation, and after that, the system was ready for use. (There did seem to be something wrong with the package selection though, I could not preselect anything, it just sent me back to the main menu...). 11) I installed kde and gdm using yum, configured gdm for xdmcp, and setup my X server on my dom0 for indirect login. 12) Et voila! There''s the ubuntu login screen :-), I am able to use it asif I had installed it right from the cdrom onto the bare metal :-) Hope this inspires other people to try the regular installers, and hopefully distributers will provide xen-based install images in the future, I don''t think it would be too hard. (I guess I should write-up a decent howto about this procedure, but am currently lacking the time... I am willing to answer any questions though :-) Keep up the good work guys! Mark. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> 3) Create an sparse image file of a disk (not partition, but entire > disk!) for the os to use as hda during install. In my case, I > used a sparse file I created using dd (5.4G size). I used a > LVM partition (5G) for > hda1 and another for swap on hda2 (256M). > 4) in my config I put the following line: > disk = [ ''file:/root/initrd,sda1,w'' , > ''file:/etc/xen/breezy_hda,hda,w'', > ''phy:/dev/linux/breezy,hda1,w'' , > ''phy:/dev/linux/breezy_swap,hda2,w'' , ] and of course: > root = "/dev/sda1" > (xen will now use the sparse file for partition table > handling of /dev/hda, and the two LVM partitions for > accessing /dev/hda1 and /dev/hda2. Don''t know if this is > intended, or will stay this way, but it worked for me).Holy cow! We never envisaged anyone using whole-disk and partition imports on the same disk at the same time. Any reason not to just export an LVM volume as a whole disk and then partition it internally? Ian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi,> Holy cow! We never envisaged anyone using whole-disk and partition > imports on the same disk at the same time. > > Any reason not to just export an LVM volume as a whole disk and then > partition it internally? > > > IanAt first I was planning to do exactly that, but accidentally I made a mistake, I booted from /dev/hda1 instead of /dev/sda1, and noticed that the installer was writing to my initrd file instead of my LVM volume... So I started from scratch but now used this feature to my advantage :-) The advantage of this approach is that now I can still mount my xen disk image very easily on my dom0, and also I am still able to resize the partition(s) using LVM tools, and resize_reiserfs. I don''t think I will need the hda sparse file anymore after the install, but I just keep it around for now. Mark. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users