Installing XEN on 11.0, trying to understand disk concept

Dear all,

I’ve been using VMware since ever but try to switch to XEN now. Currently, I’m fighting against the way the openSUSE 11.0 installer thinks things should be done.

I want to have an LVM based disk layout. For this, I have a volume group (VG) named mailsrv2-vg, and within it two logical volumes (LV) named root and data. Plus, a swap file on the host shall be the swap disk in domU. “root” is xvda, “data” is xvdb, and the swap is xvdc. Plus, I need the install DVD, which is xvdj. Therefore, my XEN domU setup is like this:



extra=" root=/dev/xvda install=hd:/dev/xvdj"
        'tap:aio:/disks/daten/openSUSE-11.0-DVD-x86_64.iso,xvdj:cdrom,r', ]
vif= 'mac=00:16:3e:06:fa:bf', ]

I can boot into setup, but even if selecting “german” keyboard it stays english. OK, I can overcome that. But then it comes to partitioning. I can only select “new install”, as an upgrade shows no partitions at all. In “new install”, it shows that all disks are known: xvd[abcj] are available.

But installer absolutely insists that I must create partitions, which I try to prevent: my setup is LVM based, so I do neither want nor need partitions, as we are in virtual world anyway. Also, it would have the disadvantage that I cannot easily mount the disks from dom0. Does somebody have a solution for this?


disk= ‘file:/xen/fdb01/sda1,xvda,w’, ‘phy:/dev/md1,sdb1,w’, ]

See the second disk definition?

This gives me the desired result, but I do not know what happens if you have this at installation time. I added the partition first manually while the domU was running and then made it permanent in the description file. The partition magically popped up as hotplug device.
Do not mount the partitions on the dom0 at the same time, if you value your data!

If you specify the kernel and initrd you can also have the root fs non-partitioned.


That doesn’t work at install time. sda1/sdb1 won’t show up, you only see xvdc/xvdj then.

Mounting Xen DomU disk images in Dom0 using lomount

That description shows to me that I should create partitions on the loopback device. But if you create LVMs within such partitions - how can you mount them on dom0?

XEN: Attaching disk images or raw disks with LVM volume groups in Dom0 for disaster recovery

Gives hints on how to “xm block-attach”, and that gave me the solution:

  1. create the disk file/partition you want to use for domU, either “losetup” or use a real partition
  2. “xm block-attach” the disk file/partition to dom0 as in the Novell howto
  3. create LVM vg/lv there
  4. xm block-detach
  5. setup domU

Easy, if you know it. (I hope this is really the solution now).