openstack windows鏡像製作

來源:互聯網
上載者:User

標籤:openstack windows鏡像

用kvm-img建立一個10G大小的鏡像檔案: 
kvm-img create -f qcow2 win2008.img 10G 

因為windows沒有預設的virtio驅動,所以先下載 
wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-15.iso 
wget http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.vfd 

啟動kvm,映射驅動vfd到磁碟片A 
kvm -m 1024 -cdrom en_windows_server_2008_r2_dvd.iso -drive file=win2008.img,if=virtio,boot=on -fda virtio-win-1.1.16.vfd -boot d -nographic -vnc :1 
用vnc訪問安裝,在安裝的時候需要選擇一下硬碟驅動,安裝好以後,停掉虛擬機器,重新用以下命令啟動 
kvm -m 1024 -drive file=win2008.img,if=virtio,boot=on -cdrom virtio-win-0.1-15.iso -net nic,model=virtio -net user -boot c -nographic -vnc :1 
再用vnc訪問,應該會提示自動安裝好了virtio的網卡驅動 

用glance添加這個鏡像,指定格式為qcow2 
glance add -A your_glance_token name="win2008" is_public=true disk_format=qcow2 < win2008.img 

這樣就完成了 

openstack windows鏡像製作

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.