Print

UIS云彩虹再次在线迁移相同虚拟机报“存在相同虚拟机名称”错误

2025-06-16 发表

组网及说明

UIS E0750P09版本

问题描述

客户两套UIS,版本均为E0750P09。由于前期使用离线scp虚拟机镜像迁移,拷贝时间过长,超出客户可停机窗口。使用云彩虹在线迁移该虚拟机,但是忘记在目的UIS集群共享文件系统下删除离线虚拟机镜像文件,导致迁移失败后(报存在相同名称镜像文件)。再次使用云彩虹在线迁移,依然失败,目的UIS集群报存在相同名称虚拟机。

过程分析

在目的UIS集群数据库中残留相同名称虚拟机,需要进入数据库删除。

解决方法

1.进入数据库

[root@cvknode1 ~]# mysql -uroot -p1q2w3e@4R

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 12613948

Server version: 5.5.68-MariaDB MariaDB Server

 

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

2.切换数据库

如果是老版本UIS,使用use uis切换

MariaDB [(none)]> use uis

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

如果是新版本UIS,使用use vservice切换。

MariaDB [(none)]> use vservice

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

 

Database changed

3.查询当前数据库所有虚拟机名称

MariaDB [vservice]> select ID,DOMAIN_NAME,TITLE from TBL_DOMAIN;

4.删除残留虚拟机名称。

经确认,第72个虚拟机为残留虚拟机名称,执行删除命令(记得带分号)。

MariaDB [vservice]> delete from TBL_DOMAIN WHERE ID=72;

Query OK, 1 row affected (0.00 sec)

再次使用命令确认删除成功。

MariaDB [vservice]> select ID,DOMAIN_NAME,TITLE from TBL_DOMAIN;