標籤:windows kvm 爛泥 安裝 windows server 2008 r2 系統
本文首發於爛泥行天下。
在前一篇文章中,我介紹了有關在KVM中的安裝Centos系統。接下來,就來介紹如何在KVM中安裝Windows系統。
注意:在此我安裝的是windows server 2008 R2,使用的硬碟格式一定要是IDE。
在KVM中安裝作業系統一般是分為三步:
建立虛擬機器所需要的硬碟,使用qemu-img命令
開始虛擬機器,使用virt-install命令
按照正常安裝系統,進行安裝
現在開始第一步,建立虛擬機器的硬碟。使用如下命令:
qemu-img create -f qcow2 testilanni02.img 15G
qemu-img info /vhost/ilanni02.img
650) this.width=650;" title="clip_image001" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image001" src="http://img1.51cto.com/attachment/201407/27/526870_14064453419Yl4.png" width="727" height="157" />
下面開始建立虛擬機器,使用如下命令:
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虛擬機器的名稱
--disk表示硬碟的路徑
-r 分配給虛擬機器的記憶體
--vcpus 分配給虛擬機器的cpu個數
--os-type 該虛擬機器的OS類型
--vncport 串連該虛擬機器的VNC連接埠號碼
其他的選項可以通過 virt-install –help進行查看。
注意其中硬碟的格式一定要使用IDE格式,如果沒有添加格式說明的話,預設是virtio格式。如果使用virtio格式的話,需要載入virtio驅動。
650) this.width=650;" title="clip_image002" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image002" src="http://img1.51cto.com/attachment/201407/27/526870_14064453416rbB.png" width="1187" height="155" />
開始使用VNC用戶端串連虛擬機器,如下:
192.168.1.240:5992
650) this.width=650;" title="clip_image003" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image003" src="http://img1.51cto.com/attachment/201407/27/526870_1406445342aH2R.png" width="476" height="156" />
現在開始安裝系統,如:
650) this.width=650;" title="clip_image004" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image004" src="http://img1.51cto.com/attachment/201407/27/526870_1406445342UENX.png" width="1034" height="732" />
650) this.width=650;" title="clip_image005" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image005" src="http://img1.51cto.com/attachment/201407/27/526870_1406445343pL3b.png" width="1060" height="764" /> 650) this.width=650;" title="clip_image006" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image006" src="http://img1.51cto.com/attachment/201407/27/526870_1406445344ZFXd.png" width="1060" height="764" />
650) this.width=650;" title="clip_image007" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image007" src="http://img1.51cto.com/attachment/201407/27/526870_1406445345jquC.png" width="812" height="656" /> 650) this.width=650;" title="clip_image008" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image008" src="http://img1.51cto.com/attachment/201407/27/526870_1406445347MNoq.png" width="818" height="660" />
650) this.width=650;" title="clip_image009" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image009" src="http://img1.51cto.com/attachment/201407/27/526870_1406445348G8CJ.png" width="820" height="667" />
650) this.width=650;" title="clip_image010" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image010" src="http://img1.51cto.com/attachment/201407/27/526870_1406445349x7zn.png" width="815" height="657" />
650) this.width=650;" title="clip_image011" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image011" src="http://img1.51cto.com/attachment/201407/27/526870_1406445350sx7g.png" width="813" height="648" />
650) this.width=650;" title="clip_image012" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image012" src="http://img1.51cto.com/attachment/201407/27/526870_1406445352IpQW.png" width="817" height="654" />
顯示硬碟的大小和我們建立硬碟的大小是一樣的,如:
650) this.width=650;" title="clip_image013" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image013" src="http://img1.51cto.com/attachment/201407/27/526870_1406445352m5Ss.png" width="643" height="487" />
650) this.width=650;" title="clip_image014" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image014" src="http://img1.51cto.com/attachment/201407/27/526870_140644535306eg.png" width="646" height="480" />
安裝完畢後,如:
650) this.width=650;" title="clip_image015" style="border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image015" src="http://img1.51cto.com/attachment/201407/27/526870_1406445354sE5W.png" width="820" height="667" />
本文出自 “爛泥行天下” 部落格,請務必保留此出處http://ilanni.blog.51cto.com/526870/1530811