Daily Xen-HVM Builds: cs9226
Quoted 5 lines · Ping Y
Quoted 3 lines
Daniel,
Currently, HVM support multiple disks in QEMU configure, and you can
add
Quoted 6 lines
Quoted 2 lines
extra disks by configuring options in "disk", for example, disk = [ 'file:/var/images/min-el3-i386.img,ioemu:hda,w',
'file:/var/images/min-el3-i386_2.img,ioemu:hdb,w' ]
Quoted 1 line
Does it meet your requirement?
Quoted 6 lines
My requirement for what? I know HVM domains can support more than one disk image, the idea is to get xm-test to automate creating disk images for testing HVM domains. My plan is to eventually is to use device-mapper to present a read only root image, that all the xm-test HVM test domains will share and then add writable partitions as needed to test domains.
Maybe my idea is a little different from yours, for I notice that there are an
"r/w" control bit for image, thus we can make use of it. As you said, we can
present a read only root image and add writeable partition as needed. :-)
Quoted 4 lines
Quoted 4 lines
Currently problem is that strict check is added in VBD and forbid one image for multiple HVM and all those test cases in xm-test failed,
see
Quoted 7 lines
information
Quoted 6 lines
below:
[dom0] Running `xm create
/tmp/xm-test.conf' Using config file "/tmp/xm-test.conf".
Error: Device 768 (vbd) could not be connected. File/opt/vmm/control_panel/xm-test/ramdisk/disk.imgis
loopback-mounted
Quoted 7 lines
through
/dev/loop0,Quoted 6 lines
which is mounted in a guest domain,
and so cannot be mounted now.
Failed to create test domain because:
Using config file "/tmp/xm-test.conf".
Error: Device 768 (vbd) could not be connected. File/opt/vmm/control_panel/xm-test/ramdisk/disk.imgis
loopback-mounted
Quoted 9 lines
through
/dev/loop0,Quoted 4 lines
which is mounted in a guest domain,
and so cannot be mounted now.REASON: Failed to create domain
The vbd issue wasn't that only one image could be loaded for one HVM domain, if that's what you're saying. The issue was exceeding the
number
Quoted 11 lines
of loopback devices on the system. Qemu-dm loads disk images using loopback devices - so you are therefore the number of disk images able to be mounted is limited to the number of configured loopback devices.
There was a bug in
11_create_concurrent_pos.pyin xm-test because it goes and creates as many concurrent domains as possible based on memory and a cutoff of 50. This is fine for para virt, but broke for HVM because of the loopback device limit. I have patched the test and it should work for you. I have run11_create_concurrent_pos.pyon my x366 where I've changed the kernel option max_loop=256 and been able to load 50 disk images all using the same disk image.
Daniel, from my observation, I found that it is not caused by shortage of
loop device number, but VBD protection. If I modify the control bit "w" to "r", xm-test works quite well, and based on that, I will send out a patch to fix xm-test's current problem. Hope you can review it.
Quoted 4 lines
Thanks,
Dan