The fact that the scripts are getting executed when you take manual snapshot confirms that the scripts are fine..
as per the documentation quiescing is supported and should work.
The guide explicitly mentions that in windows it uses snapshots and nothing about linux based system
this makes me think its not using snapshot in linux(we can check that from the logs).. also there is no VSS in SLES... not sure how the scripts are called here.
Can you share a screen shot of the configuration of SLES machines where the scripts are specified.. including location etc..
also if you can share the scripts please
I was just assuming that snapshots are used like with Windows VMs when the Quiesce.Option is set in vSphere Replication, especially because there is no mentioning of Linux-VMs and somehow the Quiesce has to be done...
I've made a pastebin about the vmware-tools-install script since you can't use hide-tags here:
The SLES Version:
SLES11SP4:/var/log # cat /etc/os-release
PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
SLES11SP4:/usr/sbin # cat pre-freeze-script
echo "$(date) pre-freeze" >> /tmp/snapshot.log
SLES11SP4:/usr/sbin # cat post-thaw-script
echo "$(date) post-thaw" >> /tmp/snapshot.log
SLES11SP4:/usr/sbin # ll pre-freeze-script & ll post-thaw-script
-rwx------ 1 root root 47 Apr 2 16:19 pre-freeze-script
-rwx------ 1 root root 46 Apr 2 16:19 post-thaw-script
+ Done ls $LS_OPTIONS -l pre-freeze-script
The Logfile which i use to see if the scripts get activated:
SLES11SP4:/usr/sbin # cat /tmp/snapshot.log
Tue Apr 2 16:21:07 CEST 2019 pre-freeze
Tue Apr 2 16:21:11 CEST 2019 post-thaw
Tue Apr 2 16:27:23 CEST 2019 pre-freeze
Tue Apr 2 16:27:26 CEST 2019 post-thaw
Wed Apr 3 10:31:57 CEST 2019 pre-freeze
Wed Apr 3 10:32:00 CEST 2019 post-thaw
Wed Apr 3 13:24:38 CEST 2019 pre-freeze
Wed Apr 3 13:24:41 CEST 2019 post-thaw
Wed Apr 3 13:31:17 CEST 2019 post-thaw
All those entries in the snapshot.log where made at the time i manually created a Quiesced Snapshot.
Unfortunately it seems i don't have a vmware.log where i can see more details about the snapshot creation
SLES11SP4:/var/log # ll vmware*
-rw------- 1 root root 14953 Apr 2 16:04 vmware-install.log
-rw------- 1 root root 741 Apr 3 09:25 vmware-network.1.log
-rw------- 1 root root 719 Apr 2 10:50 vmware-network.2.log
-rw------- 1 root root 719 Apr 3 09:26 vmware-network.log
-rw------- 1 root root 7882 Apr 3 09:26 vmware-vgauthsvc.log.0
-rw-r--r-- 1 root root 15279 Apr 3 12:49 vmware-vmsvc.log
So... apparently vSphere Replication uses Magic instead of Snapshots... The vmware.log from the SLES11SP4 VM shows only the following if Guest Quiesce is activated:
2019-04-03T13:52:35.199Z| vcpu-1| I125: ToolsBackup: changing quiesce state: IDLE -> STARTED
2019-04-03T13:52:37.201Z| vmx| I125: ToolsBackup: changing quiesce state: STARTED -> COMMITTED
2019-04-03T13:52:37.201Z| vmx| I125: ToolsBackup: changing quiesce state: COMMITTED -> FINISHING
2019-04-03T13:52:39.203Z| vmx| I125: ToolsBackup: changing quiesce state: FINISHING -> IDLE
2019-04-03T13:52:39.203Z| vmx| I125: ToolsBackup: changing quiesce state: IDLE -> DONE
If the Guest Quiesce Option is not activated, the vSphere Replication synchronization is not even mentioned in the vmware.log.
But it does something with the Descriptor and the Disks if you enable/disable Guest OS Quiesce which looks like a snapshot is produced (without triggering the pre-freeze or post-thaw scripts).
Logfile after activating Guest OS Quiesce:
2019-04-03T13:59:16.807Z| vmx| I125: VigorTransportProcessClientPayload: opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80159: Receiving HotPlugManager.BeginBatch request.
2019-04-03T13:59:16.808Z| vmx| I125: VigorTransport_ServerSendResponse opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80159: Completed HotPlugManager request.
2019-04-03T13:59:16.810Z| vmx| I125: VigorTransportProcessClientPayload: opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80164: Receiving Hbr.SetHBRDiskInfo request.
2019-04-03T13:59:16.810Z| vmx| A100: ConfigDB: Setting scsi0:0.hbr_filter.rdid = "RDID-be9d8477-98ec-42ba-bb84-29c052394a31"
2019-04-03T13:59:16.810Z| vmx| A100: ConfigDB: Setting scsi0:0.hbr_filter.persistent = "hbr-persistent-state-RDID-be9d8477-98ec-42ba-bb84-29c052394a31.psf"
2019-04-03T13:59:16.810Z| vmx| A100: ConfigDB: Setting scsi0:0.filters = "hbr_filter"
2019-04-03T13:59:16.810Z| vmx| I125: VigorTransport_ServerSendResponse opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80164: Completed Hbr request.
2019-04-03T13:59:16.811Z| vmx| I125: VigorTransportProcessClientPayload: opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80165: Receiving Hbr.SetHBRVmConfig request.
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.configGen = "7"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.gid = "GID-565f3dc3-9934-4126-a63f-b013d7849882"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.destination = "vSphere Replication Target Appliance"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.port = "31031"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.rpo = "15"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.quiesce = "TRUE"
2019-04-03T13:59:16.811Z| vmx| A100: ConfigDB: Setting hbr_filter.netCompression = "TRUE"
2019-04-03T13:59:16.814Z| vmx| I125: Hbr Vigor: HbrSetVmConfig done. Reloading vscsi filters.
2019-04-03T13:59:16.815Z| vmx| I125: VigorTransport_ServerSendResponse opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80165: Completed Hbr request.
2019-04-03T13:59:16.816Z| vcpu-0| I125: Destroying virtual dev for scsi0:0 vscsi=9305
2019-04-03T13:59:16.816Z| vcpu-0| I125: VMMon_VSCSIStopVports: No such target on adapter
2019-04-03T13:59:16.822Z| vmx| I125: VigorTransportProcessClientPayload: opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80169: Receiving HotPlugManager.EndBatch request.
2019-04-03T13:59:16.824Z| vcpu-0| I125: Closing all the disks of the VM.
2019-04-03T13:59:16.824Z| vcpu-0| I125: Closing disk 'scsi0:0'
2019-04-03T13:59:16.824Z| vcpu-0| I125: DISKLIB-VMFS : "/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4-flat.vmdk" : closed.
2019-04-03T13:59:16.824Z| vcpu-0| I125: Checkpoint_Unstun: vm stopped for 9993 us
2019-04-03T13:59:16.826Z| vcpu-0| A100: ConfigDB: Setting scsi0:0.redo = ""
2019-04-03T13:59:16.826Z| vcpu-0| I125: DISK: OPEN scsi0:0 '/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk' persistent R
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISKLIB-VMFS : "/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4-flat.vmdk" : open successful (10) size = 21474836480, hd = 7431621. Type 3
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISKLIB-DSCPTR: Opened : "SLES11SP4-flat.vmdk" (0xa)
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISKLIB-LINK : Opened '/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk' (0xa): vmfs, 41943040 sectors / 20 GB.
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISKLIB-LIB : Opened "/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk" (flags 0xa, type vmfs).
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISK: Disk '/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk' has UUID '60 00 c2 9c cc d0 0c 21-1b ae e6 d1 51 8b 28 42'
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISK: OPEN '/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk' Geo (2610/255/63) BIOS Geo (0/0/0)
2019-04-03T13:59:16.827Z| vcpu-0| I125: Creating virtual dev for 'scsi0:0'.
2019-04-03T13:59:16.827Z| vcpu-0| I125: DumpDiskInfo: scsi0:0 createType=11, capacity = 41943040, numLinks = 1, allocationType = 1
2019-04-03T13:59:16.827Z| vcpu-0| I125: SCSIDiskESXPopulateVDevDesc: Using FS backend
2019-04-03T13:59:16.827Z| vcpu-0| I125: DISKUTIL: scsi0:0 : geometry=2610/255/63
2019-04-03T13:59:16.831Z| vcpu-0| I125: SCSIFilterESXAttachCBRCInt: CBRC not enabled or opened without filters,skipping CBRC filter attach.
2019-04-03T13:59:16.831Z| vcpu-0| I125: SCSIFilterSBDAttachCBRC: device scsi0:0 is not SBD. Skipping CBRC attach SBD way.
2019-04-03T13:59:16.831Z| vcpu-0| I125: VMXNET3 user: Ethernet0 Driver Info: version = 16850432 gosBits = 2 gosType = 1, gosVer = 0, gosMisc = 0
2019-04-03T13:59:16.831Z| vmx| I125: VigorTransport_ServerSendResponse opID=ba8a47e2-1d40-44da-9cf8-eab7621979f4-HMS-148065-8-e0-cf2c-cf2d seq=80169: Completed HotPlugManager request.
2019-04-03T13:59:29.983Z| vcpu-0| I125: HBACommon: First write on scsi0:0.fileName='/vmfs/volumes/5c63d5b3-716a68f4-6f0d-005056ab0b5d/SLES11SP4/SLES11SP4.vmdk'
2019-04-03T13:59:29.983Z| vcpu-0| I125: DDB: "longContentID" = "d6e4136fd3baca7512ddc27f1869e967" (was "9b4da3aa293d1edfdc281907a96f4e3c")
2019-04-03T13:59:30.003Z| vcpu-0| I125: DISKLIB-CHAIN : DiskChainUpdateContentID: old=0xa96f4e3c, new=0x1869e967 (d6e4136fd3baca7512ddc27f1869e967)
Can you share the actual pre-freeze and post-thaw scripts.. the content of the scripts.
from some examples I have seen the pre-freeze and post-thaw scripts used for backup are used to quiese a certain application.. like db2, oracle , mysql etc..
I have not used them and cannot guarantee there working coz I did not get them from Vmware documentation. can we install the application and then try to use the scripts for the particular DB..
check below example..
pref-freeze script and post-thatw script..
if [ "$(id -u)" -eq "0" ]; then
exec su - sdb -c /home/sdb/suspend_logwriter
if [ "$(id -u)" -eq "0" ]; then
exec su - sdb -c /home/sdb/resume_logwriter
i haven't even tried to install oracle databases as i first wanted to see if vSphere Replication upon its replication cycle can even call the Pre-freeze and post-thaw scripts.
But since no snapshot is done on the source-VM the scripts won't get executed (altough SLES will be quiesced).
The contents from both scripts are in the opening post. As i said it is just a one-liner which should verify if that script runs by creating some text on the SLES VM.
vSphere Replication does not use vSphere snapshots to affect its replication, therefore your pre-freeze and post-thaw scripts will not get called (as you have already observed). To my knowledge this ability is not included.
Apparently it does use Snapshots for Windows VMs if Quiesce is enabled in vSphere Replication and pre-freeze and post-thaw scripts are executed. But you can't see the Snapshot-Tree or the Snapshot process as you would if you trigger a manual snapshot trough the webclient.
Unfortunately on SLES/Linux VMs it isn't using the same mechanic, as far as i could see, but it does the Quiesce, atleast thats what the vmware.log from the machine is telling me.
Ok, that's good to know. Did you install the Linux file system sync driver when you installed VMware Tools? What ESXi version is running underneath, and what type of Tools are you using?
- VMware ESXi, 6.7.0, 10302608
- SLES11SP4 <-- VM
- Official vmware-tools 10338
The VMware Tools Setup didn't gave me an Option to install any drivers. Gonna look into that...
Heres a pastebin from the VMware Tools Setup:
The vmConfig Tool is stopping a Guest filesystem driver... so i would assume it is installed?
Edit: It seems the Linux System Sync driver was an experimental thing as the vmware-tools-config.pl won't even show that option anymore...
I'm not sure sles 11sp4 is supported, someone mentioned this before, but might have missed this
They skip from Service pack 3 and go right to 12, which suggests there are problems in other versions.
As far as i could see with my testing:
If the Linux Version doesn't support Filesystem Quiesce you can't enable Quiesce in vSphere Replication for that particular VM.
I did verify that behaviour with CentOS 7 and SLES15 - it doesn't matter if you use Open-VM-Tools or VMware Tools.
So vSphere Replication seems to support more than that compatibility matrix says (Windows Server 2019 Quiesce in vSphere Replication also works with snapshots)
It wouldn't wonder me if this table has been updated the last time those service-packs where created for Linux Systems, atleast in the Linux Section.
But i'm gonna try it with both SP2 and SP3 Versions of SLES11 again.
Try with Vmware tools from the ESXi.. not the open vm tools
I'm already using the VMware Tools from ESXi.
But the open-VM-Tools also allow to enable "Quiesce" in vSphere Replication.
So i had a talk with VMware Support and it is working as designed. I've been told to submit a Feature Enhancement Request so that pre- and post scripts are getting called with vSphere Replication on Linux VMs.
If you're using vSphere Replication with Linux Sytems and wish that feature to be implemented, i think you should also create a Feature Enhancement Request. Feel free to include the Link to this discussion in the description.
I don't think that if a single soul makes such a request VMware will put it into the todo-list. Or it will be put somewhere at the end of the todo list.
But i assume pre-freeze and post-thaw skripts could help people with Linux Environments protected with vSphere Replication to make their lives easier because you could put your Database/Application into Backupmode or quiesce it so that you can even faster Restore from a Disaster :-)