VMware Cloud Community
meoli
Enthusiast
Enthusiast
Jump to solution

vSphere Replication 8.1 Pre-Freeze and Post-Thaw Skripts aren't executed on SLES VMs

Hello there,

so i have the following Lab-Environment:

vCenter 6.7 Build 8170161

nested ESXi ESXi, 6.7.0, 10302608

Site Recovery Manager 8.1 aswell as vSphere Replication 8.1.0

In this setup i have Windows 2016, Windows 2012 and SLES 15, SLES12SP4, SLES11SP4 running.

I have enabled Guest OS Quiesce for all Replications for all VMs where it is possible (SLES15 won't let you do that and it doesn't matter if there are VMware Tools or open vm tools installed).

Compatibility Matrices for vSphere Replication 8.1.x

After configuring the replication with Guest OS Quiesce enabled, i have created the pre-freeze and post-thaw scripts on each VM in their corresponding folders.

On both Windows Systems the Scripts are getting executed when vSphere Replication does the sync which looks good and is expected due to the fact that vSphere Replication uses Snapshots instead of change block Tracking for the synchronation if Guest OS Quiescing is enabled.

Unfortunately these scripts aren't executed on SLES11 SP4 and SLES12 SP4 trough the replication cycle, but if manually create a Snapshot on the VM with Guest OS Quiesce enabled, the Scripts are executed.

Does that mean vSphere Replication is not doing Snapshot based replication on SLES VMs? Is the Quiesce Option even working? Or may this even be a Bug?

The reason why i'm testing that out is to use those scripts on SLES VMs to set Databases in Backup mode so that they won't get corrupted.

Best regards

Oliver

1 Solution

Accepted Solutions
meoli
Enthusiast
Enthusiast
Jump to solution

Hey there!

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 🙂

View solution in original post

Reply
0 Kudos
14 Replies
hussainbte
Expert
Expert
Jump to solution

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.

Compatibility Matrices for vSphere Replication 8.1.x

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

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
meoli
Enthusiast
Enthusiast
Jump to solution

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:

VMware Tools Setup SLES11 SP4 - Pastebin.com

The SLES Version:

SLES11SP4:/var/log # cat /etc/os-release

NAME="SLES"

VERSION="11.4"

VERSION_ID="11.4"

PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"

ID="sles"

ANSI_COLOR="0;32"

CPE_NAME="cpe:/o:suse:sles:11:4"

The Scripts:

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

[1] 5539

-rwx------ 1 root root 47 Apr  2 16:19 pre-freeze-script

-rwx------ 1 root root 46 Apr  2 16:19 post-thaw-script

[1]+  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 Smiley Sad

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

Edit:

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 [0]: "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)

Reply
0 Kudos
hussainbte
Expert
Expert
Jump to solution

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.. 

#!/bin/sh

if [ "$(id -u)" -eq "0" ]; then

exec su - sdb -c /home/sdb/suspend_logwriter

fi

#!/bin/sh

if [ "$(id -u)" -eq "0" ]; then

exec su - sdb -c /home/sdb/resume_logwriter

fi

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

Hello huassainbte,

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.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

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.

Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

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?

Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

  • 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:

VMware Tools Setup SLES11 SP4 - Pastebin.com

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...

Reply
0 Kudos
sjesse
Leadership
Leadership
Jump to solution

I'm not sure sles 11sp4 is supported, someone mentioned this before, but might have missed this

Compatibility Matrices for vSphere Replication 8.1.x

pastedImage_1.png

They skip from Service pack 3 and go right to 12, which suggests there are problems in other versions.

Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
hussainbte
Expert
Expert
Jump to solution

the OS should be supporting filesystem quiesing else why would vmware doc says that it supports.

notes from interoperability matrix:

vSphere Replication 8.1.x supports quiescing for Linux guest OS only for virtual machines that run on ESXi 6.0 Update 3 hosts or later.

pastedImage_0.png

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
Reply
0 Kudos
hussainbte
Expert
Expert
Jump to solution

Try with Vmware tools from the ESXi.. not the open vm tools

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

I'm already using the VMware Tools from ESXi.

But the open-VM-Tools also allow to enable "Quiesce" in vSphere Replication.

Reply
0 Kudos
meoli
Enthusiast
Enthusiast
Jump to solution

Hey there!

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 🙂

Reply
0 Kudos