歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 如何實現VM隨Xenserver主機自動啟動

如何實現VM隨Xenserver主機自動啟動

日期:2017/3/2 9:41:10   编辑:關於Linux

實現VM隨主機自動啟動的解決辦法

針對Linux虛擬機
1. 設置虛擬機所在的POOL支持auto_poweron
Enable the VM auto start feature on a pool :
xe pool-param-set uuid=… other-config:auto_poweron=true

2. 設置Linux虛擬機auto_poweron
Then on each VM you want to auto start you would execute:
xe vm-param-set uuid=… other-config:auto_poweron=true
針對Windows主機,可能上述設置對Windows主機不起作用,可以附加
add to your /etc/rc.local:(在XS的/etc/rc.local文件中添加如下代碼)

sleep 20
xe vm-start uuid=<vm1 uuid>

sleep 20
xe vm-start uuid=<vm2 uuid>

sleep 20
xe vm-start uuid=<vm3 uuid>

uuid的獲得xe vm-list

Copyright © Linux教程網 All Rights Reserved