WEBVTT

00:00:00.000 --> 00:00:02.300
Welcome back to vSphere 8 in the real world.

00:00:02.300 --> 00:00:04.100
And now we're going to discuss snapshots.

00:00:04.100 --> 00:00:09.300
So a snapshot is not really a copy of a VMDK.

00:00:09.300 --> 00:00:14.000
What a snapshot is, it's a delta of a VMDK.

00:00:14.000 --> 00:00:17.660
So let's say we have a virtual disk, right?

00:00:17.660 --> 00:00:20.860
And so in VMware, our virtual disks are VMDK files.

00:00:20.860 --> 00:00:23.360
And if our VM is called demo one,

00:00:23.360 --> 00:00:27.299
then we have a file for the hard disk.

00:00:27.299 --> 00:00:32.599
By default, that file would be called demo1.vmdk.

00:00:32.599 --> 00:00:35.400
And that is the virtual disk, that first virtual disk

00:00:35.400 --> 00:00:38.099
for this particular virtual machine.

00:00:38.099 --> 00:00:41.200
And when I write a file to that virtual machine,

00:00:41.200 --> 00:00:43.000
it gets written to that VMDK.

00:00:43.000 --> 00:00:45.200
If I delete a file off the virtual disk,

00:00:45.200 --> 00:00:47.700
it gets removed from within that VMDK.

00:00:47.700 --> 00:00:51.000
But it's all written within that one file.

00:00:51.000 --> 00:00:55.200
What can happen is I can decide I want to take a snapshot.

00:00:55.200 --> 00:00:57.700
And when I take a snapshot, what happens

00:00:57.700 --> 00:01:02.099
is that VMDK file now becomes a read-only file.

00:01:02.099 --> 00:01:05.900
I'm not going to write any more changes to that.

00:01:05.900 --> 00:01:09.000
A new file is going to get created.

00:01:09.000 --> 00:01:11.300
That's going to be my delta file.

00:01:11.300 --> 00:01:14.099
So I'll have my demo1.vmdk.

00:01:14.099 --> 00:01:18.699
And I'll have another file called delta1-0000,

00:01:18.699 --> 00:01:21.800
for exactly the number of zeros, 1.vmdk.

00:01:21.800 --> 00:01:27.099
And that series of zeros, 1.vmdk, that's my delta file.

00:01:27.099 --> 00:01:28.900
That's my first delta file.

00:01:28.900 --> 00:01:32.500
So I have my primary file that is now my read-only file.

00:01:32.500 --> 00:01:35.199
And then I have that delta file.

00:01:35.199 --> 00:01:38.400
Now what happens, when I want to read something

00:01:38.400 --> 00:01:40.599
from that virtual disk, it reads it

00:01:40.599 --> 00:01:44.699
from that original file, that read-only VMDK file.

00:01:44.699 --> 00:01:47.300
But if I open up a Word document from there,

00:01:47.300 --> 00:01:49.199
I just read it out of that read-only file.

00:01:49.199 --> 00:01:50.699
I open it in Word.

00:01:50.699 --> 00:01:52.199
I start making changes to it.

00:01:52.199 --> 00:01:55.199
I click on Save to save my changes.

00:01:55.199 --> 00:01:58.599
Those changes don't get written to that read-only file.

00:01:58.599 --> 00:02:01.300
They now get written to that delta file.

00:02:01.300 --> 00:02:04.300
So in the operating system, the guest operating system says,

00:02:04.300 --> 00:02:08.699
oh, I want these certain blocks that have that Word document.

00:02:08.699 --> 00:02:11.899
The hypervisor knows, oh, those blocks that are pointed here

00:02:11.899 --> 00:02:15.600
are actually now in this other file down over here.

00:02:15.600 --> 00:02:19.899
And as I open files and make changes to the files

00:02:19.899 --> 00:02:23.199
and save those files, they get written to that delta file.

00:02:23.199 --> 00:02:25.199
And that delta file starts to grow.

00:02:25.199 --> 00:02:31.600
So what can happen is maybe my original disk was 100 gigs.

00:02:31.600 --> 00:02:35.100
And of that 100 gigs, 50 gigs of it

00:02:35.100 --> 00:02:39.300
is documents and files and pictures and things like that.

00:02:39.300 --> 00:02:43.600
Over time, if I never deleted that snapshot

00:02:43.600 --> 00:02:46.300
and I touched every single file that

00:02:46.300 --> 00:02:51.100
was on that virtual disk, all of a sudden,

00:02:51.100 --> 00:02:54.100
this disk is 100 gigs, which is maybe

00:02:54.100 --> 00:02:58.199
the max size for that virtual disk, or close to.

00:02:58.199 --> 00:03:00.300
And my delta file is now 50 gigs,

00:03:00.300 --> 00:03:04.300
because that 50 gigs of files up here

00:03:04.300 --> 00:03:07.800
all got changed and written to that delta file.

