Remote ESXi VM and Snap management via Soap

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

gea

Well-Known Member
Dec 31, 2010
3,335
1,297
113
DE
to automate ESXi management. I included it in napp-it to create safe ZFS snaps of VMs on ZFS/NFS filesystems with embedded ESXi snaps. This allows a ZFS snap rollback/ restore where you can then go back to the ESXi snap with hot memory or coalesce state (freezed VM filesystem ).

Without this a ZFS snap of a VM is like a sudden poweroff. You cannot be sure if the VM in a ZFS snap is not corrupted. With an included ESXi snap you can create ongoing ZFS snaps of a running VM ex on a hourly or daily base.

Unlike ESXi delta snaps you can hold hundreds or thousands of ZFS snaps and a ZFS snap is a real backup as you can recover a VM from it and save it via replication, see https://forums.servethehome.com/ind...laris-news-tips-and-tricks.38240/#post-367124

soap2.png
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,335
1,297
113
DE
Update: Mass snap management or ESXi included in current napp-it 23.dev

data.png
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,335
1,297
113
DE
Update: Method to include ESXi hotmemory or quiesce snaps in ZFS snaps
Up from newest napp-it 23.dev ssh and soap are supported methods

Why:
ESXi snaps are save. They can include memory state (restore to online state) or
quiesce where the guest filesystem is freezed during a snap (require VMware tools).
ESXi snaps are limited in number (only a few) and age (only for a few days).
You cannot use ESXi snaps for backups as you cannot rollback when the main VM file is corrupted.

ZFS snaps are not limited in numbers or age. As a ZFS snap includes all files at snaptime,
you can backup and fully restore a VM from a ZFS snap. But as a ZFS snap is like a sudden
powerloss, a VM in a ZFS snap is not save and can be corrupted.

The solution is to include save ESXi snaps within your ZFS snaps.
A VM restore is then:
- power down VM
- restore VM folder via Windows SMB and previous version or ZFS rollback
- reload VM settings via Putty and vim-cmd vmsvc/reload vmid or
napp-it menu System > ESXi > SSH: list snaps
- restore ESXi snap via ESXi webmanagement

new in current napp-it 23.dev from today: ESXi remote management via soap or SSH

zfs_esxi_snaps.png
 

gea

Well-Known Member
Dec 31, 2010
3,335
1,297
113
DE
Update
napp-it 23.dev (apr.30) can include ESXi snaps (quiesce or hotmem) in ZFS snaps (replications or autosnap) and restore a VM from a ZFS snap with the option to rollback to last ESXi snap

Setup
Use a ZFS filesystem via NFS to store VMs
Update to napp-it 23.dev (napp-it free, use an evalkey from napp-it.org to update to .dev).
Configure SSH (see menu System > ESXi)
Add ip of your ESXi server in autosnap or replication job settings (esxi_ip)
Create ZFS snaps

Restore a VM from a ZFS snap
Use menu System > ESXi Y> VM restore, select a VM and a snap to restore

restore.PNG

Update:
You can download a ready to use ESXi .ova template with current OmniOS 151046lts and napp-it.dev with Perl modules for SSH and SOAP installed
 
Last edited: