[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] [Solved] look into VHD VDI from Control Domain in XCP 1.6

  • To: xen-api@xxxxxxxxxxxxx
  • From: George Shuklin <george.shuklin@xxxxxxxxx>
  • Date: Fri, 11 Jan 2013 03:37:40 +0400
  • Delivery-date: Thu, 10 Jan 2013 23:37:59 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

10.01.2013 04:55, Alexandre Kouznetsov ÐÐÑÐÑ:

I can confirm, I have successfully mounted partitions from my VHD VDI under Dom0. Thanks a lot!

El 08/01/13 12:07, George Shuklin escribiÃ:
Ok, here important stuff. When VBD is plugged to dom0, it plugging not
as 'normal' device (with udev attention), but as device in /dev/sm/backend.

Yes, that was important. Where have you learned that occult stuff?

Well, if you want to do something with XCP outside 'run few VMs for internal use', you need to know its internals. Whole stuff around SM, domain management, VHDs and so on is crucial to maintain it in normal state under highload (like my case). So very often its just source code research. Most of the SM part is python, some is shell scripts, lesser part is inside xapi (ocaml, ...sigh). There is only one trusted source of information - the source code.

Here sample log (change uuids on you taste):

xe vbd-create vm-uuid=53c3d878-b60b-48ec-aaac-73f7adf9ab3d
vdi-uuid=5e2c31a5-1d1b-4abe-9892-1fa3bc47b532 device=6
xe vbd-plug uuid=407eb3a6-919f-f605-0883-e12aaa91321d

ls -la /dev/sm/backend/55ea20d2-8611-1121-9e9e-c26b35ac1852/
drwxr-xr-x 2 root root     80 ÐÐÐ  8 21:57 .
drwxr-xr-x 3 root root     60 ÐÐÐ 18 17:40 ..
brw------- 1 root root 253, 0 ÐÐÐ  8 21:57
-rw-r--r-- 1 root root    852 ÐÐÐ  8 21:57
I have done the process as you described.
Got the same result as you, except that I don't have *.attach_info file, only the device file.

What is the relevance of device=6 under vbd-create command? Really did not knew what to put there, I have used device=autodetect, hope XCP is smart enough to clean up everything nicely after I unplug it.

Well, I think 'device' for vbds for dom0 is artifact from earlier days (XCP 1.1 f.e.) which has creating /dev/xvd[a-z] devices during vbd-plug. Now, I think that field means nothing (only for dom0 vbds! for domU it very important thing).

Xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.