00:03:07.800 --> 00:03:10.600
And then over some time, OK, I'm writing changes

00:03:10.600 --> 00:03:11.500
and I'm doing things.

00:03:11.500 --> 00:03:12.500
Everything's going fine.

00:03:12.500 --> 00:03:14.300
I take another snapshot.

00:03:14.300 --> 00:03:22.100
Now I get a demo1-00002.vmdk.

00:03:22.100 --> 00:03:25.699
And when I say I want to read operating system

00:03:25.699 --> 00:03:29.199
files that haven't changed this entire time,

00:03:29.199 --> 00:03:32.699
I'm getting those from that first original vmdk file,

00:03:32.699 --> 00:03:35.000
demo1.vmdk, and I'm reading those

00:03:35.000 --> 00:03:36.800
and I'm running the operating system.

00:03:36.800 --> 00:03:39.800
But when I want that Word document that I changed,

00:03:39.800 --> 00:03:43.699
that goes to that first snapshot file,

00:03:43.699 --> 00:03:47.399
the 00001.vmdk, which is now read-only.

00:03:47.399 --> 00:03:48.899
All I can do is read from it now.

00:03:48.899 --> 00:03:52.399
If I create another snapshot, I read the file from there.

00:03:52.399 --> 00:03:55.199
I go in, I make changes, I click on Save,

00:03:55.199 --> 00:03:59.199
and the changes get written to my second delta

00:03:59.199 --> 00:04:02.399
file, my 0002.vmdk.

00:04:02.399 --> 00:04:04.100
Now I've got two snapshots.

00:04:04.100 --> 00:04:07.800
One is read-only and two is the one I can write to.

00:04:07.800 --> 00:04:11.300
And maybe that grows, and I change 10 gigs of data

00:04:11.300 --> 00:04:14.500
over this time, and it gets written to that second file.

00:04:14.500 --> 00:04:17.000
Then I create a third snapshot.

00:04:17.000 --> 00:04:18.799
And you can kind of see what's happening now.

00:04:18.799 --> 00:04:20.899
My original VM that was 100 gigs,

00:04:20.899 --> 00:04:23.100
and I've got 100 gigs of data, is now

00:04:23.100 --> 00:04:28.299
taking up 150 gigs, 170 gigs, 200 gigs.

00:04:28.299 --> 00:04:30.500
And I create more snapshots, those snapshot files

00:04:30.500 --> 00:04:32.299
start to grow, and I create more snapshots,

00:04:32.299 --> 00:04:33.799
those snapshot files start to grow.

00:04:33.799 --> 00:04:38.100
All of a sudden, this little simple 100-gig virtual machine

00:04:38.100 --> 00:04:42.299
is taking up 1,000 gigabytes of space on my storage array.

00:04:42.299 --> 00:04:46.100
So I keep taking snapshots and not deleting them.

00:04:46.100 --> 00:04:50.200
So one, I'm not using my storage very efficiently.

00:04:50.200 --> 00:04:53.500
Secondly, what happens is it will say,

00:04:53.500 --> 00:04:55.500
oh, you want this file here.

00:04:55.500 --> 00:04:59.500
Oh, but actually, it's pointing to the snapshot one.

00:04:59.500 --> 00:05:01.299
Snapshot one points to snapshot two.

00:05:01.299 --> 00:05:02.899
Snapshot two points to snapshot three.

00:05:03.000 --> 00:05:05.000
Snapshot three points to that snapshot four.

00:05:05.000 --> 00:05:07.700
Oh, here it is on four, or here it is on five.

00:05:07.700 --> 00:05:09.200
That all took time.

00:05:09.200 --> 00:05:12.600
And so now, my performance is really starting to lag.

00:05:12.600 --> 00:05:15.399
I'm not using my space efficiently.

00:05:15.399 --> 00:05:17.299
My performance is lagging.

00:05:17.299 --> 00:05:19.700
And it's not unusual.

00:05:19.700 --> 00:05:24.299
For some reason, in the middle of that, my snapshot three

00:05:24.299 --> 00:05:27.700
is supposed to point to snapshot four, and that pointer breaks.

00:05:27.700 --> 00:05:30.600
And all of a sudden, now my snapshot chain is broken.

00:05:30.600 --> 00:05:33.700
And everything below that snapshot chain is lost.

00:05:33.700 --> 00:05:36.399
And my VM won't even start up anymore,

00:05:36.399 --> 00:05:39.600
seeing that happen more than once.

00:05:39.600 --> 00:05:40.700
You can go in there.

00:05:40.700 --> 00:05:41.600
It can be fixed.

00:05:41.600 --> 00:05:44.000
You can manually edit and try and fix that.

00:05:44.000 --> 00:05:46.399
I've heard of, never used one myself, third-party tools

00:05:46.399 --> 00:05:48.799
that you can use to try and find all your snapshot chains

