[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Subject: Re: [Xen-users] boot existing OS
Creating a new domU from the beginning (pardon me if this is overkill for the question...). This is a shortened quick document I wrote up for work. Hopefully it will help. Using a sles 9 machine: 1. Create and format a partition to hold your new domU say /dev/hdb4 2. Mount the partition somewhere. Let's do it at /mnt/mydomu: mount /dev/hdb4 /mnt/mymydomu 3. Copy the partitions from the linux distro that you want (not sure about debian) into the mount point >From the machine containing the distro: rsync -azvu /{dev,var,etc,,usr,bin,sbin,lib,srv,boot} <dom0>:/mnt/mydomu 4. Back on dom0: mkdir /mnt/mydomu{proc,sys,home,tmp,media,mnt} 5. cd /mnt/mydomu/etc and edit HOSTNAME and hosts to a non duplicate machine that does exist on your network and fstab. In fstab you define the drives that you want the domu to use just like you would if it was a real machine. The biggest difference is that all of the files and directories will all be on the / partition. The can be any normal drive the system will recognize such as /dev/sda1, /dev/hda1 etc. /dev/hdb1 / reiserfs acl,user_xattr 1 1 /dev/hdb2 swap swap pri=42 0 0 Be sure and make a note of what you set your / drive to (and swap if you use it). Here is my real domu fstab file: /dev/sda1 / reiserfs acl,user_xattr 1 1 /dev/sda2 swap swap pri=42 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 proc /proc proc defaults 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 sysfs /sys sysfs noauto 0 0 /dev/cdrom /media/cdrom subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0 /dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0 6. Unmount the drive containing your domu files: umount /mnt/mydomu 7. cd to your xen configuration directory: cd /etc/xen 8. Edit the config file for the domu (this is shortened for purposes of this email) disk = [ 'phy:dev/hdb4,hdb1,w', #here hdb4 is the partition holding the domu files and directories (the one we had mounted to /mnt/domu, sda1 is the disk I defined in the /mnt/mydomu/etc/fstab file 'phy:dev/hdb?,hdb2,w' ] #here sda? is whatever partition I want to use for swap, sda2 is the disk I defined in the /mnt/mydomu/etc/fstab file root = "/dev/hdb1 ro" #this is the sda1 referred to above which is also the / defined in the domu fstab file Here is my real config for the drives: disk = [ 'phy:system/jslittl-xen,sda1,w', 'phy:system/jslittl-swap,sda2,w' ] root = "/dev/sda1 ro" If the rest of you config file is setup correctly you should be good to go. HTH, John Little Hendricks Regional Health IS Department 317-718-4752 jslittl@xxxxxxxxxxxxx http://www.hendrickshospital.org _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |