Skip to content

Archive

Category: XenServer

I come across a production server stuck on shutdown process during resource allocation.

Follow this steps to fix the issue as it worked for me,

  1. “xe vm-list” to get the uuid of the VM that is hung
  2. “list_domains” to list the domain uuid’s so you can determine the domain # of the VM above by matching the uuids from this output with the uuid for your VM from the previous command.
  3. “/opt/xensource/debug/destroy_domain -domid X” where X – domain number from the previous command
  4. “xe vm-reboot uuid=Y –force” where Y – uuid from the first vm-list command for your VM. (name-label may work but I didn’t try)

The CLI must be used to backup the pool database. To obtain a consistent pool metadata backup file, run xe pool-dump-database against the host and archive the resulting file. The backup file will contain sensitive authentication information about the pool, so ensure it is securely stored.

Example: xe pool-dump-database file-name=/backup/poolbackfile

To restore the pool metadata, use the xe pool-restore-database from a previous dump file. If your XenServer host has died completely then you must first do a fresh install, and then run the xe pool-restore-database command against the freshly installed host.

After a restoration of metadata, some VMs may still be registered as being “suspended”, but the Storage Repository with the suspended metadata is no longer available since the host has been reinstalled. To reset these VMs back to the halted state so that they can be started up again, use the xe vm-reset-powerstate command.

You will have to securely store  file in a safe place rather than keeping in the same XenServer. The following steps shows how to mount Windows share in XenServer;

[root@xensvr01 ~]#mount -t cifs //192.168.20.30/xenbackup /mnt/backup -o username=bawin,password=xJv&kt5CR,domain=shareitskills

Copy the file to mounted drive;

[root@xensvr01 ~]#cp /root/poolbackfile /mnt/backup/poolbackfile