Citrix XenCenter7.2客户端中设置开机启动

2023-06-01 00:00:00 客户端 设置 开机

我的开发环境是XenServer环境安装的虚拟机,之前停电导致没启动,我就上网找了一下,有设置开机启动的功能,所以要设置一下。

写一篇博文记录之,以供自己及有需要的老铁查阅


Citrix XenCenter :

该技术是专为虚拟应用程序和桌面工作负载而优化的高性能虚拟机管理程序,基于 Xen 项目虚拟机管理程序,现在称为 Citrix Hypervisor


官方手册:

https://docs.citrix.com/zh-cn/xenserver/


下载安装Citrix软件,我这已安装好 windows安装就不说了

1.png


双击登录进来

我的用户名:root  密码:123456

2.png


中间导航栏点击Console控制台,就是一个linux系统一样,也需要登录,用上面的信息

Citrix XenServer Host 7.2.0
System Booted: 2021-06-05 12:00
Your XenServer Host has now finished booting. 
To manage this server please use the Citrix XenCenter application. 
You can install XenCenter for Windows from the XenServer installation media.
You can connect to this system using one of the following network
addresses:
172.18.1.4
XenServer Host SSL certificate fingerprint:
C4:D0:4D:15:9D:9B:37:22:9D:6E:4E:2D:42:3F:D1:E2:AB:F7:1F:86
Password: 
Last login: Mon Mar 22 17:58:01 on pts/0
XenServer dom0 configuration is tuned for maximum performance and reliability.
Configuration changes which are not explicitly documented or approved by Citrix
Technical Support, may not have been tested and are therefore not supported. In
addition, configuration changes may not persist after installation of a hotfix
or upgrade, and could also cause a hotfix or upgrade to fail.
Third party tools, which require modification to dom0 configuration, or
installation into dom0, may cease to function correctly after upgrade or hotfix
installation. Please consult Citrix Technical Support for advice regarding
specific tools.
Type "xsconsole" for access to the management console.

##列出所有的pool

[[email protected] ~]# xe pool-list  
uuid ( RO)                : f612ea4a-ca5f-0201-ce54-e24afcbfc4e4
          name-label ( RW): 
    name-description ( RW): 
              master ( RO): 03f4f6df-9179-4e6b-b32d-71d9793d34ed
          default-SR ( RW): 0ad84d5c-d1c2-a3ad-5ebf-3a846ea779ff


##xenserver 设置pool的自动启动

[[email protected] ~]# xe pool-param-set uuid=f612ea4a-ca5f-0201-ce54-e24afcbfc4e4 other-config:auto_poweron=true

##列出所有的虚拟机

[[email protected] ~]# xe vm-list
uuid ( RO)           : 38301ab5-7acb-4a42-89c7-58f0344d0dcf
     name-label ( RW): k8s-master03
    power-state ( RO): halted
uuid ( RO)           : 18e1f771-3117-d315-bb9d-c039cdcc9420
     name-label ( RW): k8s-master01
    power-state ( RO): halted
uuid ( RO)           : 66879e08-ae85-c764-877c-a838c0f886c5
     name-label ( RW): k8s-node01
    power-state ( RO): halted
uuid ( RO)           : ef164fa5-d2d3-4dc4-9089-038642fdb2f4
     name-label ( RW): Control domain on host: xenserver-serv1
    power-state ( RO): running
uuid ( RO)           : 1ce24481-4bd9-23f1-bad9-e4ce41a7caa9
     name-label ( RW): k8s-node02
    power-state ( RO): halted
uuid ( RO)           : bc76338e-2ebf-1bcd-fe65-ed3e3c68d46e
     name-label ( RW): k8s-master02
    power-state ( RO): halted
uuid ( RO)           : 56b691b7-e3a6-3970-9b53-aab01860ac7a
     name-label ( RW): Windows Server 2008 R2 (64-bit) (1)
    power-state ( RO): running
uuid ( RO)           : b8af45e9-ea96-71b8-2e47-5245663f2da2
     name-label ( RW): kubesphere
    power-state ( RO): halted
uuid ( RO)           : f0041ad1-a1f1-ebd2-ef84-4090572163bd
     name-label ( RW): centos
    power-state ( RO): running
uuid ( RO)           : ab391aed-1ceb-67ee-4ac6-4c8848fa1fb0
     name-label ( RW): k8s-node03
    power-state ( RO): halted

是跟我上面图片右边的虚拟机对应上的


##xenserver下虚拟机设置开机自启  (对应uuid) 

我这里设置我的windows server 2008 r2开机启动

[[email protected] ~]# xe vm-param-set uuid=56b691b7-e3a6-3970-9b53-aab01860ac7a other-config:auto_poweron=true

备注:

## 设置所有虚拟机开启自启

[[email protected] ~]# for i in xe vm-list params=uuid --minimal|sed 's/,/ /g';do xe vm-param-set uuid=$i other-config:auto_poweron=true;done

##取消虚拟机开机自启

[[email protected] ~]# xe vm-param-remove uuid=xxxx param-name=other-config param-key=auto_poweron

以上备注命令我没有试过,暂时没那场景,有兴趣的可以试一下




相关文章