RESTART A HANGED VIRTUAL MACHINE

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

Note that it may take up to 3 minutes to complete.

Restart a hanged virtual machine

install xen-tools ubuntu

Finally we install the XenServer tools.

  • Boot the VM and log in with SSH
  • In XenCenter, attach xs-tools.iso to the DVD drive of the VM
  • Mount xs-tools.iso, install the correct XenServer Tools package (replace amd64 with i386 if necessary) and unmount xs-tools.iso
sudo mount /dev/xvdd /mnt
sudo dpkg -i /mnt/Linux/xe-guest-utilities_5.5.0-466_amd64.deb
sudo umount /mnt
  • In XenCenter, detach xs-tools.iso from the DVD drive of the VM (this ensures that XenServer does not complain about too many bootable devices)
  • Reboot the VM and log in with SSH
  • Make sure the services run at boot time
sudo update-rc.d -f xe-linux-distribution remove
sudo update-rc.d xe-linux-distribution defaults

go to update pack web  :  http://packages.ubuntu.com/lucid-updates/amd64/linux-image-2.6.32-48-generic/download
  • Reboot the VM for the last time
  • Restart XenCenter to be able to log in to the console of the VM

 

XEN format and add new haddisk

fdisk-l

fdisk /dev/sdx

Command (m for help): [n]
Command action
e   extended
p   primary partition (1-4)
[p]
Partition number (1-4): [1]
First cylinder (1-4865, default 1): [1]
Last cylinder or +size or +sizeM or +sizeK (1-4865, default 4865): [4865]

Command (m for help): [t]
Partition number (1-4): [1]
Hex code (type L to list codes): [83]

Command (m for help):[w]
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

mkfs.ext3 /dev/sdx

xe host-list

uuid ( RO) : ba3d140c-3de5-499b-b831-7c40d82958a9
name-label ( RW): xs-tarenz01
name-description ( RO): Default install of XenServer

 

xe sr-create host-uuid=ba3d140c-3de5-499b-b831-7c40d82958a9 content-type=user type=lvm device-config:device=/dev/sdx shared=false name-label=”Local storage”

http://www.skullbox.net/newsda.php

Upload ISO files into XenServer 5.5-6.0

1) SCP the ISO files into the folder called /ISO or any folders that you like
2) symbol link it
#cd /var/opt/xen/iso_import ln -s /opt/xensource/packages/iso/CentOS-5.3-i386-bin-DVD.iso
3) rescan the ISO files folder.in order to have it appear under the XenServer Client Console
#xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=isoDone