| |
问题描述:
在vmware中使用linux时,为了保证自己编译的结果,用了很多的snapshot,忽然发现有一天空间不够用了,直接导致编译错误退出,然后想着删除,结果删除sanpshot也遇到磁盘空间不够,最奇葩的是,vm明明没有删除那个对应的snapshot,却在snapshot的路径树上删除了,然后进入vmware的工作目录,想去删除,结果发现几乎所有的snapshot都是最近改动的,而且都在运行,疯掉了吧,怎么办,
找了很久:有如下的方法,依据是vmware的snapshort是有继承依赖关系的,所以,当你删除了一个snapshort,其实系统会把对应的那些依赖的无用的东西也删除。
那么好,我们要做的其实比较简单了,就是,首先在这个盘上搞出足够的空间,然后
在你的snapshort的每个分支路径上,新建一个temp的snapshort,然后再删除这个snapshort.
这样以前那些想删除,也就是snapshort列表上没有出现的snapshort也会同时被删除的
Confirm that the virtual machine is not pointing to the base disk. Open the virtual machine configuration file (.vmx) or edit the settings of the virtual machine and see if any of the virtual disks are using a -00000X.vmdk file. If no disks are using-00000X.vmdk, this virtual machine is not using any of these files. Although unlikely, it is possible that another virtual machine is storing its snapshots in this directory. Check the other virtual machines. If none of them refer to these files, they can be safely erased.
Typically, the file is in use by the virtual machine. When a snapshot is deleted, any additional files in the hierarchy that are not identified by the Snapshot Manager are included in the commit process. Creating a new snapshot and deleting it clears the entire hierarchy. This means that all snapshot files on the virtual machine are committed, then deleted
A small amount of free space is required to create the new snapshots. If the virtual machine needs to remain running, more space must be allowed for because the new snapshot grows (accepting new changes to the virtual disks) as the older snapshots commit.
1 http://www.petri.co.il/forums/showthread.php?t=62203