00:05:48.799 --> 00:05:50.399
and fix them for you.

00:05:50.399 --> 00:05:52.000
A lot of times, it's kind of a manual

00:05:52.000 --> 00:05:54.100
go-in-there-and-fixing kind of process.

00:05:54.100 --> 00:05:57.500
So creating snapshots, and snapshot

00:05:57.500 --> 00:06:00.899
after snapshot after snapshot, and not deleting them

00:06:00.899 --> 00:06:03.500
is a really bad practice.

00:06:03.500 --> 00:06:07.000
I recommend that if we're taking snapshots,

00:06:07.000 --> 00:06:08.500
and one of the more common reasons

00:06:08.500 --> 00:06:11.000
why is we're installing updates.

00:06:11.000 --> 00:06:12.799
I'm updating the operating system.

00:06:12.799 --> 00:06:14.899
I'm updating an application.

00:06:14.899 --> 00:06:18.700
Maybe I'm making the change to some data in an application.

00:06:18.700 --> 00:06:21.100
And I'm like, OK, this is like maintenance type of changes

00:06:21.100 --> 00:06:22.700
to my data.

00:06:22.700 --> 00:06:24.200
I've taken the database offline.

00:06:24.200 --> 00:06:25.500
I'm going to do some maintenance,

00:06:25.500 --> 00:06:27.200
make some changes.

00:06:27.200 --> 00:06:29.799
But I'm worried that I might end up screwing this up.

00:06:29.799 --> 00:06:31.100
I'm going to take a snapshot.

00:06:31.100 --> 00:06:32.399
Go in there and make my changes.

00:06:32.399 --> 00:06:32.899
Test.

00:06:32.899 --> 00:06:33.799
Everything's good.

00:06:33.799 --> 00:06:35.100
Delete my snapshot.

00:06:35.100 --> 00:06:35.700
Test.

00:06:35.700 --> 00:06:36.600
It's bad.

00:06:36.600 --> 00:06:39.399
Roll back my snapshot and delete that snapshot.

00:06:39.399 --> 00:06:41.799
Roll back to what I had and delete the snapshot.

00:06:41.799 --> 00:06:45.200
So you have a way of recovering.

00:06:45.200 --> 00:06:48.100
What snapshots, though, are not, and they

00:06:48.100 --> 00:06:52.100
get confused for this often, they're not a backup.

00:06:52.100 --> 00:06:53.899
Because as an example, I just mentioned,

00:06:53.899 --> 00:06:56.399
if that snapshot chain were to break,

00:06:56.500 --> 00:06:58.700
I could have lost that VM and all the data

00:06:58.700 --> 00:06:59.700
that would be on that VM.

00:06:59.700 --> 00:07:00.899
It won't start up now.

00:07:00.899 --> 00:07:03.399
So how do I recover from that?

00:07:03.399 --> 00:07:05.200
Well, maybe you can fix the chain.

00:07:05.200 --> 00:07:09.500
Or you can go to your backups and restore that VM

00:07:09.500 --> 00:07:12.000
and get it back up and running.

00:07:12.000 --> 00:07:13.700
Snapshots are not a backup.

00:07:13.700 --> 00:07:16.100
If there's a corruption somewhere

00:07:16.100 --> 00:07:20.700
in that virtual machine chain, the snapshot

00:07:20.700 --> 00:07:22.500
does not fix it for you.

00:07:22.500 --> 00:07:24.399
You can roll back and lose data maybe.

00:07:24.399 --> 00:07:27.500
Maybe the break is somewhere low in the chain.

00:07:27.500 --> 00:07:29.500
And you can roll to up earlier before it

00:07:29.500 --> 00:07:32.500
and just lose everything below that.

00:07:32.500 --> 00:07:34.100
That's not a backup.

00:07:34.100 --> 00:07:37.399
So snapshots are not backups.

00:07:37.399 --> 00:07:39.500
They're just a place and time holder

00:07:39.500 --> 00:07:41.500
that you can roll back to.

00:07:41.500 --> 00:07:45.200
So they are kind of a safety measure against changes

00:07:45.200 --> 00:07:47.899
you didn't really want or changes that messed things up,

00:07:47.899 --> 00:07:49.899
an update that screwed things up.

00:07:49.899 --> 00:07:52.600
But they're not a replace for a backup.

00:07:52.700 --> 00:07:56.399
Whereas if you had a true backup and that storage got corrupted,

00:07:56.399 --> 00:07:57.899
that virtual disk got corrupted, you

00:07:57.899 --> 00:08:01.299
have an entire copy of that VM someplace else

00:08:01.299 --> 00:08:04.299
on different storage that's not corrupted

00:08:04.299 --> 00:08:06.399
that you can restore that VM from.

00:08:06.399 --> 00:08:09.000
So snapshots and backups are not the same thing.

00:08:09.000 --> 00:08:10.500
They get often confused for being

00:08:10.500 --> 00:08:12.200
similar to the same thing.

