You doing it wrong.
Use xe vbd-create between vdi and dom0 (which is normal VM mostly), and
xe vbd-plug.
You can see some sample usage in 'xe-edit-bootloader' command (somewhere
in /opt/xensource/)
05.01.2013 04:57, Alexandre Kouznetsov пишет:
Hello.
I'm trying to mount VM's disk within Control Domain, as part of my
pre-production tests. My XCP 1.6 installation uses a LVM based local
storage after a default install. The VM's disks are in VHD format.
In my previous Xen experience, with "raw" volumes as virtual hard
disks, I have successfully used kpartx, with images stored in files
and LVM. Clearly, kpartx can't map partitions of a VHD volume.
Within the XCP installation I have found vhdpartx utility, judging by
it's name and --help output I expected it to be just the tool I need.
But it's seems there is some problem if I try to use it as kpartx:
[root@xcp47 ~]# lvscan
ACTIVE '/dev/VG_XenStorage-cfc7419f-8b4e-8c51-d619-dfdee09841a2/MGT'
[4.00 MB] inherit
ACTIVE
'/dev/VG_XenStorage-cfc7419f-8b4e-8c51-d619-dfdee09841a2/VHD-bbdf149e-4b41-4a6a-9059-9251365a0a86'
[8.02 GB] inherit
ACTIVE
'/dev/VG_XenStorage-cfc7419f-8b4e-8c51-d619-dfdee09841a2/VHD-fd118da1-c3dd-466b-8b27-32c5db1fcce7'
[3.01 GB] inherit
[root@xcp47 ~]# vhdpartx -a
/dev/VG_XenStorage-cfc7419f-8b4e-8c51-d619-dfdee09841a2/VHD-fd118da1-c3dd-466b-8b27-32c5db1fcce7
can't find vhd or lib
[root@xcp47 ~]#
Unfortunately, there is no online man page available in my XCP
installation, and blktap2 documentation mostly covers Xen's config
file syntax to to use with VHD storage.
The idea to treat the VHD as a black box is not appealing at all. Is
there a regular way to access VHD from Dom0? What's wrong with my
vhdpartx, maybe it is supposed to work in a different way?
I have done my search for alternatives and the most promising
reference I've found was one that suggests attaching the VDI (or it's
snapshot) to the Dom0 via a manually created VBD, just as if it was a
regular VM.
http://forums.citrix.com/thread.jspa?threadID=252142
It's quite old, and I did not get that solution work ether: I can do
all the steps, but the disk never showed up within Dom0, even after I
"vbd-plug" it.
Thank you.
_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api