3

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.

UPDATE

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?

jwbensley
  • 4,202
  • 11
  • 58
  • 90
  • 1
    What happens if you remove any partitions from the windows installer, and lets it create them itself? – Frederik Sep 03 '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 03 '12 at 18:37

3 Answers3

2

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

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
2

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.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • I don't think that is my problem as I have been able to reformat the drive with a Gparted Live CD? – jwbensley Sep 04 '12 at 09:09
  • I think you should try @cstamas's [answer](http://serverfault.com/a/423993/126632). That's exactly how I always install Windows in a KVM virtual machine and it 100% works. – Michael Hampton Sep 04 '12 at 09: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 04 '12 at 10:55
2

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.
cstamas
  • 6,707
  • 25
  • 42
  • 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 04 '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 04 '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 04 '12 at 11:11