00:08:12.200 --> 00:08:14.000
They're not the same thing at all.

00:08:14.000 --> 00:08:16.600
One is just a place and time holder

00:08:16.600 --> 00:08:19.299
for a certain configuration.

00:08:19.299 --> 00:08:23.100
The other one is an actual protected copy

00:08:23.100 --> 00:08:26.700
of your virtual machine, the operating system, your data,

00:08:26.700 --> 00:08:29.299
your applications, all those kinds of things.

00:08:29.299 --> 00:08:30.299
That's a backup.

00:08:30.299 --> 00:08:32.299
So don't confuse snapshots for backups.

00:08:32.299 --> 00:08:36.500
So snapshots are fantastic for I'm going to run some updates.

00:08:36.500 --> 00:08:40.000
And before I update Windows, we take snapshots.

00:08:40.000 --> 00:08:41.299
That's fantastic.

00:08:41.299 --> 00:08:43.900
OK?

00:08:43.900 --> 00:08:45.700
So to take a snapshot is pretty easy.

00:08:45.700 --> 00:08:47.799
You just go to the VM that you want to snapshot.

00:08:47.799 --> 00:08:49.599
You're going to right click on that one.

00:08:49.599 --> 00:08:50.500
Go to your snapshots.

00:08:50.500 --> 00:08:52.299
And you can just say take snapshot.

00:08:52.299 --> 00:08:54.900
And when in there, you can go in there and give it a name.

00:08:54.900 --> 00:08:57.200
It's really a great idea not to use

00:08:57.200 --> 00:08:59.000
the default name, which is basically

00:08:59.000 --> 00:09:02.200
like the virtual machine name and update and timestamp.

00:09:02.200 --> 00:09:04.500
Something descriptive, especially

00:09:04.500 --> 00:09:06.799
in the description, a longer description,

00:09:06.799 --> 00:09:09.000
but even in the name, you might say

00:09:09.000 --> 00:09:11.900
before installing Windows Update and the date and time, right?

00:09:11.900 --> 00:09:15.200
Or before installing new antivirus and a date and time.

00:09:15.200 --> 00:09:20.099
You might put some detail about why you're taking a snapshot.

00:09:20.099 --> 00:09:21.299
This is before this.

00:09:21.299 --> 00:09:23.900
This is after that.

00:09:23.900 --> 00:09:25.299
Things like that.

00:09:25.299 --> 00:09:28.500
Snapshots are super helpful for that kind of thing.

00:09:28.500 --> 00:09:31.000
So maybe we're going to go in and say

00:09:31.000 --> 00:09:33.299
before installing new antivirus.

00:09:33.299 --> 00:09:35.099
Well, if you're installing a new antivirus,

00:09:35.099 --> 00:09:37.500
you probably uninstalled your old one, right?

00:09:37.500 --> 00:09:41.700
So take a snapshot before installing old antivirus.

00:09:41.700 --> 00:09:44.700
Then after, take another one, after uninstalling

00:09:44.799 --> 00:09:46.099
your old antivirus.

00:09:46.099 --> 00:09:49.700
Then before installing the new one is your after,

00:09:49.700 --> 00:09:51.700
after installing new antivirus.

00:09:51.700 --> 00:09:57.700
Then take another one, updated the virus definitions

00:09:57.700 --> 00:10:00.200
or updated the version or something like that,

00:10:00.200 --> 00:10:02.700
ran a complete scan with antivirus.

00:10:02.700 --> 00:10:04.900
So I'm taking a snapshot before I run a complete scan.

00:10:04.900 --> 00:10:08.500
So doing one simple task of uninstalling your old antivirus,

00:10:08.500 --> 00:10:11.099
installing the new antivirus, updating the definitions,

00:10:11.099 --> 00:10:13.799
running a complete scan of the system with the new antivirus,

00:10:13.799 --> 00:10:15.299
you might take four or five snapshots

00:10:15.299 --> 00:10:17.099
because maybe somewhere along the way,

00:10:17.099 --> 00:10:18.599
something was sideways.

00:10:18.599 --> 00:10:22.200
So I want a snapshot of my VM before I uninstalled the old.

00:10:22.200 --> 00:10:24.400
I want a snapshot after I uninstalled the old

00:10:24.400 --> 00:10:26.099
before I installed the new.

00:10:26.099 --> 00:10:27.700
And then I want a snapshot with the new

00:10:27.700 --> 00:10:28.900
before the new definitions

00:10:28.900 --> 00:10:30.700
because where did this go sideways on me?

00:10:30.700 --> 00:10:32.099
Sometimes things are going wrong.

00:10:32.099 --> 00:10:33.599
Like where did this go wrong?

00:10:33.599 --> 00:10:35.500
Let's roll back to here and see what's going on.

00:10:35.500 --> 00:10:37.000
Okay, here we're fine.

