[xenpreview-dev] Using SLES10 tools and Virtual Disks

Charles Coffing ccoffing at novell.com
Thu Oct 12 13:13:59 MDT 2006


On Thu, Oct 12, 2006 at 10:33 AM, "Puthiyaparambil, Aravindh" <aravindh.puthiyaparambil at unisys.com> wrote: 
> I am using the SLES10 tools to create paravirtualized SLES10 VMs. My
> method for installing the OS is "Run an OS installation program". For
> virtual disks, I am using a block device which is basically a LUN on a
> SAN which shows up as /dev/sdc. I have made a primary partition
> /dev/sdc1. The block device screen asks me assign a virtual disk (hda)
> to a block device (/dev/sdc1). Should I not be creating /dev/sdc1 but
> pointing hda to /dev/sdc? 

Using /dev/sdc1 as a container for your VM's disk is fine.  From Xen's point of view, whether you put the VM's disk on /dev/sdc, or /dev/sdc1, or within a file somewhere doesn't matter; each are simply a place to store "virtual hda's" blocks.

> Further more the installation program partitions the virtual disk hda
> into /dev/hda1 (root) and /dev/hda2 (swap). I wondering about the
> mechanics of this partitioning because when I try to look at /dev/sdc or
> /dev/sdc1, I don't see it reflected there. So I am a little confused and
> am not sure if I configuring things correctly. Please help me out.

Since you used /dev/sdc1 to store your disk, then there should be a partition table written _within_ /dev/sdc1.

This should show it:
fdisk -l /dev/sdc1

Of course, it's a little harder to work with (mount, etc.) these partitions-within-a-partition from domain 0.  If you want to do that, use kpartx from the multipath-tools package (similar to what /usr/lib/xen/boot/domUloader.py does to bootstrap the VM.)


> BTW, the VMs boot without any issues.

Yep.  Your setup seems sane.

Hth,
Chuck


> Thanks,
> Aravindh Puthiyaparambil 
> Xen Development Team
> Unisys, Tredyffrin PA
> E- Mail:  aravindh.puthiyaparambil at unisys.com
> 
> disk = [ 'phy:/dev/sdc1,hda,w', 'phy:/dev/hda,hdb,r' ]
> memory = 4096
> vcpus = 2
> builder = 'linux'
> name = 'vm2'
> vif = [ 'mac=00:16:3e:c2:34:1e' ]
> localtime = 0
> on_poweroff = 'destroy'
> on_reboot = 'restart'
> on_crash = 'restart'
> extra = ' TERM=xterm' 
> bootloader = '/usr/lib/xen/boot/domUloader.py'
> bootentry = 'hda1:/boot/vmlinuz- xen,/boot/initrd- xen'




More information about the xenpreview-dev mailing list