克隆虚拟机
1 virsh shutdown test //关闭测试域
2 virsh console test //启动virsh命令想通过3 console命令连接至客户机的终端
3 virt-clone --original test --name test02 --file /kvm_data/test02.img //克隆虚拟机
--original指定克隆源虚拟机
--name指定克隆后的虚拟机名字
--file指定目标虚拟机的虚拟磁盘文件
如果test虚拟机开机状态,则提示先关闭或者暂停虚拟机
关闭虚拟机后,再次进行克隆
[root@kvm ~]# virsh shutdown test
Domain test is being shutdown
[root@kvm ~]# virt-clone --original test --name test02 --file
/kvm_data/test02.img
Allocating 'test02.img' 3%
[= ] 20 M