Showing posts with label XenServer. Show all posts
Showing posts with label XenServer. Show all posts

Tuesday, September 30, 2014

XenServer restarts unexpectedly

When configuring HA through the gui, the default timeout in case of a failure is 30 seconds. It's important to increase it to avoid unnecessary restarts:

1. Disable HA through the GUI.
2. Connect to the Pool Master and type the following:
xe pool-ha-enable heartbeat-sr-uuids=<NFS's SR Storage> ha-config:timeout=<TimeInSeconds>

Xen Server NFS timeout

To change the timeout of the NFS mounts:
vi /opt/xensource/sm/nfs.py xen
Change the mathematical expression from:
SOFTMOUNT_TIMEOUT  = int((40.0/3.0) * 10.0) # 1/10 s
To the desired timeout, change only the 10.0 value:
SOFTMOUNT_TIMEOUT  = int((40.0/3.0) * 40.0) # 1/10 s

Installing Xen Server updates

Upload the patch to the server:
xe patch-upload -s <hostname> -u root -pw <password>file-name=<path to xsupdate file>
Apply the patch to the master server:
xe -s <hostname> -u root -pw <password> patch-pool-apply uuid=<uuid from the step 1's output>
Verify that the servers were updated:
xe patch-list -s <hostname> -u root -pw <password> name-label=<Updates ID>

Verifying who the master is

Run the following command to find a server with the master role:
xe pool-list params=uuid,master
Copy the UUID of the server and paste it in the following template:
xe host-list uuid=<uuid from last step>