Ask Your Question
1

windows qcow image is 0 length

asked 2014-12-10 09:25:09 -0500

patrickt33 gravatar image

Following the instructions here: http://docs.openstack.org/image-guide...

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.

edit retag flag offensive close merge delete

Comments

Virtio Drivers installed don't work with you version of Windows 7.

dbaxps gravatar imagedbaxps ( 2014-12-10 09:42:55 -0500 )edit

Getting the same results for 2012 R2 64 bit, Win7 ultimate and win7 pro. Is it the SP1 that's not supported? Is their a support list for virtIO, I can't find one.

patrickt33 gravatar imagepatrickt33 ( 2014-12-10 10:01:03 -0500 )edit

Try stable branch not recent http://alt.fedoraproject.org/pub/alt/...

virtio-win-0.1-81.iso
dbaxps gravatar imagedbaxps ( 2014-12-10 10:11:57 -0500 )edit

Can you try to install with out virt-io and then install driver after the installation is complete

anantha gravatar imageanantha ( 2014-12-12 00:28:56 -0500 )edit

4 answers

Sort by ยป oldest newest most voted
2

answered 2014-12-12 10:53:23 -0500

patrickt33 gravatar image

I found the solution. I looked at the details of the running machine and noticed that the storage format was "raw".

image description

So, it was only seeing the actual size of the file. I changed that to qcow2 and rebooted and it was able to see the disk properly. I then edited my cmd line to add format=qcow2 to the --diskpath for the qcow image. Now it loads properly.

--disk path=win7sp1.qcow2,format=qcow2,device=disk,bus=virtio

Now, I've copied and pasted at least a dozen of examples and not a single one included that statement. So how, in God's name, has this EVER worked for ANYone???

edit flag offensive delete link more

Comments

Syntax "--disk path=win7sp1.qcow2,format=qcow2,device=disk,bus=virtio" is not the unique working for virt-install. BTW. Virt-Manager works fine with "Virtio"&&"raw"

dbaxps gravatar imagedbaxps ( 2014-12-12 11:21:44 -0500 )edit

It did not work for me, as you can see from my screenshots. I had to specify the format or the disk came up with 0 MB available. I don't know why.

patrickt33 gravatar imagepatrickt33 ( 2014-12-12 11:43:14 -0500 )edit

Here, follows the answer , I created target image with command :-

qemu-img create -f qcow2 win7.img 15G

and afterwards everything went fine . It's the way Virt-manager creates initial image

dbaxps gravatar imagedbaxps ( 2014-12-12 11:48:31 -0500 )edit

You problem and pain goes from command:-

$qemu-img create -f qcow2 win7_sp1.qcow2 10G

which requires "--disk path=win7sp1.qcow2,format=qcow2,device=disk,bus=virtio"
Otherwise, your syntax is not required. Just not enough experience with Virt-Manager tricks

dbaxps gravatar imagedbaxps ( 2014-12-12 11:51:36 -0500 )edit

I also have to notice that snapshot 5 from 9 in link submitted to you contains "Virtio"&&"raw" on Virt-manager configuration page and leads to success. It has nothing to do with your problem "uploading virtio drivers from CD", however doesn't create desired format.

dbaxps gravatar imagedbaxps ( 2014-12-12 11:55:38 -0500 )edit
1

answered 2014-12-10 10:22:26 -0500

dbaxps gravatar image

updated 2014-12-11 13:58:20 -0500

Here is archive link :- http://alt.fedoraproject.org/pub/alt/...
Start testing with 81 with release decreasing.
Installed Win7 (Evaluation copy) via Virt-Manager with stable (81) version virtio-win-0.1-81.iso drivers allocating 20 GB, in 10 min or less
http://bderzhavets.blogspot.com/2014/...
Speed is really exciting on CentOS 7. I got a chance to test virt-install , it works as well

virt-install --connect qemu:///system \
    --name WIN7KVM --ram 2048 --vcpus=2 --cpuset=auto \
    --disk path=/var/lib/libvirt/images/win7.img,bus=virtio \
    --network=network=openstackvms,model=virtio,mac=RANDOM  \
    --graphics vnc,port=5903 \
    --disk device=cdrom,path=/home/boris/isos/virtio-win-0.1-81.iso  \
    --disk device=cdrom,path=/home/boris/isos/Win7.iso \
    --os-type=windows --os-variant=win7 --boot cdrom,hd

image description

edit flag offensive delete link more

Comments

Been through every one. All show a 0.0 MB disk. Is there just a place to download pre-made images?

patrickt33 gravatar imagepatrickt33 ( 2014-12-10 14:29:29 -0500 )edit

Also, I can't find this "eval" copy talked about. Last I saw, since 8 came out it can no longer be downloaded. I fail to see why that would make a difference between loading a driver or not, but I suppose stranger things have happened. Do I need to find a non-SP1 disk?

patrickt33 gravatar imagepatrickt33 ( 2014-12-12 09:49:02 -0500 )edit

Well, tried it with a non-sp1 iso to no avail. This is maddening, apparently any 3rd grader can do this in their sleep while I can't make work with 20 years IT experience. How in the hell is this not working?

patrickt33 gravatar imagepatrickt33 ( 2014-12-12 10:08:38 -0500 )edit

@patrickt33,Virt-install works fine as well as virtio-win-0.1-81.iso. Look at my syntax. Create image under /var/lib/libvirt/images/ as root && reproduce instructions from
http://bderzhavets.blogspot.com/2014/... with SP1 disk as normal user

dbaxps gravatar imagedbaxps ( 2014-12-12 10:13:00 -0500 )edit

Don't forget : yum -y groupinstall "Virtualization". Qemu&&Libvirt&&Virt-install&&Virt-Manager should be installed all together. Of course for you : --network=network=default

dbaxps gravatar imagedbaxps ( 2014-12-12 10:17:14 -0500 )edit
0

answered 2014-12-12 00:30:34 -0500

anantha gravatar image

I am not sure whether it helps.

install with out using virt-io and once the installation is complete try installing drivers.

edit flag offensive delete link more

Comments

Please, clarify why standard virt-install with loading Virtio Drivers might not help. It has been done thousands of times with no problems with correct drivers. If driver is a problem your suggestion won't help either.

samfrid gravatar imagesamfrid ( 2014-12-12 00:43:52 -0500 )edit
0

answered 2014-12-30 00:22:24 -0500

I verified that the format=qcow2 method above is a good fix. submitted bug to openstack. https://bugs.launchpad.net/openstack-manuals/+bug/1406466 (https://bugs.launchpad.net/openstack-...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-12-10 09:25:09 -0500

Seen: 1,308 times

Last updated: Dec 12 '14