Lately we had some issues with setting up a lab environment for SAP SnapShot based processing with the usage of Nutanix AHV VM Guest pre and post scripting. Here is the complete guide to make them work:
- Build the VM with SCSI disks.
- Add an IP address and make sure AHV Virtual Cluster IP can communicate with the VM on TCP 2074
- Many Linux systems need additionally the dmidecode software package. You can install it for example with
yum -y install dmidecode - Install Nutanix NGT Tools
Go to Prism and select the VM
Klick on “Manage Guest Tools”, enable it and check “Mount Nutanix Guest Tools”
Login to the VM and run:
sudo mount /dev/sr0 /mnt
sudo /mnt/installer/linux/install_ngt.py
- Create the pre_freeze and post_thaw script/usr/local/sbin/pre_freeze
/usr/local/sbin/post_thaw (both need to exist)
On older AHV versions it needs to be
/sbin/pre_freeze
/sbin/post_thaw (both need to exist)
You can use any sh or python script.
For example
#!/bin/sh
yourcommandTip: Don`t create the script with a Windows editor as the new line command is different. - Create a Nutanix AHV Protection Domain and add a VM to it with enabled “Use application consistent snapshots”.
It do not matter if you schedule the protection group or not.
- Make sure there is no CD/DVD mounted/inside the drive. You can check the configuration of the VM:
8. Manually create a snapshot for the protection domain with enabled “Create application consistent snapshot” , schedule the protection domain or use Veeam Availability for Nutanix to backup the above created protection domain.
9. If you search for SAP HANA pre freeze post thaw scripts to bring the Database in a consistent state for backup, please check:
https://github.com/VeeamHub/applications/tree/master/sap-hana