1

I am working on virtualizing a windows 7 image using kvm on Ubuntu 12.10 64 bit. Here are the specs for my machine:

CPU: Intel i7-2860WM ,8G RAM

I am using an image created with WinImage of a Windows 7 Ultimate 64bit machine.

I am able to create a virtual machine and run it successfully using the "virt-manager" tool. In order for the image to run correctly I must specify the disk bus type as SATA, otherwise when the virtual machine tries to boot I receive a BSOD with an error code of 0x0000007B which pertains to errors initializing the hard disk.

I would like to be able to create/start this virtual machine from the cmd line using kvm instead of using the virt-manager utility. However when I try the following:

sudo kvm -hda Win7.vhd

The machine boots and immediately goes to a BSOD with an error code of 0x0000007B. I need a way from the command line to specify the virtual machine to use a SATA bus. Or so I need to create a virtual SATA bus and have it boot from the Win7.vhd image? Basically I need to be able to specify SATA as the bus option from the command line, but I have not had any luck with this. Any and all thoughts are appreciated!

Bubo
  • 233
  • 1
  • 3
  • 7
  • 1
    I believe you can view the full command to start the guest by running 'ps aux | grep kvm' in a terminal. copy paste the command as an alias. and you should not need to call kvm as root. – Panther Feb 24 '14 at 19:20
  • What do you mean by copy and paste as an alias? Thank you for your response! – Bubo Feb 24 '14 at 19:21
  • 1
    Display the command, it will read kvm .... , add an alias to run it easier, see http://askubuntu.com/questions/1414/how-to-create-a-permanent-alias – Panther Feb 24 '14 at 19:22
  • I will try that, I wasn't sure what you were referring to, but I understand now – Bubo Feb 24 '14 at 19:24

1 Answers1

0

got the same problem as you (very similar), inspired by this source would be:

sudo kvm -M q35 -m 2G -hda Win7.vhd

and going a little bit offtopic, in my case, it was a real HD that I inserted it in my linux through a SATA-usb converter and that got detected as /dev/sdc, so this worked for me:

sudo kvm -M q35 -m 2G -hda /dev/sdc