VMware Cloud Community
gmetman
Contributor
Contributor
Jump to solution

Why do snapshots take so long to create?

Dear all,

I know REDO logs from ESX2 were replaced with the "most powerful" snapshots in ESX3.

There are however a few things I do not understand:

- why do snapshots take soooooooooooo long to create, while REDO logs were created instantaneously? What additional step is done here ?

- how can we now use the old "second REDO log trick" which could be used in the old times to minimize the freezing time of a VM when committing a big REDO log. For those who did not use ESX2, here is the trick. While you commit a REDO log, the VM gets frozen for a short time. The larger the REDO log, the longer the time. The trick consisted in creating a second REDO log before committing a large primary REDO log. In these conditions, when you committed the first REDO log, the VM was not frozen (it could use the second REDO log). Only during the commit of the second REDO log did the VM get frozen. But this second REDO log was always small (it was used only during the commit of the fiirst REDO log), and the freezing time was therefore always very small.

I would be glad to get explanations (or the link to an useful technical paper, if one is available).

Best regards,

Guillaume Metman.

Reply
0 Kudos
1 Solution

Accepted Solutions
jccoca
Hot Shot
Hot Shot
Jump to solution

Hi,

It works for me without problem, try changing localhost for your hostname.

View solution in original post

Reply
0 Kudos
9 Replies
jccoca
Hot Shot
Hot Shot
Jump to solution

If you select snapshot virtual machine's memory it saves the data in memory and depending on your vm's memory it can take a long time.

bertdb
Virtuoso
Virtuoso
Jump to solution

I concur with jccoca: try to snapshot without the memory. Is that slow as well ?

The equivalent of the redo procedure is: creating a second snapshot (no mem), deleting the first one (=applying the first - large - set of changes), then deleting the second one (=applying the second - smaller - set of changes).

Reply
0 Kudos
gmetman
Contributor
Contributor
Jump to solution

OK, thanks!

I did not get the fact that memory was now included in snapshots.

As far as the "second redo trick" is concerned, since I use the old Perl/ksh APIs (which are getting deprecated), it looks like I can only manage one single snapshot...

Do you know where I can find code samples using the new WS API ?

Best regards,

Guillaume Metman.

Reply
0 Kudos
jccoca
Hot Shot
Hot Shot
Jump to solution

You can manage single snapshots with vcbsnapshot

Reply
0 Kudos
gmetman
Contributor
Contributor
Jump to solution

I agree.

But it looks like vcb* only works if you have a SAN.

This is not my case, since I have only local storage.

By the way, I once understood that vcb* could be used without a SAN, provided you are in the Service Console. But I never got any confirmation of this, and could not make it work myself...

Reply
0 Kudos
jccoca
Hot Shot
Hot Shot
Jump to solution

It works without SAN from the service console.

Try this:

1st you have to find the VmId, you can do this with:

vcbVmName -h host_name -u user -p password -s Any

2nd Add a snapshot to one of your VMs with:

vcbSnapshot -h host_name -u user -p password -c moref:VmId test

gmetman
Contributor
Contributor
Jump to solution

Hi.

I managed to do what I wanted with vcbSnapshot.

By the way, thanks for the confirmation that vcb* should work from the Service Console.

This brings me to a new question. How to make vcbMounter work ? It fails with a weird error (see hereunder). Thanks in advance for any hint.

Best regards,

GM.

\################## vcbVmName command and results ###########

sudo /usr/sbin/vcbVmName -h localhost -u gmetman -p ******** -s Any

\[2007-08-31 14:51:53.882 'App' 3076440192 info] Current working directory: /home/gmetman

\[2007-08-31 14:51:53.913 'BaseLibs' 5245872 warning] \[Vmdb_Unset] Unsetting unknown path: /vmomi/

Found VM:

moref:80

name:PERSO_GME_ARCELOR_RECETTE_1

uuid:564d5be0-ec27-c490-958d-8698bd30f587

ipaddr:192.168.1.246

Found VM:

moref:96

name:PERSO_GME_ARCELOR_RECETTE_2

uuid:564d12eb-4517-182a-0d9d-5d074969caa6

ipaddr:192.168.1.247

\################## vcbMounter command and results ###########

\################## (in max verbosity mode) ###########

sudo /usr/sbin/vcbMounter -h localhost -u gmetman -p ******** -a moref:80 -r /backup/vm80 -t fullvm -m cos -L 6

\[2007-08-31 14:57:36.060 'App' 3076444288 info] Current working directory: /home/gmetman

\[2007-08-31 14:57:36.061 'vcbMounter' 3076444288 trivia] Initializing SSL context

\[2007-08-31 14:57:36.062 'BaseLibs' 3076444288 info] System libcrypto.so.0.9.7 library is older than our library (90701F < 90709F)

\[2007-08-31 14:57:36.067 'App' 3076444288 info] Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 120000000

\[2007-08-31 14:57:36.067 'vcbMounter' 3076444288 info] Connecting to host localhost on port 902

\[2007-08-31 14:57:36.093 'vcbMounter' 3076444288 verbose] Connected to stream: \[N7Vmacore3Ssl13SSLStreamImplE:0x835a000]

\[2007-08-31 14:57:36.094 'BaseLibs' 2657200 warning] \[Vmdb_Unset] Unsetting unknown path: /vmomi/

\[2007-08-31 14:57:36.168 'vcbMounter' 3076444288 info] Authenticating user gmetman

\[2007-08-31 14:57:36.226 'vcbMounter' 3076444288 info] Logged in!

\[2007-08-31 14:57:36.227 'vcbMounter' 3076444288 info] Performing SearchIndex find.

\[2007-08-31 14:57:36.394 'vcbMounter' 3076444288 info] MoRef 80 is a valid virtual machine.

\[2007-08-31 14:57:36.395 'vcbMounter' 3076444288 info] Attempting index search.

\[2007-08-31 14:57:36.396 'vcbMounter' 3076444288 info] Found VM using index search.

\[2007-08-31 14:57:36.396 'vcbMounter' 3076444288 info] Got VM MoRef

\[2007-08-31 14:57:36.421 'vcbMounter' 3076444288 error] Error: FindHostByName: Cannot search for empty hostname.

\[2007-08-31 14:57:36.446 'App' 3076444288 verbose] Got vmdb error -14 (Pipe connection has been broken) when invoking \[logout] on \[vim.SessionManager:ha-sessionmgr]

\[2007-08-31 14:57:36.446 'vcbMounter' 3076444288 info] Error on logout (ignored): vmodl.fault.HostNotReachable

\[2007-08-31 14:57:36.447 'vcbMounter' 3076444288 verbose] Shutting down VMDB service...

\[2007-08-31 14:57:36.447 'vcbMounter' 3076444288 verbose] Unregistering callback...

\[2007-08-31 14:57:36.447 'vcbMounter' 3076444288 verbose] ...done

Reply
0 Kudos
jccoca
Hot Shot
Hot Shot
Jump to solution

Hi,

It works for me without problem, try changing localhost for your hostname.

Reply
0 Kudos
gmetman
Contributor
Contributor
Jump to solution

Hi.

Thank you for your help.

I finally managed to have it work (since I use the ESX console without any DNS, I have some trouble configuring host names and co. through ESX's standard screens).

Best regards,

GM.

Reply
0 Kudos