ubuntu-kvm上面deploy qcow2格式虚拟机

ubuntu-kvm完成后,将xxx.qcow2格式的镜像拷贝到ubuntu-kvm这个虚拟机上面去。

1. 若是ubuntu server没有图形界面,可以先安装desktop,参考http://www.cnblogs.com/kex1n/p/5198480.html

安装完成后,参考http://www.howtogeek.com/117635/how-to-install-kvm-and-create-virtual-machines-on-ubuntu/  用xxx.qcow2进行create virtual machine。

(choose how would you like to install the operating system---import existing disk image)。

执行 

$ sudo apt-get install virt-manager

安装virt-manager。

如果不用图形界面而用命令行在kvm虚拟机上创建virtual machine,参考

http://blog.allanglesit.com/2011/03/kvm-guests-using-virt-install-to-import-an-existing-disk-image/

https://help.ubuntu.com/community/KVM/CreateGuests

 

2.   此时启动virtual machine可能会报错,解决办法参考:http://ubuntuforums.org/showthread.php?t=1638708

具体步骤如下:

/etc/libvirt/qemu/youVmname.xml修改:

From   
<devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/storage/vmimages/Windows7_x64-01/qcow2-60GB_HDD1.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>
To
<devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/storage/vmimages/Windows7_x64-01/qcow2-60GB_HDD1.qcow2'/>
      <target dev='hda' bus='ide'/>
    </disk>

3.

# virsh

#connect qemu:///system

 # define /etc/libvirt/qemu/newave.xml

# list --all

# start youVmname

# virt-manager

 

4. OK,剩下的就是配置virtual machine的网络了。

 

转载于:https://www.cnblogs.com/kex1n/p/5201039.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值