Install image based guest (sparse file). image-based-guest

How to install virtual machine on image based disk …

I will presume that you have a server running xend on it. In my case I am using CentOS 5.2 and xend 3.0.3. After your xen dom-0 server is ready we need to install dom-u on it. To install dom-u using sparse (image)file. please follow steps listed below.

Also, You need a local repository to install guest os quickly using kickstart method. please follow these two links if you want to prepare your own local yum repository and want to get sample of kickstart file.

  1. Create sparse file using command
    #dd if=/dev/zero of=/home/xenvm01.img bs=1M count=1 seek=4096.
    I am considering that you have enough disk space in /home partition and you want to install a virtual machine under that partition. please use relevent partition as per your choice. After this command completes successfully, you will see a image file xenvm01.img
  2. Now we need to install virtual maching using this image file as disk. use
    #virt-install -p –name=xenvm01 –location= –bridge=xenbr0 –ram=512 –file=/home/xenvm01.img -x “ks=”
  3. After installation is completed, you will able to login to newly installed virtual machine.
    Configuration for this xen guest (dom-U) is stored in /etc/xen/ directory. my configuration file looks like.

    name = “xenvm01”
    uuid = “056a8eb9-c5e8-dc42-1f5a-a048d9a58f74”
    maxmem = 512
    memory = 512
    vcpus = 1
    bootloader = “/usr/bin/pygrub”
    on_poweroff = “destroy”
    on_reboot = “restart”
    on_crash = “restart”
    vfb = [ ]
    disk = [ “tap:aio:/home/xenvm01.img,xvda,w” ]
    vif = [ “mac=00:16:3e:1f:c3:a4,bridge=xenbr0” ]

Share this post

Post Comment