I am trying to install Win2k8 Std as a KVM guest on Debian Squeeze.

As you can see from these screen shots;

  1. No drives are detected (I have blanked out a 20GB image for testing) - screenshot1
  2. I am using this driver CD: - screenshot2
  3. I have signed the Win7 driver (I assume this was the most appropriate one?) - screenshot3
  4. I can now see an unpartitioned drive - screenshot4
  5. But I can't create a new partition on here, getting the error code 0x80070013 - screenshot5

I have had this error code before but only on a physical server. If I remember correctly it was complaining because the disks were partitioned as GPT (because it was a server that was being re-purposed) so repartitioning with an MS-DOS table fixed that. This is a blank disk image though. What is wrong here, and how can I correct this?

Thank you.


I have booted the VM with a Gparted-Live disk and formatted this volume with an MS-DOS partitioning scheme, and a single 20GB NTFS file system. Now when I boot the Win2k8 CD, load my drivers, I get a different error. As you can see at the bottom of screenshot6

"Windows cannot be installed on this hard drive space. Windows must be installed to a partition formatted as NTFS".

Clicking format produces the error (0x80004005) on the screen, so I think this is still a driver issue because Windows can see the drive but not interact with it properly. Is that insane thinking?

  • 1
    What happens if you remove any partitions from the windows installer, and lets it create them itself? – Frederik Nielsen Sep 3 '12 at 18:24
  • Sadly this isn't working, I have deleted the NTFS partition with a Gparted live CD and now I get the same error as in screenshot5 :( – jwbensley Sep 3 '12 at 18:37

After a LOT of Googling, I learned that 0x80070013 means: The media is write-protected. Make sure you didn't set the hard drive as read-only when you configured the virtual machine.

  • I don't think that is my problem as I have been able to reformat the drive with a Gparted Live CD? – jwbensley Sep 4 '12 at 9:09
  • I think you should try @cstamas's answer. That's exactly how I always install Windows in a KVM virtual machine and it 100% works. – Michael Hampton Sep 4 '12 at 9:11
  • Whilst this is not entirely the correct answer, You lead me in the right direction. After reading this I was convinced it was a problem with the disk, but not that it was write protected. I think I needed to erase the image and make a new one, instead I deleted the VM definition, image, and everything, and started fresh. Now it's working. I think the disk I created originally (through an external tool/script) didn't have the correct geometry (the new ones has a different heads and sectors count). Cheers. – jwbensley Sep 4 '12 at 10:55

That (VERY UNHELPFUL) error means you forgot to put the Windows install disk back in.

  • As its a virtual machine, the ISO is always mounted. – jwbensley Sep 3 '12 at 17:49
  • Didn't you replace the install ISO with the driver ISO at some point? – Kenny Rasschaert Sep 3 '12 at 17:50
  • No, I have configured it with 2 CD drives, one with each ISO in. – jwbensley Sep 3 '12 at 17:52
  • 1
    I wanted to be sure it didn't have anything to do with the install ISO. So I just tried replicating your issue by trying the installation on KVM with two IDE cd drives, but mine is installing fine after loading the drivers. – Kenny Rasschaert Sep 3 '12 at 18:30
  • 1
    let us continue this discussion in chat – Kenny Rasschaert Sep 3 '12 at 18:46

The way I did it is the following:

  1. I overwritten the disk image (when the VM was down) by hand just to be sure.

    qemu-img create -f raw disk0 40G
  2. I chose ide as a disk type.

  3. Did the install as normal, ide drivers are integrated in the installer.
  4. After completing the install I mounted the CD with virtio drivers and added a new disk with a virtio type.

    # socat - UNIX-CONNECT:/var/run/ganeti/kvm-hypervisor/ctrl/somehost.monitor
    (qemu) pci_add auto storage file=somedisk,if=virtio
  5. The new hardware found dialog came up and I installed the driver successfully.

  6. Starting the VM again with the main disk (the 2nd disk in not needed anymore) in virtio mode should work.
  • Interesting. I wouldn't even have considered anything like this because I'd think the Windows HAL wouldn't like it and would throw a BSOD. Glad to know about this approach. – Kenny Rasschaert Sep 4 '12 at 10:39
  • This is a good idea I have seen a few people use, +1 for posting it here for others to see I know it does work :) – jwbensley Sep 4 '12 at 10:52
  • It depends on the installer if it accepts the virtio drivers or not at install time. I have one which does and another one which does not. That's why I do it this way. – cstamas Sep 4 '12 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.