vSphere Storage Appliance

 View Only
  • 1.  VMDK size after snapshot

    Posted Sep 29, 2010 10:17 AM

    Hi,

    I think I misunderstand a snapshot releated feature.

    We have made a snapshot to reduce VM total space and remove all previous one (so VM is about hard drive total space + few log files).

    When restarting the VM, the file :

    Vm02-000001.vmdk

    is growing in a few minutes from 1 MB to 800MB.

    Hard drive structure can't change so much in a short time (Windows Update just done before shutdown).

    So why this file getting so big so quick ?

    Thanks,

    Vincent



  • 2.  RE: VMDK size after snapshot

    Posted Sep 29, 2010 10:27 AM

    Hi

    So you created a snapshot in the belief it will reduce your vm's total space? Snapshots don't reduce space. Snapshots take a moment in time record of the state of your vm and then everything add and changed on that vm will be recorded in the snapshot until you delete/commit the snapshot back to the vm. Are you not thinking of thin provisioning your vmdk files?

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

    Gregg Robertson, VCP3,4 , MCSE, MCSA, MCTS, MCITP



  • 3.  RE: VMDK size after snapshot

    Posted Sep 29, 2010 11:28 AM

    Since there's no previous state before snapshot, I was thinking that snapshot differential should be near 0 size and then only it will grow with new changes & files.

    Maybe I was wrong :/

    So if we delete the only snapshot, it wont take much more space than drive pre-allocate space ?

    Are you not thinking of thin provisioning your vmdk files[/quote]

    can you be more precise ? hard drive is pre allocateto its total size.

    We can't expand storage so I think I won't keep snapshots for productions VMs on this server :/



  • 4.  RE: VMDK size after snapshot

    Posted Sep 29, 2010 11:35 AM

    If you use storage VMotion in vSphere you can change your vmdk from it's thick sizing to a thin provisioned disk which only uses up the actual space that has been written to the hard drive/s of the vm.

    http://denitrified

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

    Gregg Robertson, VCP3,4 , MCSE, MCSA, MCTS, MCITP



  • 5.  RE: VMDK size after snapshot

    Posted Sep 30, 2010 06:47 AM

    @firestartah : is this possible without VMotion (only one phisical server) ?

    @AWo :

    "Snapshots set the base .vmdk file (your virtual disk) in a read-only

    modus and all changes are kept in a new file, your "Vm02-000001.vmdk".

    So this file keeps the delta between the read-only base file and the

    actual state of the guest. That's why it is growing."

    If we shutdown the VM and then make the snapshot. The new delta file should be small because there's no previous state to get delta wtih ? I understand this file will grows up in the time but just restarting the VM should not increase this file so big ?



  • 6.  RE: VMDK size after snapshot

    Posted Sep 30, 2010 08:30 AM

    Unfortunately vMotion requires more than one host to be able to migrate between so if you only have one host then sadly it's not possible.

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

    Gregg Robertson, VCP3,4 , MCSE, MCSA, MCTS, MCITP



  • 7.  RE: VMDK size after snapshot

    Posted Sep 30, 2010 08:48 AM

    If we shutdown the VM and then make the snapshot. The new delta file should be small because there's no previous state to get delta wtih ? I understand this file will grows up in the time but just restarting the VM should not increase this file so big ?

    Yes.


    AWo

    VCP 3 & 4

    \[:o]===\[o:]

    =Would you like to have this posting as a ringtone on your cell phone?=

    =Send "Posting" to 911 for only $999999,99!=



  • 8.  RE: VMDK size after snapshot

    Posted Sep 30, 2010 08:34 AM

    I was thinking that snapshot differential should be near 0 size and then only it will grow with new changes & files.

    Yes, it won't be exactly 0 but it will grow only with changes.

    So if we delete the only snapshot, it wont take much more space than drive pre-allocate space ?

    Yes, the remaining base .vmdk.

    can you be more precise ? hard drive is pre allocateto its total size.

    You can use thin provisioned drives. These virtual disks do not allocate all space while they are created but grow by usage. From time to time you can reduce their size again to release space which is free in the virtual disk.

    We can't expand storage so I think I won't keep snapshots for productions VMs on this server :/

    Good idea. Snapshots have most of the time a temporary character.


    AWo

    VCP 3 & 4

    \[:o]===\[o:]

    =Would you like to have this posting as a ringtone on your cell phone?=

    =Send "Posting" to 911 for only $999999,99!=



  • 9.  RE: VMDK size after snapshot

    Posted Sep 29, 2010 11:01 AM

    >We have made a snapshot to reduce VM total space and remove all previous one (so VM is about hard drive total space + few log files).

    When you take snapshot all VM disks (except independent-persistent) become forzen and all changes are witeen to -delta files, so you can not reduce disk usage with snapshots, because snapshots lead to increased usage, not reduced.


    ---

    MCITP: SA+VA, VCP 3/4, VMware vExpert

    http://blog.vadmin.ru



  • 10.  RE: VMDK size after snapshot
    Best Answer

    Posted Sep 29, 2010 11:01 AM

    Snapshots set the base .vmdk file (your virtual disk) in a read-only modus and all changes are kept in a new file, your "Vm02-000001.vmdk". So this file keeps the delta between the read-only base file and the actual state of the guest. That's why it is growing.

    When you delete the snapshot all changes of that delta file are written back to your base .vmdk to keep the changes. If you want to go back to the point where you took the snapshot, the delta file gets deleted, the virtual guest is set back to the state stored in the base file and a new delta file gets generated to keep the new changes.

    The snapshot is not used to shrink the base disk. BTW shrinking is only possible when you have created the base disk as a thin provisioned file.

    With vSphere you need to have sVmotion to shrink a thin provisioned disk by moving it from one datastore to another or by cloning the guest and choosing that the clone should use a thin provisioned disk as the target. You should run "sdelete" from the sysinternal tools suite before doing so, so that the guest OS really releases previously used data blocks.


    AWo

    VCP 3 & 4

    \[:o]===\[o:]

    =Would you like to have this posting as a ringtone on your cell phone?=

    =Send "Posting" to 911 for only $999999,99!=