This article by show according to Lin Feng to provide friendship sponsorship, starting in the mud row World .
In the previous article, I described the installation of the CentOS system in KVM. Next, you'll learn how to install a Windows system in KVM.
Note: In this I am installing Windows Server R2, the hard disk format used must be IDE.
Installing the operating system in KVM is generally divided into three steps:
Create the hard disk required for the virtual machine, using the QEMU-IMG command
To start a virtual machine, use the Virt-install command
Install according to the normal installation system
Now start the first step to create the virtual machine's hard disk. Use the following command:
Qemu-img create-f qcow2 testilanni02.img 15G
Qemu-img info/vhost/ilanni02.img
To create a virtual machine, use the following command:
Virt-install-n ilanni02-r 2048--vcpus=2--os-type=windows--accelerate-c/iso/windows_server_2008_r2/win_server_ 2008_r2_sp1_33in1.iso--disk path=/vhost/ilanni02.img,format=qcow2,bus=ide --network bridge=br0--vnc-- vncport=5992--vnclisten=0.0.0.0--force–autostart
--name the name of the virtual machine
--disk indicates the path of the hard disk
-R Memory allocated to the virtual machine
--vcpus number of CPUs allocated to virtual machines
--os-type the OS type of the virtual machine
--vncport connect the virtual machine's VNC port number
Other options can be viewed through the virt-install–help.
Note that the format of the hard disk must use the IDE format, if not add formatting instructions, the default is Virtio format. If you use the Virtio format, you need to load the Virtio driver.
Start using a VNC client to connect to the virtual machine as follows:
192.168.1.240:5992
Start installing the system now, such as:
The size of the hard drive is the same as the size of the hard drive we created, such as:
After installation, such as: