CentOS 7 調整text console解析度

環境

XenServer 7.0下面的CentOS7虛擬機

  • 編輯/etc/default/grub,加入video=640×480
  • GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet video=640x480"
    GRUB_DISABLE_RECOVERY="true"
    

     

  • grub2-mkconfig -o /boot/grub2/grub.cfg
  • reboot

 

參考

  • https://www.centos.org/forums/viewtopic.php?t=48413

將VM從XenServer批次搬移到另一台XenServer

環境

兩台XenServer需在同一個pool

#!/bin/bash
if [ $# -eq 0 ]; then
  echo "Usage: $0 <Host UUID(SRC)> <Host UUID(Dest)>"
else

  SRC_HOST=$1
  DST_HOST=$2

  VM=$(xe vm-list resident-on=$SRC_HOST is-control-domain=false params=uuid|grep uuid|awk '{print $5}')

  for i in ${VM[@]};do
     echo -n "xenmotion: $i ...."
     xe vm-migrate uuid=$i host=$DST_HOST --live
     #echo "xe vm-migrate uuid=$i host=$DST_HOST --live"
     echo "Done"
  done
fi

 

 

XenServer 6.2 NFS SR無法移除解法

問題:

供裝/刪除VM時NFS Storage本身或是Storage網路有問題,導致供裝/刪除VM程序不完整,此時會造成VM上Disk相關資訊殘留在XenServer上

參考資料:
http://playingwithtechnology.com/unable-to-delete-xenserver-vdi/
http://discussions.citrix.com/topic/307439-vdi-in-use-but-its-not-really/

解法:

#找到要修復的SR UUID
xe sr-list|grep omnios-zfs01 -B 3

#列出此SR內之vdi
xe vdi-list sr-uuid=d034edd0-aa37-be67-ef99-abb1e89e88ba

#找到要刪除之vdi uuid後先嘗試刪除
xe vdi-destroy uuid=777f68db-0260-448c-a93c-cd610a734aff

#若無法直接刪除則需找到vbd uuid將其unplug及destroy
xe vbd-list vdi-uuid=777f68db-0260-448c-a93c-cd610a734aff
xe vbd-unplug uuid=ba59a452-ee88-d51c-998e-125511e4c80c
xe vbd-destroy uuid=ba59a452-ee88-d51c-998e-125511e4c80c

圖檔補充說明:

xenserver-datastore-storage issue

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xenserver-datastore-storage issue-fix