Cannot install windows guest using virt-install

virt-installvirtual-machines

I am trying to install a windows guest (Windows Sever 2012 64-bit) on my CentOS 6.4 64-bit system using virt-install command.

Command:
/usr/sbin/virt-install --graphics vnc,port=5903,listen=127.0.0.1,password=redhat --noautoconsole --name=myos2 --ram=1024 --arch=x86_64 --vcpus=1 --hvm --disk path=/media/skrtbhtngr/wins2012,size=32 -m 66:55:44:33:22:00 --location=/root/Desktop/OS_Images/en_windows_server_2012_x64_dvd_915478.iso

Output:
Starting install...
ERROR Could not find an installable distribution at '/root/Desktop/OS_Images/en_windows_server_2012_x64_dvd_915478.iso'
The location must be the root directory of an install tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start myos2
otherwise, please restart your installation.

Also, when I use Virtual Machine Manager, the OS installation starts successfully. Now, this happens with all windows guests (Win7 etc…).

What I couldn't figure out where I am wrong?

PS: I am new to the world of virtualization!

Best Answer

I think you want to use --cdrom instead of --location to point to the ISO. Then the VM should boot to the ISO.

http://opennodecloud.com/documentation/howtos/kvm-guests-virt-install-examples/