Hello, I''m trying to implement a block device helper script for Xen to automatically connect to iSCSI targets on guest domain setup. Disk declaration is supposed to look like this: disk = [ ''iscsi:/dev/disk/by-path/ip-10.0.0.1:3260-iscsi-iqn.2001-01.ro.test:test3-lun-1,hda,w'' ] The path under /dev/disk is a symlink that udevd automatically creates upon iscsi target login. The symlink points to the real block device, /dev/sdX (where X is the first unused letter it finds). The first issue was that I couldn''t get qemu-dm to setup the disk properly because it failed to figure out what driver to use. The easiest way to fix this that occured to me is this: --- xen-3.4.2/tools/ioemu-qemu-xen/xenstore.c.orig 2010-02-25 14:11:43.000000000 +0200 +++ xen-3.4.2/tools/ioemu-qemu-xen/xenstore.c 2010-02-25 14:12:06.000000000 +0200 @@ -491,6 +491,8 @@ format = &bdrv_raw; } else if (!strcmp(drv,"phy")) { format = &bdrv_raw; + } else if (!strcmp(drv,"iscsi")) { + format = &bdrv_raw; } else { format = bdrv_find_format(drv); if (!format) { Although this solves the problem, I don''t like patching things unless it''s absolutely necessary. Perhaps there is a better approach to this - so I''m kindly asking you for some clues. But the biggest issue seems to be the sequence of events: I guess that first qemu-dm is started (on domU creation) and then the xen hotplug scripts run. This certainly makes sense for network devices (since the tap interface is setup by qemu-dm and needs to be configured by hotplug afterwards), but apparenly leaves no choice for setting up block devices *before* qemu-dm starts. Is there any way I could hook into domU setup before qemu-dm starts? I''d also like to make this work with live migration: when domU migrates, the iscsi target needs to be setup on the destination dom0. I''m not subscribed to the list, so I''m kindly asking you to cc my address if replying. TIA, Radu Rendec _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel