天天看点

从vCenter Server中删除不再使用的replica-虚拟机

在使用horizon虚拟桌面的过程中,在删除桌面池的时候,有时候由于一些意外导致无法移除与 view composer 中桌面池关联的副本虚拟机,或者移除与 viewcomposer 中桌面池关联的源虚拟机和副本虚拟机失败,可以使用horizon composer服务器中的sviconfig程序,取消副本虚拟机的保护。

【说明】副本虚拟机以replica-开头,这些虚拟机在由horizon 连接服务器与composer创建后,在vcenter server中受保护,不能在vcenter server中直接删除。用鼠标右键单击这些虚拟机,从清单中移除与从磁盘中删除是灰色。

要使用sviconfig程序取消受保护的虚拟机,需要了解以下参数。

(1是 composer 数据库 dsn 的名称及所有者账户和密码。如果composer的数据库服务器与composer服务在同一台计算机上,使用composer计算机的administrator账户和密码即可。如图1所示,这是horizon composer服务器系统dsn配置截图,本示例中该名称为composer。

从vCenter Server中删除不再使用的replica-虚拟机

图1 查看系统dsn名称

(2)vcenter server的ip地址、sso账户(默认为[email protected])和密码。本示例中vcenter server的ip地址为172.16.12.9。

(3)浏览vcenter server,查看副本虚拟机的路径及名称。使用vsphere client登录到vcenter server,单击虚拟机文件夹,浏览展开副本虚拟机,在本示例中有两个副本虚拟机:

replica-1a5cefbd-4c0b-47bc-a2c8-a001e109abba:这个在使用的,需要保护的。

replica-e8e06750-794a-4c15-9536-19fd50a44faf:这个是需要删除的。此虚拟机文件夹已经在存储中删除,但在vcenter server中清单有。

副本虚拟机保存在vmwareviewcomposerreplicafolder文件夹中,如图2所示。

从vCenter Server中删除不再使用的replica-虚拟机

图2 查看副本虚拟机名称及路径

在本示例中,数据中心名称为hc,群集名称为vsan(用不到群集名称)。受保护虚拟机路径及名称为:

/hc/vm/vmwareviewcomposerreplicafolder/replica-e8e06750-794a-4c15-9536-19fd50a44faf

(4)登录到horizoncomposer服务器,进入c:\program files (x86)\vmware\vmware view

composer文件夹,执行sviconfig去除对replica-e8e06750-794a-4c15-9536-19fd50a44faf虚拟机的保护,命令如下:

sviconfig -operation=unprotectentity  -dsnname=composer -dbusername=administrator-dbpassword=password -vcurl=https://172.16.12.9/sdk

[email protected] -vcpassword=password -inventorypath="/hc/vm/vmwareviewcomposerreplicafolder/replica-e8e06750-794a-4c15-9536-19fd50a44faf"

warning: unprotecting vc managed entities willallow operations

(power on, delete, migrate) that can causeexisting linked clones connected

to those managed entities to fail to workcorrectly.

establishing database connection.

database connection established successfully.

loading all vc config entries.

identifying matched vc config entries.

identified 0 matched vc config entries.

identified 0 matched vc config entries withcertificate validation set to true.

no matched vc configure entry is found. connectingto vc with no certificate validation

establishing connection to the vc server.

vc server connection established successfully.

looking for the entity on the vc server.

virtualmachine found.

virtualmachine with moid vm-3298 sucessfullyunprotected.

【说明】在本示例中,对应账户的密码用password代替。

从vCenter Server中删除不再使用的replica-虚拟机

如图3所示。

图3 取消保护

(5)在vcenter server清单中,删除不再需要的副本虚拟机,如图4所示。

从vCenter Server中删除不再使用的replica-虚拟机

图4 从清单中移除

从vCenter Server中删除不再使用的replica-虚拟机

图5 确认移除

==========视频,如需浏览请用鼠标右键单击打开=============

vmware horizon 8 桌面虚拟化入门

https://edu.51cto.com/course/28118.html

vmware vsphere迁移与升级视频课程

https://edu.51cto.com/course/27973.html

基于veeam v11的物理机和虚拟机的备份容灾应用视频

https://edu.51cto.com/course/27783.html

vmware esxi与vcenter server安装与升级实验视频课程

https://edu.51cto.com/sd/e1e6b

使用nvidia rtx8000配置gpu的虚拟桌面

https://edu.51cto.com/sd/952a9

vmware vsphere 6.7虚拟化入门视频课程

https://edu.51cto.com/sd/22fe0

vmware vsan 6.7实战演练

https://edu.51cto.com/sd/c6449

深入学习vmware horizon view7虚拟桌面

https://edu.51cto.com/sd/225f2

中小企业vsphere虚拟化数据中心规划设计与产品选型

https://edu.51cto.com/sd/04e53

vmware服务器虚拟化提高篇之虚拟化基础架构配置视频课程

https://edu.51cto.com/sd/b9594

忘记vmware esxi与vcenter server密码的解决方法视频教程

https://edu.51cto.com/sd/993e5

=======图书,如需浏览请用鼠标右键单击打开============

vmware虚拟化与云计算应用案例详解(第3版)

https://item.jd.com/12939315.html

vmware horizon虚拟桌面应用指南

https://item.jd.com/13038424.html

vmware vsan超融合企业应用实战

https://item.jd.com/12842654.html

vmware vsphere 6.5企业运维实战

https://item.jd.com/12329944.html

深入学习vmware vsphere 6

https://item.jd.com/11958052.html

继续阅读