WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-bugs

[Xen-bugs] [Bug 1430] Failed to start guest with qcow/qcow2 image agains

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1430] Failed to start guest with qcow/qcow2 image against c/s 19349
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 2 Jun 2009 08:00:13 -0700
Delivery-date: Tue, 02 Jun 2009 08:00:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bug-1430-3@xxxxxxxxxxxxxxxxxxxxxxxxxxx/bugzilla/>
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
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