When you create a snapshot in VMware Instrastructure (formerly ESX), the server stops updating the .vmdk files. Instead it creates a delta file for each .vmdk file. Any writes are written to the delta file rather than the .vmdk file.
This has a few implications:
- The amount of disk space used will increase (a delta can theoretically grow as large as the original .vmdk).
- Read performance can suffer (both the .vmdk and the delta file will now need to be read).
The delta file is stored with the virtual machine’s configuration file, not with the .vmdk file. So, if you have multiple .vmdk files on different volumes you might be in for a surprise.
In the example below I have a virtual machine called VM-Test. It has two .vmdk files, one in /vmfs/volumes/storage1/VM-Test and one in /vmfs/volumes/storage2/VM-Test. I have shown the directory listings before and after taking a snapshot. As you can see the delta for both .vmdk files is stored in the same directory as the configuration file.
Before the snapshot:
[root@vmsvr /]# cd /vmfs/volumes/storage1/VM-Test
[root@vmsvr VM-Test]# ls -l
total 8651072
-rw-------   1 root    root    268435456 Dec 14 22:08 VM-Test-38405ab5.vswp
-rw-------   1 root    root    8589934592 Dec 14 22:16 VM-Test-flat.vmdk
-rw-------   1 root    root        8664 Dec 14 22:08 VM-Test.nvram
-rw-------   1 root    root         314 Dec 14 22:11 VM-Test.vmdk
-rw-------   1 root    root           0 Dec 14 21:53 VM-Test.vmsd
-rwxr-xr-x   1 root    root        1572 Dec 14 22:08 VM-Test.vmx
-rw-------   1 root    root         252 Dec 14 22:08 VM-Test.vmxf
-rw-r--r--   1 root    root       19089 Dec 14 22:11 vmware.log
[root@vmsvr VM-Test]# ls -l ../../storage2/VM-Test/
total 4194368
-rw-------   1 root    root    4294967296 Dec 14 22:16 VM-Test_1-flat.vmdk
-rw-------   1 root    root         314 Dec 14 22:11 VM-Test_1.vmdk
After creating a snapshot:
[root@vmsvr VM-Test]# ls -l ../../storage2/BC-Test1/
total 4194368
-rw-------   1 root    root    4294967296 Dec 14 22:16 VM-Test_1-flat.vmdk
-rw-------   1 root    root         314 Dec 14 22:11 VM-Test_1.vmdk
[root@vmsvr VM-Test]# ls -l
total 9591296
-rw-------   1 root    root    671088640 Dec 14 22:26 VM-Test-000001-delta.vmdk
-rw-------   1 root    root         248 Dec 14 22:18 VM-Test-000001.vmdk
-rw-------   1 root    root    16777216 Dec 14 22:26 VM-Test_1-000001-delta.vmdk
-rw-------   1 root    root         310 Dec 14 22:18 VM-Test_1-000001.vmdk
-rw-------   1 root    root    268435456 Dec 14 22:08 VM-Test-38405ab5.vswp
-rw-------   1 root    root    8589934592 Dec 14 22:17 VM-Test-flat.vmdk
-rw-------   1 root    root        8664 Dec 14 22:08 VM-Test.nvram
-rw-------   1 root    root    273866015 Dec 14 22:18 VM-Test-Snapshot1.vmsn
-rw-------   1 root    root         314 Dec 14 22:11 VM-Test.vmdk
-rw-------   1 root    root         542 Dec 14 22:18 VM-Test.vmsd
-rwxr-xr-x   1 root    root        1510 Dec 14 22:25 VM-Test.vmx
-rw-------   1 root    root         252 Dec 14 22:25 VM-Test.vmxf
-rw-r--r--   1 root    root       30121 Dec 14 22:25 vmware.log
Post a Comment