00:10:37.000 --> 00:10:38.299
Okay, let's roll back to here.

00:10:38.299 --> 00:10:39.299
Here we're fine.

00:10:39.299 --> 00:10:40.200
Oh, let's go to here.

00:10:40.200 --> 00:10:41.500
Oh, when I get to this point here,

00:10:41.500 --> 00:10:43.400
this is where things start to break, right?

00:10:43.400 --> 00:10:45.099
So you want to have a record, you know,

00:10:45.099 --> 00:10:48.799
and a way of going back to these different points in time

00:10:48.799 --> 00:10:50.099
and checking that out.

00:10:50.099 --> 00:10:53.799
So your name should be descriptive of where you are.

00:10:53.799 --> 00:10:56.799
And then the actual description can be even more descriptive,

00:10:56.799 --> 00:10:57.700
more detailed.

00:10:57.700 --> 00:10:59.200
But you want to be able to look at the name real quickly

00:10:59.200 --> 00:11:02.299
and figure out where you are.

00:11:02.299 --> 00:11:04.900
You can also go in and rather than say take a snapshot,

00:11:04.900 --> 00:11:06.200
you want to manage a snapshot.

00:11:06.200 --> 00:11:09.799
So there it will show you the original virtual disk

00:11:09.799 --> 00:11:11.500
and then each of those snapshots,

00:11:11.500 --> 00:11:14.000
those deltas will be listed below that

00:11:14.000 --> 00:11:15.099
and it'll tell you where you are.

00:11:15.099 --> 00:11:16.599
If you're down at the bottom,

00:11:16.599 --> 00:11:18.299
if you just keep taking them and taking them,

00:11:18.299 --> 00:11:20.099
you never do anything else, it'll say you're here,

00:11:20.099 --> 00:11:22.900
you're after that last snapshot.

00:11:22.900 --> 00:11:25.200
Or maybe you went and said, okay,

00:11:25.200 --> 00:11:27.500
so I, you know, have my antivirus.

00:11:27.500 --> 00:11:29.099
Here's where I uninstalled my antivirus.

00:11:29.099 --> 00:11:31.099
Here's where I installed the new antivirus.

00:11:31.099 --> 00:11:32.900
Here's where I updated my definitions.

00:11:32.900 --> 00:11:33.900
Wait, something's wrong.

00:11:33.900 --> 00:11:35.700
Without deleting these snapshots,

00:11:35.700 --> 00:11:37.099
I can click on one,

00:11:37.099 --> 00:11:40.200
maybe I go back to after I uninstalled the antivirus

00:11:40.200 --> 00:11:41.900
and before I installed the new.

00:11:41.900 --> 00:11:43.599
I can jump to that point in time,

00:11:43.599 --> 00:11:45.400
revert the machine to there.

00:11:45.400 --> 00:11:47.099
I still have those snapshots below

00:11:47.099 --> 00:11:48.799
and I can say, is everything good here?

00:11:48.799 --> 00:11:50.000
Yeah, everything's good here.

00:11:50.000 --> 00:11:52.099
All right, let's jump to the snapshot

00:11:52.099 --> 00:11:54.400
where I have the antivirus installed.

00:11:54.400 --> 00:11:56.900
Okay, so I click on that one, I say jump to here.

00:11:56.900 --> 00:11:57.599
Is everything good?

00:11:57.599 --> 00:11:58.799
Yep, everything's good here.

00:11:58.799 --> 00:12:00.400
All right, so let's look at

00:12:00.400 --> 00:12:02.200
after we updated the antivirus definitions.

00:12:02.200 --> 00:12:03.599
I go to there, everything good?

00:12:03.599 --> 00:12:04.700
Everything's good here.

00:12:04.700 --> 00:12:06.099
And you can keep stepping through there.

00:12:06.099 --> 00:12:10.700
So you can go up and down through that chain of snapshots

00:12:10.700 --> 00:12:12.700
from the manage option.

00:12:12.700 --> 00:12:14.599
And then revert means you want to revert.

00:12:14.599 --> 00:12:18.000
Consolidate means that I want to delete one

00:12:18.000 --> 00:12:19.799
and consolidate it into the one above.

00:12:19.799 --> 00:12:20.900
So I only have the one.

00:12:20.900 --> 00:12:23.900
I'm deleting one and consolidating into another one.

00:12:23.900 --> 00:12:29.099
And then delete will actually just roll it up, right?

00:12:29.099 --> 00:12:31.700
And so I can say I want to delete all the snapshots.

00:12:31.700 --> 00:12:33.700
If I go in and say I want to delete all the snapshots,

00:12:33.700 --> 00:12:35.400
it's going to take the state I'm in

00:12:35.500 --> 00:12:38.000
and roll it up into the main VMDK file.

00:12:38.000 --> 00:12:40.000
So let's go back to that example

00:12:40.000 --> 00:12:44.599
where I have my main demo1.vmdk

