Powered by Typecho)))
Optimized by EAimTY
如何在 Ubuntu Linux 16.04 LTS 服务器上无需完整安装即可创建虚拟机?如何在 Ubuntu Linux 上使用 KVM 云镜像?
基于内核的虚拟机(KVM)是 Linux 内核的虚拟化模块,可将其转变为虚拟机管理程序。你可以在命令行使用 Ubuntu 为 libvirt 和 KVM 提供的虚拟化前端通过 KVM 创建 Ubuntu 云镜像。
这个快速教程展示了如何安装和使用 uvtool,它为 Ubuntu 云镜像下载,libvirt 和 clout_int 提供了统一的集成虚拟机前端。
环境:Scientific Linux 6.1 64bitKVM:qemu-kvm-0.12.1.2
问题:1:迁移kvm的时候遇到的。在源机器上,镜像文件实际占用的空间和申请空间是不一样的。但cp镜像文件到新机器,发现就直接把申请空间当占用空间了。解决:cp --sparse=always 2:虚拟机的镜像路径改动过。启动不了
error: unable to set security context 'system_u:object_r:svirt_image_t:s0:c56,c391' on '/data/vmachines/ubuntu.luo.img': No such file or directory
系统默认会在/var/lib/libvirt/下面保存数据~so,删掉/var/lib/libvirt/qemu/save下面的东东即可(当然会丢失数据)
完美的解决办法:先关掉虚拟机。再重新启动
参考:http://www.ibm.com/developerworks/cn/linux/l-cn-mgrtvm2/index.html
一些KVM的工具集https://github.com/ghoneycutt/puppet-kvm
https://github.com/aidanshribman/qemu-kvm
https://github.com/ptman/kvmmgr
https://github.com/lvidarte/kvmctl
https://github.com/jagane/qemu-kvm-livebackup
https://github.com/serverhorror/python-kvmctl
https://github.com/tstafford/Simple-image-based-kvm-virsh-backup-scrip
thttp://stefan.hoefer.ch/node/3