Sometimes it may happen that your vm has hanged and XenCenter controls(Reboot and Force Reboot) do not work.
You may see an error when you try to force a reboot (The operation could not be performed because a domain still exists for the specified VM.).
This is a process to reboot the hanged vm from the XenServer host console.
To get the uuid of the VM that is hung:
xe vm-list
Get the vm domain id by uuid:
list_domains
Then destroy the domain of the vm:
/opt/xensource/debug/destroy_domain -domid <domid>
Now you can force a reboot on your vm:
xe vm-reboot uuid=<uuid> --force
If it has no effect you can also try:
xe vm-reset-powerstate uuid=<uuid> --force
xm info
xm vcpu-list
xentop -v -b -i1
A quick note, there are actually 3 modes, not two when it comes to the drivers in use:
HVM: unmodified kernel and drivers using software emulated devices
PV-HVM: unmodified kernel with paravirtualized (Xen specific) disk and network drivers
PV: modified kernel and drivers
For a Xen guest/DomU you can do a very basic uname and lsmod with a grep to list the modules in use:
uname -a
lsmod | grep xen
If uname -a lists a kernel with the string "xen" in it, then you have a modified kernel and it's likely a PV guest, and you will see output from the lsmod command to confirm it. If you have output from the grep on lsmod but no sign of a modified kernel then you are PV-HVM. Without any sign of either, it's a straight HVM.
Note: Generally you can do more with VMs that have the PV tools installed, so that can be quite an obvious pointer, however you can fake the presence of the PV tools to allow suspend/resume etc. so you cannot rely on that in general.
dd over ssh
lvcreate vg00 -L 4G -n srv-test-disk #on choisi la même taille (4Go)
mkfs.ext4 /dev/vg00/srv-test-disk
ssh root@srv-xen.domain.com "dd if=/dev/vg00/srv-test-disk" | dd of=/dev/vg00/srv-test-disk
ou avec gzip pour aller BEAUCOUP plus vite
ssh root@srv-xen.domain.com "dd if=/dev/vg00/srv-test-disk | gzip" | gzip -dc | dd of=/dev/vg00/srv-test-disk