testvm you are here testvm.vmsd testvm.vmdk testvm-flat.vmdk (5 gb) hard disk for vm allocated: 20gb...

24
TestVM You Are Here napshot Manager View Datastore View TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have any snapshot by default, Snapshot Manager View list same as above, and If you view files of the virtual machine from the storage view tab it list all the files of the virtual machine (I have not listed all files above, only file which will be effected through snapshot is listed). In this Example the VM has 1 HDD (vmdk), allocated size is 20 GB, thin provisioned, Now We have installed the guest operating system , VMware tools, some applications on it. It consume suppose approx. 5 GB so the “TestVM-flat.vmdk” will also be approx. 5 GB. Now we want to test a new application and not sure what will be the affect so we can use VMware snapshot. Snapshot Name: “BaseOS” Example 1

Upload: nia-wakeley

Post on 01-Apr-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

You Are Here

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)

Hard disk for VMAllocated: 20GBThin Provisioned

The Virtual Machine doesn’t have any snapshot by default, Snapshot Manager View list same as above, and If you view files of the virtual machine from the storage view tab it list all the files of the virtual machine (I have not listed all files above, only file which will be effected through snapshot is listed).

In this Example the VM has 1 HDD (vmdk), allocated size is 20 GB, thin provisioned, Now We have installed the guest operating system , VMware tools, some applications on it. It consume suppose approx. 5 GB so the “TestVM-flat.vmdk” will also be approx. 5 GB.

Now we want to test a new application and not sure what will be the affect so we can use VMware snapshot. Snapshot Name: “BaseOS”

Example 1

Page 2: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

You Are Here

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (500 MB)

A .vmsn (snapshot data) file is created which stores the VM configurations and Memory Information, a set of new virtual machine hard disk file is created, now after this snapshot the “flat.vmdk” file will be Read-Only and whatever changes will been done will be on the new “delta.vmdk” file. this file is a splash file which grows in the block of 16MB, (initial size can be 8KB). VM snapshot employ a copy-on-write mechanism(It’s grows as used). Information about the snapshot hierarchy and the files relation is stored and maintained in “.vmsd” file.

If suppose you install an application, and it’s consume about 500 MB disk space, so the “delta.vmdk” file size will be approx. 500 MB. Now suppose your application doesn’t worked, so we want to revert to save state.

Example 1

Page 3: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

You Are Here

Snapshot Manager ViewDatastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (8 KB)

So the files associated with “you are here” will be deleted (TestVM-0000001.vmdk and TestVM-0000001-delta.vmdk) and the changes done will be lost; but the snapshot Manager hierarchy will not be change because we are not deleting the save state, we are reverting to it, and now 2 new files are created (TestVM-0000002.vmdk and TestVM-00000002-delta.vmdk) and new changes will be on new delta file.

Example 1When We select Revert from the Toolbar or Goto from snapshot manager after selecting “BaseOS” snapshot point.

Page 4: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

You Are Here

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)

Hard disk for VMAllocated: 20GBThin Provisioned

In this Example the VM has 1 HDD (vmdk), allocated size is 20 GB, thin provisioned, Now We have installed the guest operating system , VMware tools, some applications on it. It consume suppose approx. 5 GB so the “TestVM-flat.vmdk” will also be approx. 5 GB.

Now we want to test a new application and not sure what will be the affect so we can use VMware snapshot. Snapshot Name: “BaseOS”

Example 2

Page 5: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

You Are Here

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (500 MB)

A .vmsn (snapshot data) file is created which stores the VM configurations and Memory Information, a set of new virtual machine hard disk file is created, now after this snapshot the “flat.vmdk” file will be Read-Only and whatever changes will been done will be on the new “delta.vmdk” file. this file is a splash file which grows in the block of 16MB, (initial size can be 8KB). VM snapshot employ a copy-on-write mechanism(It’s grows as used).

If suppose you install an application, and it’s consume about 500 MB disk space, so the “delta.vmdk” file size will be approx. 500 MB. Suppose your application worked, and you want to consolidate the disks. So open Snapshot manager, select “BaseOS” snapshot point and delete it.

Example 2

Page 6: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5.5 GB)

When We delete the snapshot point because our current point was dependent on “BaseOS” point so the data of flat.vmdk and delta.vmdk will be consolidated. So the “BaseOS” point from the Snapshot manager will be removed and the files TestVM-Snapshot1.vmsn, TestVM-0000001.vmdk and TestVM-0000001-delta.vmdk will be removed from the datastore and the size of the TestVM-Flat.vmdk will be 5.5 GB approx. (5GB flat file and 500 MB delta file), now we will again start working with TestVM-flat.vmdk file.(Note: When ever we delete a snapshot point, It’s dependent point disk will marge with deleted point’s disk and dependent point disk files are deleted)

Now as you understand the concept lets expand it.

TestVM

You Are Here

Example 2When We select Delete all or Delete from the snapshot manager after selecting “BaseOS” snapshot point.

Page 7: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 3.a

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

You Are Here TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

Page 8: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Now what if we delete the SP2 point from the snapshot manager, the Change will be as follows:

Example 3.a

TestVM

SP1

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

You Are Here TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (3 GB)

Same as earlier discussed because current point is dependent on that location which we are deleting so we don’t loose any data or settings it will be consolidated with the current Point. In this “SP2” State will consolidate with “You are here” State; we will still working on same state.

Page 9: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 3.b

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

You Are Here TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

Page 10: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Now what if we delete the SP1 point from the snapshot manager, the Change will be as follows:

