XenServer 配置

增加本地存储
创建目录
[root@xenserver /]# mkdir -p /myiso
设置为sr
[root@xenserver /]# xe sr-create name-label=iso type=iso device-config:location=/myiso device-config:legacy_mode=true content-type=iso
通过FTP工具上传到该目录即可
挂载本地硬盘
查看所有硬盘了的id

[root@xenserver-spd ~]# ls -l /dev/disk/by-id/

记下硬盘的全称.接下来开始挂载 
[root@xenserver-spd ~]# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/wwn-0x600605b00338d8601fbe933b1838bbc6 name-label="Local storage 2" 

-config:device=/dev/disk/by-id/后面跟的是刚才记下的SCSI
name-label="Local storage 2"是你需要创建的名字.可以任意更改
XenServer虚拟机自动启动设置

一、设置pool自动启动

1. 查看pool的uuid

[root@xenserver-200 ~]# xe pool-list  
uuid ( RO): 2b8555d7-2712-0125-36d5-c34958e2d75e  
name-label ( RW):   
name-description ( RW):   
master ( RO): 93e1b8ca-615d-4018-a6a0-28ac0e01b97e  
default-SR ( RW): <not in database>  

2. 设置pool自启动

xe pool-param-set uuid=2b8555d7-2712-0125-36d5-c34958e2d75e other-config:auto_poweron=true 

二、设置虚拟机(VM)自动启动

1. 查看vm的uuid

[root@xenserver-200 ~]# xe vm-list 
uuid ( RO) : c0372ee2-027e-890d-f016-2420eac7477a 
name-label ( RW): Windows Server 2008 R2 (64-bit) (1) 
power-state ( RO): running 

uuid ( RO) : 28c3c8c9-984f-4f82-9bab-b54563a01943 
name-label ( RW): Control domain on host: xenserver-200 
power-state ( RO): running 

2. 设置vm自启动

xe vm-param-set uuid=c0372ee2-027e-890d-f016-2420eac7477a other-config:auto_poweron=true 

可以重启xenserver查看效果了。

 

转载于:https://www.cnblogs.com/xu360/articles/6604246.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值