00:12:44.599 --> 00:12:48.200
and then I have my snapshot1, my snapshot2, my snapshot3

00:12:48.200 --> 00:12:50.000
and I'm running down below snapshot3.

00:12:50.000 --> 00:12:51.700
Everything's running fantastic.

00:12:51.700 --> 00:12:52.400
Everything's running good.

00:12:52.400 --> 00:12:54.299
I'm like, all right, I've run all my tests.

00:12:54.299 --> 00:12:55.000
I'm happy.

00:12:55.000 --> 00:12:56.500
This is where I want to be.

00:12:56.500 --> 00:12:58.599
I trust this configuration.

00:12:58.599 --> 00:12:59.799
I'm going to say delete all.

00:12:59.799 --> 00:13:02.500
What happens is it's going to write the changes

00:13:02.500 --> 00:13:05.299
that are in Delta 1 to that VMDK.

00:13:05.299 --> 00:13:07.000
And then it changes in 2 to that VMDK

00:13:07.000 --> 00:13:08.700
and then 3 to that VMDK.

00:13:08.700 --> 00:13:10.599
The more I have, the longer it's going to take

00:13:10.599 --> 00:13:12.400
to roll all that up.

00:13:12.400 --> 00:13:15.799
When I'm done, I'll end up with that 100-gig disk

00:13:15.799 --> 00:13:19.299
and just that 100-gig disk and not all the Deltas below it.

00:13:19.299 --> 00:13:21.900
But the more I have, the longer it's going to take

00:13:21.900 --> 00:13:23.599
to roll that all up.

00:13:23.599 --> 00:13:25.599
So again, having too long a chain

00:13:25.599 --> 00:13:28.700
and too big of Deltas can make deleting snapshots

00:13:28.700 --> 00:13:29.799
take a while.

00:13:29.799 --> 00:13:31.900
If you only run them for a few hours,

00:13:31.900 --> 00:13:33.099
a day or two at the most,

00:13:33.099 --> 00:13:35.299
I usually try to run them for a few hours.

00:13:35.299 --> 00:13:36.299
Depends on when I'm testing.

00:13:36.299 --> 00:13:37.400
Maybe like a Windows update,

00:13:37.400 --> 00:13:39.000
I need to run sometimes longer.

00:13:39.000 --> 00:13:42.200
I want to run for a couple of days or so.

00:13:42.200 --> 00:13:43.299
But not more than that.

00:13:43.299 --> 00:13:45.500
I try to never run a snapshot

00:13:45.500 --> 00:13:47.799
for more than a couple of days.

00:13:47.799 --> 00:13:49.700
Now that we discussed snapshots,

00:13:49.700 --> 00:13:52.500
let's go ahead and jump into our demo environment

00:13:52.500 --> 00:13:55.200
and actually create and manage some snapshots.

00:13:55.200 --> 00:13:57.200
So here we are back in our demo environment.

00:13:57.200 --> 00:13:59.400
And our demo environment is, again,

00:13:59.400 --> 00:14:01.900
being ran in VMware's hands-on lab.

00:14:01.900 --> 00:14:04.599
So it's hol.vmware.com

00:14:04.599 --> 00:14:07.000
for VMware's hands-on lab environment.

00:14:07.000 --> 00:14:09.400
And I went in and just created a clone

00:14:09.400 --> 00:14:11.099
of this Windows 10 machine.

00:14:11.099 --> 00:14:13.599
And I called it Demo01.

00:14:13.599 --> 00:14:17.799
And over here, I have the datastore

00:14:17.799 --> 00:14:19.799
that that Demo01 is in.

00:14:19.799 --> 00:14:20.900
And if we look through here,

00:14:20.900 --> 00:14:22.599
we see we have our virtual swap

00:14:22.599 --> 00:14:24.400
and some non-volatile RAM.

00:14:24.400 --> 00:14:26.700
Here's my VMDK file, right?

00:14:26.700 --> 00:14:29.700
My Demo01.vmdk, all right?

00:14:29.700 --> 00:14:31.599
And that's pretty much the only VMDK

00:14:31.599 --> 00:14:34.200
I've got on here.

00:14:34.200 --> 00:14:37.400
If I go back over here

00:14:37.400 --> 00:14:40.000
and right-click on this VM

00:14:40.000 --> 00:14:43.900
and say I want to go to snapshots,

00:14:43.900 --> 00:14:47.400
take a snapshot, and what is this?

00:14:47.400 --> 00:14:52.700
I'm going to say this is my first lab

00:14:52.700 --> 00:14:54.900
and my date and the time.

00:14:54.900 --> 00:14:56.400
I always kind of create a description,

00:14:56.400 --> 00:14:58.000
a brief description,

00:14:58.000 --> 00:14:59.700
and I note it with the date and time.

00:14:59.799 --> 00:15:04.000
So, I might say it is April 3rd in the year at 1226.

