vmware-snapshot - what is it doing exactly ?

Status
Not open for further replies.

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
Hi all,

I'm looking to use vmware snapshot in uses-cases where several esxi hosts will share the sames NFS datasets.

What happend when a vmware snapshot is run ?
FreeNAS will connect to the ESXi host, check which VMs in the ESXI inventory are using the datastore and snapshot them ?

Is it then safe to perform vmware snapshots on multiples ESXi sharing the same NFS share ?

Thanks.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Have you read the documentation?
I also 100% sure how the vm-snapshot work. The documentation is very basicly. I have set up the snapshot, but nothing happens.
Have I to do them on esxi side first?
Will be only do snapshotsfor the Freenas VM or for all vms on the esxi host?

Thanks for more advice
 
Last edited:

Artion

Patron
Joined
Feb 12, 2016
Messages
331
As I understand the documentation and VMware snapshots, it must be this way: you set up snapshots on ESXI host as you are used to. Then set up FN vmware snapshots so that FN creates a ZFS snapshots of those of ESXI and deletes them on ESXI. To control snapshots from more than one ESXI hosts you must use vCenter or use different datasets on FN.

This is what I understand.
 

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
Thanks for your answer.

The documenation only say it "will automatically snapshot any running VMware virtual machines before taking a scheduled or manual ZFS snapshot". This is not explicit.

Anyway my main concern is about having to perform multiples "vmware snapshot" on the same dataset for several ESXi hosts.
Is it working and safe ?

PS: ArgaWoW, please don't do iSEX on my thread :smile: (sorry...)
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Thanks for your answer.

The documenation only say it "will automatically snapshot any running VMware virtual machines before taking a scheduled or manual ZFS snapshot". This is not explicit.

Anyway my main concern is about having to perform multiples "vmware snapshot" on the same dataset for several ESXi hosts.
Is it working and safe ?

PS: ArgaWoW, please don't do iSEX on my thread :smile: (sorry...)
Corrected my tipo [emoji14]

I have tryed to to snapshots in ESXi. After this my vm was broken. I Don't remember the exact error :/ I have read this is an issue with filefragmentation or something. I have to reinstall freenas after this so now I am scared a little bit to use it again.

Do you guys run in such problems like me?
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
Thanks for your answer.

The documenation only say it "will automatically snapshot any running VMware virtual machines before taking a scheduled or manual ZFS snapshot". This is not explicit.

Anyway my main concern is about having to perform multiples "vmware snapshot" on the same dataset for several ESXi hosts.
Is it working and safe ?

The documentation is accurate. The point is that you want esxi to snapshot the VM (and thereby preserve it with it's virtual memory intact) before freenas snaps the dataset. As I read it, that quote is accurate per vmware-snapshot task.

If you are using several ESXi hosts you should be using vcenter (per the documentation). I'm not sure freenas allows configuring a vmware snapshot for a given dataset to connect to multiple ESXi servers. Which is why there is a requirement to use vcenter, which would do the communication to all of the ESXi servers if needed. But lets say it does. i.e you configure multiple vmware-snapshots, one to each esxi server. And on each of those you list a datastore that is hosted on the freenas dataset (which is the same for all of them). I'm not sure how freenas treats this case. I can imagine a couple ways freenas might do this: (1) run all vmware-snapshot jobs, then snap the dataset, or (2) run a vmware-snapshot job and immediately snap the dataset. (2) would end up with multiple freenas snapshots of the dataset in quick succession. I have no idea if this would work as I've not tested it. But as I read the quote above, I suspect (2) is how the system would approach it.

I can tell you that using vcenter as the host in the vmware-snapshot task does work with multiple esxi hosts and it creates a single freenas snapshot of the target dataset.

Also, note that any VM with passthrough will not snapshot. Just a reminder.
 

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
Thanks for your answer but I am not clustering, I plan to share the dataset through NFS.

I don't think the documentation say anywhere I have to use Vcenter for this use case ?
My understanding is the requirement to have a cluster (and de facto Vcenter) is about iSCSI, not about NFS or vmware snapshot.
The documentation only say that if I use a cluster (not my case) I must target the vcenter instead of the hosts.

Vmware snapshot are supposed (found somewhere in forums, not explicited in the documentation...) to be working for both iSCSI and NFS.
 
Last edited:

toadman

Guru
Joined
Jun 4, 2013
Messages
619
Right, you can manage multiple esxi hosts independently without vcenter. My mistake as the freenas documentation does specifically state, "cluster." (Though some find it easier to manage a multiple host environment through vcenter as a single pane of glass management window. You do not have to use actual clusters for vcenter to be of value.)

So I think the answer to your original question would be, "yes, it's safe." But I would test it.

The freenas documentation implies that before doing a snapshot on a dataset it will process the entire list of vmware-snapshot tasks and run each one that refers to that dataset. I suppose there is a chance it might stop after the first vmware-snapshot task listing the dataset in question. But that's why I would just test it. I don't see how it will break anything if you just set it up. If it doesn't work, some VMs just won't have the snapshot prior to the dataset being snapped. You would check by cloning the dataset in question and looking at the vm files for the vmware snapshots.
 

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
I tested and FreeNAS 11 does neither list or accept the NFS datastores in the vmware snapshot settings... Only local and iscsi targets are listed. I got a "Datastore not found" error if I try to force it.

I have to check if it is a bug. This article have a screenshot with FreeNAS 9.3 accepting the NFS datastore :
https://b3n.org/freenas-9-3-on-vmware-esxi-6-0-guide/

Edit: this is a bug and has been corrected in last release a few day agos (11.0 U1): https://bugs.freenas.org/issues/24570

I also found a deep review of what vmware snapshot does :
http://blog.yavilevich.com/2016/03/...oving-vmware-snapshot-integration-in-freenas/

I tested with two VM on different ESXi and it worked, both VM were snapshoted.
 
Last edited:

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Hi,
just an small off-topic question:
Is the free version of ESXi also supported? I think not, because the API for backup is not licensed.

Thanks!
 

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
Hi,
just an small off-topic question:
Is the free version of ESXi also supported? I think not, because the API for backup is not licensed.

Thanks!
My test lab was running with the 60 days trial license so I cannot be 100% sure.
But from what I know it uses some wrapper to esxcli command which does not require any license.
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
My test lab was running with the 60 days trial license so I cannot be 100% sure.
But from what I know it uses some wrapper to esxcli command which does not require any license.
That would be AWESOME!
 

IceBoosteR

Guru
Joined
Sep 27, 2016
Messages
503
Being able in a few clicks to automate synchronised snapshots of VMs and replication is the killer feature that brings me to FreeNAS.
I defenetly agree. I have not tested it yet, maybe at the weekend I will find some time for that.
But if its working without the licenced API, it is truely a "killer feature" ;)
 
Status
Not open for further replies.
Top