码迷,mamicode.com
首页 > 其他好文 > 详细

虚拟机Q&A

时间:2015-07-07 18:57:33      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

Q1:虚拟机运行一段时间后,各个版本的第一台虚拟机容量变大,增大容量可以接受

原因:不详

解决方法:用备份镜像替换当前镜像

1.1G Jun 24 17:07 win7_sp1_32_0.qcow2
1.5G Jun 24 17:07 win7_sp1_32_1.qcow2
1.2G Jun 24 17:07 win7_sp1_32_2.qcow2
651M Jun 24 17:07 win7_sp1_32_3.qcow2
3.6G Jun 24 17:08 win7_sp1_32_backup.qcow2
631M Jun 24 17:08 winxp_sp2_0.qcow2
1.1G Jun 24 17:08 winxp_sp2_1.qcow2
1.1G Jun 24 17:09 winxp_sp2_2.qcow2
1.1G Jun 24 17:09 winxp_sp2_3.qcow2
1.1G Jun 24 17:09 winxp_sp2_4.qcow2
1.1G Jun 24 17:09 winxp_sp2_5.qcow2
2.4G Jun 24 17:09 winxp_sp2_cn_backup.qcow2
350M Jun 24 17:10 winxp_sp3_0.qcow2
1.1G Jun 24 17:10 winxp_sp3_1.qcow2
1.1G Jun 24 17:10 winxp_sp3_2.qcow2
1.1G Jun 24 17:10 winxp_sp3_3.qcow2
1.1G Jun 24 17:10 winxp_sp3_4.qcow2
1.1G Jun 24 17:10 winxp_sp3_5.qcow2
2.4G Jun 24 17:11 winxp_sp3_cn_backup.qcow2

root 1.3G Jul  7 10:48 win7_sp1_32_0.qcow2
root 1.5G Jul  7 10:45 win7_sp1_32_1.qcow2
root 1.2G Jul  7 10:46 win7_sp1_32_2.qcow2
root 659M Jul  7 10:46 win7_sp1_32_3.qcow2
kvm  3.6G Jun 25 10:14 win7_sp1_32_backup.qcow2
root 1.1G Jul  7 15:06 winxp_sp2_0.qcow2
root 1.1G Jul  7 15:06 winxp_sp2_1.qcow2
root 1.1G Jul  7 15:06 winxp_sp2_2.qcow2
root 1.1G Jul  7 15:06 winxp_sp2_3.qcow2
root 1.1G Jul  7 15:06 winxp_sp2_4.qcow2
root 1.1G Jul  7 15:08 winxp_sp2_5.qcow2
kvm  2.4G Jun 25 10:15 winxp_sp2_cn_backup.qcow2
root 369M Jul  7 14:28 winxp_sp3_0.qcow2
root 1.1G Jul  7 14:27 winxp_sp3_1.qcow2
root 1.1G Jul  7 14:28 winxp_sp3_2.qcow2
root 1.1G Jul  7 10:49 winxp_sp3_3.qcow2
root 1.1G Jul  7 10:48 winxp_sp3_4.qcow2
root 1.1G Jul  7 10:47 winxp_sp3_5.qcow2
kvm  2.4G Jun 25 10:18 winxp_sp3_cn_backup.qcow2

 

Q2:虚拟机执行一段时间后(snapshot-revert操作),恢复快照速度越来越慢,从5秒以内变慢至2min

原因:不详

解决方法:重新define虚拟机(不用替换镜像)

DELETE(){
    for i in {0..5}
    do
    virsh snapshot-delete winxp_sp2_${i} --current
    virsh undefine winxp_sp2_${i}
    virsh snapshot-delete winxp_sp3_${i} --current
    virsh undefine winxp_sp3_${i}
    done
 
    for i in {0..3}
    do
    virsh snapshot-delete win7_sp1_32_${i} --current
    virsh undefine win7_sp1_32_${i}
    done
    # rm -f *
}
 
DEFINE(){
    for i in {0..5}
    do
    virsh define winxp_sp2_${i}.xml
    virsh snapshot-create winxp_sp2_${i} winxp_sp2_${i}_snapshot.xml --redefine --current
    virsh define winxp_sp3_${i}.xml
    virsh snapshot-create winxp_sp3_${i} winxp_sp3_${i}_snapshot.xml --redefine --current
    done
 
    for i in {0..3}
    do
    virsh define win7_sp1_32_${i}.xml
    virsh snapshot-create win7_sp1_32_${i} win7_sp1_32_${i}_snapshot.xml --redefine --current
    done
}

虚拟机Q&A

标签:

原文地址:http://www.cnblogs.com/lunachy/p/4627295.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!