00:15:04.000 --> 00:15:06.299
And actually, the time, the hour,

00:15:06.299 --> 00:15:07.900
and the minute is actually really important

00:15:07.900 --> 00:15:10.099
because sometimes the only difference in the date

00:15:10.099 --> 00:15:12.599
and when you took it is maybe like 15 minutes later.

00:15:12.599 --> 00:15:15.299
So, the date and time is really useful.

00:15:15.299 --> 00:15:22.799
And then here I would do a detailed description

00:15:22.799 --> 00:15:28.000
of the task and the date and time.

00:15:28.000 --> 00:15:29.599
All right, so I've gone in.

00:15:29.599 --> 00:15:32.799
I get a good detailed name with the date and time.

00:15:32.799 --> 00:15:35.000
I get a good description of what I'm doing

00:15:35.000 --> 00:15:36.799
and the date and time.

00:15:36.799 --> 00:15:39.099
Include the virtual machine's memory.

00:15:39.099 --> 00:15:42.000
What this is great for

00:15:42.000 --> 00:15:45.299
is if I'm going to revert back to the snapshot later,

00:15:45.299 --> 00:15:46.400
it won't have to restart.

00:15:46.400 --> 00:15:48.799
If I don't have the memory and I revert to a snapshot,

00:15:48.799 --> 00:15:52.700
it actually has to reboot the VM with that virtual disk.

00:15:52.700 --> 00:15:54.099
If I include the RAM,

00:15:54.099 --> 00:15:57.900
I can actually jump right to this moment in time.

00:15:57.900 --> 00:16:01.099
When I click create, it's this moment in time

00:16:01.099 --> 00:16:03.099
I'm reverting back to without a reboot

00:16:03.099 --> 00:16:05.299
because I also know what the memory looked like

00:16:05.299 --> 00:16:07.400
of that VM at this moment in time.

00:16:07.400 --> 00:16:09.099
So, it's going to go in and create my snapshot.

00:16:09.099 --> 00:16:13.400
And it does, even though it's only creating a delta file,

00:16:13.400 --> 00:16:14.900
an empty delta file,

00:16:14.900 --> 00:16:18.000
and, you know, kind of migrating any write changes to it,

00:16:18.000 --> 00:16:19.000
it takes a minute to do this.

00:16:19.000 --> 00:16:20.700
So, we'll let this run for a moment

00:16:20.700 --> 00:16:23.099
and come back when it's complete.

00:16:23.099 --> 00:16:25.599
So, that snapshot is completed.

00:16:25.599 --> 00:16:27.700
So, now I'm going to go back to the folder

00:16:27.700 --> 00:16:31.900
that has this virtual machine in it.

00:16:31.900 --> 00:16:33.799
I'm going to refresh this screen.

00:16:33.799 --> 00:16:36.200
Here's my demo one.

00:16:36.200 --> 00:16:41.900
Notice that demo01-00001.vmdk.

00:16:41.900 --> 00:16:44.799
This is my snapshot file, okay?

00:16:44.799 --> 00:16:53.500
So, this is the delta file from this VMDK file, okay?

00:16:53.500 --> 00:16:58.200
This is my VMDK file, and I have my delta file.

00:16:58.200 --> 00:17:01.299
And it's about, you know, 19 megs or so.

00:17:01.299 --> 00:17:02.299
It's pretty small.

00:17:02.299 --> 00:17:05.900
As I open up that VM and start making changes,

00:17:05.900 --> 00:17:08.000
it's going to read the files

00:17:08.000 --> 00:17:12.199
that I'm wanting to change from the VMDK file.

00:17:12.199 --> 00:17:13.300
Where is my VMDK?

00:17:13.300 --> 00:17:14.300
Oh, here we go.

00:17:14.300 --> 00:17:16.300
From this VMDK file, this is going to be the source.

00:17:16.300 --> 00:17:17.800
This file is now a read-only file.

00:17:17.800 --> 00:17:19.099
It's going to read from here.

00:17:19.099 --> 00:17:20.800
And when I say save those changes,

00:17:20.800 --> 00:17:23.199
when I write changes, create a new file,

00:17:23.199 --> 00:17:25.300
write changes to old files, whatever it is,

00:17:25.300 --> 00:17:29.800
they get written to this delta file.

00:17:29.800 --> 00:17:36.199
If I go back to here, and I were, say, to go to snapshot,

00:17:36.199 --> 00:17:38.900
and I can say manage snapshots,

00:17:38.900 --> 00:17:42.800
it'll tell me, right, here's my first snapshot,

00:17:42.800 --> 00:17:44.900
and I'm here.

00:17:44.900 --> 00:17:47.599
I can still go in now, right,

00:17:47.599 --> 00:17:52.099
and say I want to take another snapshot,

00:17:52.099 --> 00:18:02.199
and I'll call this second lab snap, the date and the time,

00:18:02.199 --> 00:18:04.599
and my description.

