背景:xenserver在国内用的很少,资料,都是在国外找的,主要就是想设置自动重启,当断电时候!
1、如何识别U盘方法
u盘的系统不是linux文件系统的一部份,只有把u盘挂在linux系统下;所以必须挂在一个linux的一个空目录下;
以下/dev/sdc1就是u 盘的目录
mount /dev/sdc1 /mnt (注意要有个空格,还要确定mnt是个空目录)
取U盘之前先要 umount /mnt
参考文档:https://www.citrix.com/blogs/2009/02/23/accessing-a-usb-drive-in-xenserver-part-1/
2、xenserver和vm自动重启
a:先xenserver自动重启
b:再虚拟自重启;
First enable auto-start on XenServer:# xe pool-list
uuid ( RO) : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Copy UUID and use command:# xe pool-param-set uuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX other-config:auto_poweron=true
Next find VM to enable auto-start:
# xe vm-list
uuid ( RO) : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
name-label ( RW): Control domain on host: XenSever
power-state ( RO): running
uuid ( RO) : AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA
name-label ( RW): VM_no_1
power-state ( RO): running
uuid ( RO) : BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
name-label ( RW): VM_no_2
power-state ( RO): running
To enable auto-start for VM_no_1 copy it’s UUID and use paste to command:# xe vm-param-set uuid=AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA other-config:auto_poweron=true
Finally you can modify the auto-start order and delays in XenCenter.