Please only execute these commands if ur comfy with ssh and xenserver, if u dont know what ur doing u can get urself in alot of trouble by killing the wrong vm’s etc. Dont blame me if u seriously break something :).
Try it first the normal way if a powerstate is stuck…
xe vm-reset-powerstate force=true vm= “windows2″
If this does not work, try the the next method.
List the domains on the server and grep the UUID of the hung vm. U can find this info under the general tab in xencenter or under # xe vm-list on the host where its running.
list_domains | grep 84e7e227-63b3-c518-4904-5d8b9cba7091
The number it finds under the uuid is the domain of the hung vm.
cd /opt/xensource/debug/xenops destroy_domain -domid 27
VDI is not available:
If u have any snapshots, remove those.. it will confuse u.. there might be a way to do it without removing them, but i do that most of the times.. or i just convert them to a new vm.
On the xenserver where the vm was last active and running:
xe vdi-list | grep -B1 [vmname] | grep uuid
Use that uuid to paste in the following command:
xe vdi-forget uuid=4dfb5f8c-0df7-4b4a-b5b0-c484c2f7247a
This will make your vm loose from the disk, and u need to reattach it.
Do a rescan on your storage repository, and click the vm u just deattached the disk of and reattach it.
Xenserver master change/switch:
First disable the High availibilty on the pool of servers:
Check what server is the poolmaster(99% its the server in the top):
Copy the UUID from the new master host, paste/execute the next command with the new uuid (just a example):
xe pool-designate-new-master host-uuid=116ceeb1-c923-40ec-8ac6-243c89512908
Your xencenter will disconnect for a abit till its fully back again, and no servers are in mainance, activate HA again:
1 Aplication Better Application Menu, un altfel de lansator de aplicatii pentru KDE
2 Aplication Xfce 4.18 will be coming soon to MX-21 users
3 Tutorial Install third party codecs and video player on Manjaro Linux
4 Distro Vanilla OS 22.10 Kinetic with Apx, GNOME 43, ABRoot
5 IOT MycroftAI team packaged up and released soon in Debian.
6 Aplication First maintenance release of the Kdenlive 22.12 series has been received