Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

windows qcow image is 0 length

Following the instructions here:

virt-install successfully boots the windows install CD ISO but after I load the VirtIO drives, the disk is shown as 0.0 mb.

I've gotten the same result trying 2012 or win7. Here are the commands I'm using:

    $qemu-img create -f qcow2 win7_sp1.qcow2 10G
    Formatting 'win7_sp1.qcow2', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536

    $ qemu-img check win7sp1.qcow2 
    No errors were found on the image.
    Image end offset: 262144

    $ qemu-img info win7sp1.qcow2 
    image: win7sp1.qcow2
    file format: qcow2
    virtual size: 10G (10737418240 bytes)
    disk size: 136K
    cluster_size: 65536

    $sudo virt-install --connect qemu:///system --name win7sp1-2 --ram 2048 --vcpus 2 --network network=default,model=virtio --disk path=win7sp1.qcow2,device=disk,bus=virtio --cdrom en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso --disk path=virtio-win-0.1-94.iso,device=cdrom --vnc --os-type windows --os-variant win7

As you can see, the virtIO drivers install image description

But the drive has no space available. image description

This seems pretty simple, I don't see what I'm missing here.