00:18:04.599 --> 00:18:06.699
Okay, so I have a description of the second snapshot,

00:18:06.699 --> 00:18:09.699
why I'm taking it, and the date and the time,

00:18:09.699 --> 00:18:11.900
and I'm including my virtual machine memory,

00:18:11.900 --> 00:18:17.099
and say create.

00:18:17.099 --> 00:18:19.800
Again, this takes a moment to do.

00:18:19.800 --> 00:18:21.500
It's going to go in there and create that file

00:18:21.500 --> 00:18:25.599
and kind of change the original delta file,

00:18:25.599 --> 00:18:30.900
write that 001 file to a read-only file,

00:18:30.900 --> 00:18:36.400
and create me a new read-write file.

00:18:36.400 --> 00:18:40.699
So here you can see I have my first lab snapshot.

00:18:40.699 --> 00:18:43.199
Then I create that second one, and you are here.

00:18:43.199 --> 00:18:45.099
So I'm writing, everything that's, you know,

00:18:45.099 --> 00:18:47.900
getting written from this guy is being written to this file here,

00:18:47.900 --> 00:18:52.099
because I am now, at this point in time, past that snapshot.

00:18:52.099 --> 00:18:56.300
If I go to here and just refresh my screen

00:18:56.300 --> 00:19:00.900
and go to my demo 01, you'll see I now have two delta files.

00:19:00.900 --> 00:19:03.500
I have the original delta file, that 001 file,

00:19:03.500 --> 00:19:10.000
and I have the 002 file, right, the demo01-000002.bmdk.

00:19:10.099 --> 00:19:15.099
So this one here is going to be my new read-only.

00:19:15.099 --> 00:19:22.699
Again, my first source file is going to be my first VMDK file.

00:19:22.699 --> 00:19:28.199
If I can scroll and find it. There we go.

00:19:28.199 --> 00:19:30.500
So this one is where it's going to go to when I say,

00:19:30.500 --> 00:19:33.699
I want to read a file. It'll go to here to look for the file.

00:19:33.800 --> 00:19:40.000
This file might point me, say, oh, those blocks actually now are here.

00:19:40.000 --> 00:19:42.900
And if the file that I had changed from here

00:19:42.900 --> 00:19:44.800
has now been changed and written here,

00:19:44.800 --> 00:19:48.199
this one will point to this one, and then I'll get my document.

00:19:48.199 --> 00:19:51.599
And this file is going to have all the changes written to it

00:19:51.599 --> 00:19:55.199
going forward until I create a new one.

00:19:55.199 --> 00:20:01.599
I can still go back to my snapshots, and I have this guy here,

00:20:01.599 --> 00:20:04.900
but I can say, you know what, I want to go back to this guy here,

00:20:04.900 --> 00:20:10.400
and I can revert back to this point in time, right?

00:20:10.400 --> 00:20:13.900
I can say revert to there. You are here.

00:20:13.900 --> 00:20:19.199
So now this is now my new point in time I'm running from, right,

00:20:19.199 --> 00:20:24.300
to the moment when I created, or last wrote to this file.

00:20:24.300 --> 00:20:27.900
I should have left that there, there.

00:20:27.900 --> 00:20:33.400
And I'm now reading and writing from this 01 file.

00:20:33.400 --> 00:20:38.000
Okay. I can say, all right, you know what,

00:20:38.000 --> 00:20:41.099
I'm happy with this point in time that I'm at here.

00:20:41.099 --> 00:20:44.900
I want to take this, everything I have, everything I have in this file,

00:20:44.900 --> 00:20:48.599
and everything I've written since then, all of this,

00:20:48.599 --> 00:20:51.400
I want to keep all of this, and I'm going to dump everything else after that.

00:20:51.400 --> 00:20:53.300
So I'm going to say just delete all.

00:20:53.300 --> 00:20:56.800
And it'll just consult it and roll up all of this

00:20:56.800 --> 00:20:59.500
and throw out all of that.

00:20:59.500 --> 00:21:01.400
And I just got rid of all those snapshots.

00:21:01.400 --> 00:21:07.400
So now my 100-gig disk is again 100 gigs, if that's what my file is, right?

00:21:07.400 --> 00:21:09.599
If I had been writing and creating more snapshots,

00:21:09.599 --> 00:21:11.900
and my first Delta file got to 20 gigs,

00:21:11.900 --> 00:21:14.900
and my second Delta file got to be even bigger, 30 gigs,

00:21:14.900 --> 00:21:17.000
or smaller, only 10 gigs, whatever it is,

00:21:17.000 --> 00:21:22.599
so that 100-gig VM ended up becoming 130, 140 gigs.

00:21:22.599 --> 00:21:24.800
I deleted all my snapshots.

00:21:24.800 --> 00:21:27.900
Now I'm back to a 100-gig virtual machine.

00:21:27.900 --> 00:21:30.099
So that is pretty much how snapshots work.