Example 3.b

As earlier discussed because current point is dependent on that location which we are deleting (not directly this time) so we don’t loose any data or settings it will be consolidated with the child State . So when SP1 is deleted; data is consolidated with SP2, and we still have our state (BaseOS and SP2) preserved.

TestVM

SP2

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

BaseOS

TestVM-Snapshot3.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (3 GB)

You Are Here TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 11: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

BaseOS

Example 3.c

SP2

You Are Here

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 12: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Now what if we delete the BaseOS point from the snapshot manager, the Change will be as follows:

Example 3.b

As current point is dependent on that location which we are deleting so we don’t loose any data or settings it will be consolidated with the child State . So when BaseOS is deleted; data is consolidated with SP1, and we still have our state (SP1 and SP2) preserved.

TestVM

SP2

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (6 GB)TestVM-Snapshot2.vmsn

SP1TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

You Are Here TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 13: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

BaseOS

Example 3.d

SP2

You Are Here

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 14: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Now what if we select delete all from the snapshot manager, the Change will be as follows:

Example 3.b

As current point is dependent on that location which we are deleting so we don’t loose any data or settings it will be consolidated. So when all save state is deleted; all data is consolidated.

TestVM

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (9 GB)

You are here

Page 15: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

BaseOS

Example 4.a

SP2

You Are Here

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 16: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Now what if we select “revert” or select SP2 and select “Goto” point from the snapshot manager, the Change will be as follows:

Example 4.a

Snapshot Manager View Datastore View

The current “You are here” point will lost and the changes on “3-delta.vmdk” is lost, there will be no change in Snapshot manager hierarchy but new files are created “4-delta.vmdk”.

SP1

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

SP2 TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

You Are Here TestVM-0000004.vmdk TestVM-0000004-delta.vmdk (8 KB)

TestVM

Page 17: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

BaseOS

Example 4.b

SP2

You Are Here

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 18: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

SP1

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 4.b

You are here TestVM-0000004.vmdk TestVM-0000004-delta.vmdk (8 MB)

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM

Now what if we select SP1 and select “Goto” point from the snapshot manager, the Change will be as follows:

The current “You are here” point will lost and the changes on “3-delta.vmdk” is lost, Snapshot manager hierarchy will change and now we are but new files are created “4-delta.vmdk”. Now after this if we delete SP2 point then it is simply deleted and nothing is consolidated.

Page 19: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

TestVM

SP1

Snapshot Manager View Datastore View

BaseOS

Example 4.c

SP2

You Are Here

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2”, under which we are working pointing “You are here”

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM-0000003.vmdk TestVM-0000003-delta.vmdk (1 GB)

Page 20: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

SP1

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 4.c

You are hereTestVM-0000004.vmdk TestVM-0000004-delta.vmdk (8 MB)

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM

Now what if we select BaseOS and select “Goto” point from the snapshot manager, the Change will be as follows:

The current “You are here” point will lost and the changes on “3-delta.vmdk” is lost, Snapshot manager hierarchy will change and now we are but new files are created “4-delta.vmdk”. If you delete now SP1 it is consolidate with SP2, because SP2 is dependent on it, but if we first delete SP2 it will be simply get deleted and then if we delete SP1 nothing will be consolidated.

Page 21: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

SP1

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 5.a

You are here TestVM-0000004.vmdk TestVM-0000004-delta.vmdk (8 MB)

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM

We have “BaseOS” point, under that we have another save point “SP1”, under that again we have another save point “SP2” and “You are here” point also.

Page 22: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (6 GB)

TestVM

You Are Here

Because of current working location, SP2 will be simply deleted, but BaseOS, SP1 and You are here will be consolidated and we will start working with Flat file again.

TestVM-flat.vmdk = TestVM-flat.vmdk (5 GB) + TestVM-0000001-delta.vmdk (1 GB) + TestVM-0000004-delta.vmdk (8 KB).

TestVM-0000002-delta.vmdk will be simply deleted.

Now what if we select Delete all from the snapshot manager, the Change will be as follows:

Example 5.a

Page 23: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

SP1

Snapshot Manager View Datastore ViewTestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)TestVM-Snapshot1.vmsn BaseOS

TestVM-Snapshot2.vmsn TestVM-0000001.vmdk TestVM-0000001-delta.vmdk (1 GB)

Example 5.b

You are hereTestVM-0000004.vmdk TestVM-0000004-delta.vmdk (8 MB)

SP2TestVM-Snapshot3.vmsn TestVM-0000002.vmdk TestVM-0000002-delta.vmdk (2 GB)

TestVM

We have “BaseOS” point, under that we have “You are here” and another save point “SP1”, under that again we have another save point “SP2”.

Page 24: TestVM You Are Here TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB) Hard disk for VM Allocated: 20GB Thin Provisioned The Virtual Machine doesn’t have

Snapshot Manager View Datastore View

TestVM.vmsd TestVM.vmdk TestVM-flat.vmdk (5 GB)

TestVM

You Are Here

Because of current working, location SP1 and SP2 will be simply deleted, but BaseOS and You are here will be consolidated and we will start working with Flat file again.

TestVM-flat.vmdk = TestVM-flat.vmdk (5 GB) + TestVM-0000004-delta.vmdk (8 KB).

TestVM-0000002-delta.vmdk and TestVM-0000001-delta.vmdk will be simply deleted.

Now what if we select Delete all from the snapshot manager, the Change will be as follows:

Example 5.b