Openstack can not only manage linux virtual machines but also manage windows virtual machines. We have previously created a kvm-based debian6 image. Today we are actually working on windows Image production, taking windows 7 as an example. Www.2cto.com
Primary System Environment: ubuntu12.10 server + kvm
Download the virtio driver. By default, Windows does not support the virtio driver, but the virtio driver is required to manage virtual machines through openstack. Requires two virtio drivers, one is the hard disk, one is the NIC, namely: virtio-win-0.1-30.iso and virtio-win-1.1.16.vfd1
Wget http://autosetup1.googlecode.com/files/virtio-win-1.1.16.vfd2
Wget limit 1.1
Mvcn_windows_7_professional_vl_build_x86_dvd_x15-71025.iso win7.iso creates a win7 image, raw format, size 7G
Www.2cto. com1
Kvm-img create-f raw win7.img 7g start kvm Virtual Machine Based on win7, ing to drive vfd to disk A1
Kvm-m 1024-cdrom win7.iso-drivefile = win7.img, if = virtio, boot = on-fda virtio-win-1.1.16.vfd-boot d-nographic-vnc 10.1.6.228: 8 install win7 with vnc, because the virtio driver is not used by default, the hard disk cannot be identified and needs to be manually selected. The entire process is as follows:
Select www.2cto.com
Select driver
Wait for Installation
Www.2cto.com
Set to enable remote desktop
View the NIC Driver type
Shut down first !!! Start the VM again and run the following command: 1
Kvm-m 1024-drivefile = win7.img, if = virtio, boot = on-cdrom virtio-win-0.1-30.iso-net nic, model = virtio-net user-boot c-nographic-vnc 10.1.6.228: 8
Modify the NIC Driver type
We can see that the NIC Driver type has been replaced and shutdown again !!!
Upload win7 image 1
Glance add name = "windows7" is_public = truecontainer_format = ovf disk_format = qcow2 <win7.img
Set security policies. Because you need to connect to Windows 7 through remote desktop, open port 3389.
It is slow to start a virtual machine named win7 for the first time because the win7 image is transferred from the backup server to the computing node.
Log On Through the vnc on the dashboard
Find a cup thing, that is, the IP address allocated by dhcp does not take effect, then we can manually configure it
Log on to the win7 virtual machine through the built-in mstsc: 10.1.200.4
Success !!!