Windows installation:
Qemu-img create-f qcow2 Ws2008-400g-1.qcow2 400G
Virt-install--connect qemu:///system \
--name ws2008-400g-1--ram 8192--vcpus 2 \
--network network=default,model=virtio \
--disk path=/tmp/ws2008-400g-1.qcow2,format=qcow2,device=disk,bus=virtio \
--cdrom/data/iso/cn_windows_server_2008_r2_standard_enterprise_datacenter_web_x64_dvd_x15-50360.iso \
--disk path=/data/iso/virtio-win-0.1-100.iso,device=cdrom \
--vnc--os-type Windows--os-variant win2k8
Note Select the driver for the Win7
Select keyboard mode for en_US
Initial password: [email protected] [email protected]
Turn Remote Desktop on: Remote settings, my computer, allow any user to log on remotely
Complete the VirtIO drivers installation by running the following command:
C:\pnputil-i-a e:\win8\amd64\*. Inf
To allow Cloudbase-init to run scripts during an instance boot, set the PowerShell exe-
Cution policy to be unrestricted:
C:\powershell
C:\Set-ExecutionPolicy Unrestricted
Copy files: Cloudbaseinit.msi files can be copied by mounting a virtual optical drive:/data/iso/cloudbaseinit.iso
Run Cloudbaseinit.msi
Remove use metadata password,
In the Configuration Options window, change the following settings:
? Username:administrator
? Network adapter to configure:red Hat VirtIO Ethernet Adapter
? Serial Port for Logging:com1
When the installation was done, the Cloudbase-init Setup Wizard win-
Dow, select the Run Sysprep and Shutdown check boxes and click Finish.
Glance image-create--name WS2008--disk-format qcow2 \
--container-format bare--is-public true \
--file/tmp/ws2008-400g.qcow2
This article is from the "Yuweibing Technology blog" blog, make sure to keep this source http://yuweibing.blog.51cto.com/3879355/1656453
Windows Server 2008 Image Authoring