Saturday, 30 November 2013

Xenserver VM force reboot not working?

xe vm-shutdown force=true vm=
xe vm-reset-powerstate force=true vm=



Log in to the host
Get the UUID of the VM that is hung
Run list_domains to get the domain ID of the VM
Run a destroy_domain on the domain ID
Now do a force reboot of the VM
Example CLI steps

xe vm-list name-label=vm001
list_domains|grep 6512c54b-4f3f-6737-3bc7-68b377f15a6a
/opt/xensource/debug/destroy_domain -domid 450
xe vm-reboot force=true vm=vm001
The VM should now be up and running again.

Xenserver 6.1 CLI commands specific for Storage Migration





Check SR uuid
xe sr-list name-label=mystorage
List disks for vm
xe vm-disk-list vm=myvmname
List specific VDI
xe vdi-list name-label=myvdiname
offline migrate disk
xe vdi-copy sr-uuid=mystorageuuid uuid=myvdiuuid
live migrate disk
xe vdi-pool-migrate sr-uuid=mystorageuuid uuid=myvdiuuid
check copy task
xe task-list name-label=VDI.copy
check migrate task
xe task-list name-label=VDI.pool_migrate 

Change Master

xe pool-designate-new-master host-uuid=`xe host-list name-label=HOSTNAME --minimal`

XenServer Command Line Commands

Find out name of VMs running on a specific host

xe vm-list resident-on=`xe host-list name-label=HOSTNAME --minimal`|grep name-label|cut -f9- -d" "

Thursday, 7 November 2013

[Howto Fix] Table './eximstats/sends' is marked as crashed and should be repaired

mysql> repair table eximstats.sends;


mysqlcheck -u root --check auto-repair --optimize all-databases

How to check last reboot date and time in linux servers

You can check the last reboot date and time in linux servers by using the following commands.
# who -b
#last reboot

Command to check load in all the VPS in a nodes

vzlist -o hostname,laverage,veid

HOSTNAME         LAVERAGE       VEID