buried shopno
2010-Nov-05 18:17 UTC
[Xen-users] How to install an Ubuntu DomU on Ubuntu 10.04 Dom0
Hi, I''m a newbie in VM/Xen. As a first step to do some study/experiment on VM, I want to install Ubutnu (10.04) as DomU on top of Ubutu (10.04) Dom0. I need some direction to stat with: - how to install the DomU image - how to configure the network address I''d be greatly thankful to you for providing some useful link to this end. Thank you in advance. Regards, -shopno _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Cemin
2010-Nov-05 19:57 UTC
Re: [Xen-users] How to install an Ubuntu DomU on Ubuntu 10.04 Dom0
Hi .. I''ve made a step by step domU creation .. maybe it would help # cat domU_create_steps.t2t Step by step domU creation 1) Create a directory to put your VMs # mkdir -p /xen/domains/dom1 2) Create a disk and a swap image # dd if=/dev/zero of=/xen/domains/dom1/diskimage.img bs=1024k count=5000 # dd if=/dev/zero of=/xen/domains/dom1/swapimage.img bs=1024k count=512 3) Create a file system to the images # mkfs.ext3 /xen/domains/dom1/diskimage.img # mkswap /xen/domains/dom1/swapimage.img 4) Test if it mounts # mount -o loop /xen/domains/dom1/diskimage.img /mnt/tmp 5) Download a new OS onto virtual disk. In a debian-like system it is possible to use debootstrap(apt-get it). # debootstrap --arch i386 lenny /mnt/tmp http://ftp.debian.org/debian # debootstrap --arch i386 lucid /mnt/tmp http://archive.ubuntu.com/ubuntu/ 6) Some configs # vim /mnt/etc/network/interfaces #To use Specific IP address - edit the /mnt/etc/network/interfaces manually. #To use DHCP, edit and include the following: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # cp -a /lib/modules/2.6.32.25 /mnt/tmp/lib/modules #UNINSTALL NETWORK MANAGER and AVAHI # apt-get remove network-manager avahi-daemon # vim /mnt/tmp/etc/fstab proc /proc proc defaults 0 0 /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 /dev/sda2 none swap sw 0 0 #create a bridge to eth0 /etc/xen/scripts/network-bridge start netdev=eth0 7) Create domU config # vim /etc/xen/dom1 kernel = "/boot/vmlinuz-2.6.32.25" #CHANGE IT TO YOUR VMLINUZ ramdisk = "/boot/initrd.img-2.6.32.25" #CHANGE IT TO YOUR INITRD memory = 512 name = "dom1" vif = [''bridge=xenbr0''] disk [''file:/xen/domains/dom1/diskimage.img,xvda1,w'',''file:/xen/domains/dom1/swapimage.img,xvda2,w''] #DHCP - remove the ip, gateway and netmask lines, and include:# dhcp "dhcp" #ip = "ip add" #gateway = "ip add" #netmask = "255.255.0.0" dhcp = "dhcp" root = "/dev/xvda1 ro" extra = ''4'' 8) Link in the config file so that the Virtal Machine starts on Bootup of Dom0 # ln -s /etc/xen/dom1 /etc/xen/auto/dom1 9) Start up the VM :-) # xm create dom1 -c 2010/11/5 buried shopno <buried.shopno@gmail.com>> Hi, > > I''m a newbie in VM/Xen. As a first step to do some study/experiment on VM, > I want to install Ubutnu (10.04) as DomU on top of Ubutu (10.04) Dom0. > > I need some direction to stat with: > - how to install the DomU image > - how to configure the network address > > I''d be greatly thankful to you for providing some useful link to this end. > Thank you in advance. > > Regards, > -shopno > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- David Cemin mobile: +55 51 93523097 home: +55 51 32763785 email: davidcemin@gmail.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Boris Derzhavets
2010-Nov-05 22:17 UTC
Re: [Xen-users] How to install an Ubuntu DomU on Ubuntu 10.04 Dom0
http://wiki.xen.org/xenwiki/Xen4.0 Tutorials to install Xen 4.0 * Xen 4.0 on Ubuntu 10.04: http://bderzhavets.wordpress.com/2010/04/24/set-up-ubuntu-10-04-server-pv-domu-at-xen-4-0-dom0-pvops-2-6-32-10-kernel-dom0-on-top-of-ubuntu-10-04-server/ Boris. --- On Fri, 11/5/10, David Cemin <davidcemin@gmail.com> wrote: From: David Cemin <davidcemin@gmail.com> Subject: Re: [Xen-users] How to install an Ubuntu DomU on Ubuntu 10.04 Dom0 To: "buried shopno" <buried.shopno@gmail.com> Cc: xen-users@lists.xensource.com Date: Friday, November 5, 2010, 3:57 PM Hi .. I''ve made a step by step domU creation .. maybe it would help # cat domU_create_steps.t2t Step by step domU creation 1) Create a directory to put your VMs# mkdir -p /xen/domains/dom1 2) Create a disk and a swap image# dd if=/dev/zero of=/xen/domains/dom1/diskimage.img bs=1024k count=5000 # dd if=/dev/zero of=/xen/domains/dom1/swapimage.img bs=1024k count=512 3) Create a file system to the images# mkfs.ext3 /xen/domains/dom1/diskimage.img# mkswap /xen/domains/dom1/swapimage.img 4) Test if it mounts# mount -o loop /xen/domains/dom1/diskimage.img /mnt/tmp 5) Download a new OS onto virtual disk. In a debian-like system it is possible to use debootstrap(apt-get it). # debootstrap --arch i386 lenny /mnt/tmp http://ftp.debian.org/debian# debootstrap --arch i386 lucid /mnt/tmp http://archive.ubuntu.com/ubuntu/ 6) Some configs# vim /mnt/etc/network/interfaces #To use Specific IP address - edit the /mnt/etc/network/interfaces manually.#To use DHCP, edit and include the following: # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp # cp -a /lib/modules/2.6.32.25 /mnt/tmp/lib/modules #UNINSTALL NETWORK MANAGER and AVAHI# apt-get remove network-manager avahi-daemon # vim /mnt/tmp/etc/fstab proc /proc proc defaults 0 0/dev/sda1 / ext3 defaults,errors=remount-ro 0 1/dev/sda2 none swap sw 0 0 #create a bridge to eth0/etc/xen/scripts/network-bridge start netdev=eth0 7) Create domU config# vim /etc/xen/dom1 kernel = "/boot/vmlinuz-2.6.32.25" #CHANGE IT TO YOUR VMLINUZ ramdisk = "/boot/initrd.img-2.6.32.25" #CHANGE IT TO YOUR INITRDmemory = 512name = "dom1"vif = [''bridge=xenbr0'']disk = [''file:/xen/domains/dom1/diskimage.img,xvda1,w'',''file:/xen/domains/dom1/swapimage.img,xvda2,w''] #DHCP - remove the ip, gateway and netmask lines, and include:# dhcp = "dhcp"#ip = "ip add"#gateway = "ip add"#netmask = "255.255.0.0" dhcp = "dhcp"root = "/dev/xvda1 ro"extra = ''4'' 8) Link in the config file so that the Virtal Machine starts on Bootup of Dom0 # ln -s /etc/xen/dom1 /etc/xen/auto/dom1 9) Start up the VM :-)# xm create dom1 -c 2010/11/5 buried shopno <buried.shopno@gmail.com> Hi, I''m a newbie in VM/Xen. As a first step to do some study/experiment on VM, I want to install Ubutnu (10.04) as DomU on top of Ubutu (10.04) Dom0. I need some direction to stat with: - how to install the DomU image - how to configure the network address I''d be greatly thankful to you for providing some useful link to this end. Thank you in advance. Regards, -shopno _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -- David Cemin mobile: +55 51 93523097 home: +55 51 32763785 email: davidcemin@gmail.com -----Inline Attachment Follows----- _______________________________________________ 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