openstack qcow2 鏡像檔案製作_PHP教程

來源:互聯網
上載者:User

openstack qcow2 鏡像檔案製作


一: Linux 鏡像檔案產生

A. 橋接網路裝置指令碼
[root@app10-051 ~]# cat /etc/qemu-ifup
#!/bin/bash
# 橋接網路裝置
switch=br0
if [ -n $1 ];then
ip link set $1 up
brctl addif ${switch} $1
exit 0
else
echo "no interface!"
exit 1
fi
建立qcow2檔案
qemu-img create -f qcow2 centos_6.5.qcow2 20G

製作linux鏡像
/usr/libexec/qemu-kvm -m 1024 -cdrom iso/CentOS-6.5-x86_64-minimal.iso -drive file=centos6.5-30G.qcow2,if=virtio -net nic,model=virtio -net tap,script=no -boot d -nographic -vnc :0

啟動已製作的linux鏡像
/usr/libexec/qemu-kvm -m 4096 -drive file=CentOS6.5-x86_64-30G.qcow2,if=virtio -net nic,model=virtio -net tap -nographic -vnc :0

二:製作windows鏡像

/usr/libexec/qemu-kvm -m 2048 -cdrom iso/cn_windows_7_ultimate_x64_dvd_x15-66043.iso \
-drive file=virtio-win-0.1-74.iso,media=cdrom -drive file=win7.qcow2,if=virtio \
-net nic,model=e1000 -net tap,ifname=tap2,script=no -boot d -nographic -vnc :2





http://www.bkjia.com/PHPjc/1067479.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1067479.htmlTechArticleopenstack qcow2 鏡像檔案製作 一: Linux 鏡像檔案產生 A. 橋接網路裝置指令碼 [root@app10-051 ~]# cat /etc/qemu-ifup #!/bin/bash # 橋接網路裝置 switch=br0 if [...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.