|
|
|
|
|
|
|
|
|
|
xen-bugs
[Xen-bugs] [Bug 1430] Failed to start guest with qcow/qcow2 image agains
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1430
------- Comment #5 from rstonehouse@xxxxxxxxxxxxxx 2009-06-02 08:00 -------
(As per comment #3) this affected my work-flow as well - so I investigated a
little further.
You can get messages from blktap/tapdisk by altering /etc/syslog.conf to log
debug messages.
The problem is that the empty qcow file is exactly 8K. Unfortunately the size
rounding in this function (for 512 byte aligned direct I/O) rounds 8192 to 8704
xen-unstable.hg/tools/blktap/block-qcow.c
lseek(fd, 0, SEEK_SET);
l1_table_block = l1_table_size + s->l1_table_offset;
l1_table_block = l1_table_block + 512 - (l1_table_block % 512);
ret = posix_memalign((void **)&buf2, 4096, l1_table_block);
if (ret != 0) goto fail;
if (read(fd, buf2, l1_table_block) != l1_table_block) {
goto fail;
}
It can be corrected in the source as
l1_table_block = l1_table_block + 511 - (l1_table_block % 512);
OR
l1_table_block = ROUNDUP(l1_table_block, 512)
A very easy fix is just to pad your qcow file like this:
dd bs=512 count=0 seek=17 if=/dev/zero of=linux-0.2.qcow
--
Configure bugmail:
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs
|
|
|
|
|