[go: up one dir, main page]

CN109995814B - Cloud host resource migration method and device, communication device, and storage medium - Google Patents

Cloud host resource migration method and device, communication device, and storage medium Download PDF

Info

Publication number
CN109995814B
CN109995814B CN201711481073.7A CN201711481073A CN109995814B CN 109995814 B CN109995814 B CN 109995814B CN 201711481073 A CN201711481073 A CN 201711481073A CN 109995814 B CN109995814 B CN 109995814B
Authority
CN
China
Prior art keywords
configuration data
target
cloud host
cloud platform
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711481073.7A
Other languages
Chinese (zh)
Other versions
CN109995814A (en
Inventor
魏峰
罗刚毅
李灏
姚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Suzhou Software Technology Co Ltd
China Mobile Communications Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Suzhou Software Technology Co Ltd, China Mobile Communications Corp filed Critical China Mobile Suzhou Software Technology Co Ltd
Priority to CN201711481073.7A priority Critical patent/CN109995814B/en
Publication of CN109995814A publication Critical patent/CN109995814A/en
Application granted granted Critical
Publication of CN109995814B publication Critical patent/CN109995814B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明提供了一种跨平台的云主机资源的迁移方法及装置、通信设备、存储介质,用以实现异构的云平台之间的云主机资源迁移自动化,提升了迁移效率,降低了人工输入云主机的配置数据的误差率。所述方法包括:从ESXi服务器中获取原云主机对应的初始镜像文件;根据第二配置数据,补充第一配置数据;并根据预设的迁移规则和补充后的第一配置数据,确定目标配置数据;根据预设的迁移规则和初始镜像文件,确定目标镜像文件;其中,第一配置数据为从vcenter服务器中获取的原云主机的配置数据,第二配置数据为初始镜像文件中云主机的配置数据;在目标云平台上创建目标云主机,在创建目标云主机的过程中,加载目标镜像文件和目标配置数据。

Figure 201711481073

The present invention provides a cross-platform cloud host resource migration method and device, a communication device, and a storage medium, which are used to automate cloud host resource migration between heterogeneous cloud platforms, improve migration efficiency, and reduce manual input. The error rate of the configuration data of the cloud host. The method includes: obtaining an initial image file corresponding to the original cloud host from the ESXi server; supplementing the first configuration data according to the second configuration data; and determining a target configuration according to a preset migration rule and the supplemented first configuration data data; determine the target image file according to the preset migration rule and the initial image file; wherein, the first configuration data is the configuration data of the original cloud host obtained from the vcenter server, and the second configuration data is the cloud host in the initial image file. Configuration data; create a target cloud host on the target cloud platform, and load the target image file and target configuration data during the process of creating the target cloud host.

Figure 201711481073

Description

Cloud host resource migration method and device, communication equipment and storage medium
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for migrating cross-platform cloud host resources, communication equipment and a storage medium.
Background
Infrastructure as a Service (IaaS) provides virtual computing resources, storage resources and network resources for users, and facilitates the operation of upper-layer applications. Currently, there are multiple software vendors such as VMware cloud platform and Openstack cloud platform that provide solutions for infrastructure as a service. Thus, it is often the case that cloud host data is migrated from between platforms of two different architectures. Currently, there are two main methods in the industry for migrating cloud host resources from a VMware cloud platform to a heterogeneous cloud platform:
firstly, a file migration mode is adopted, namely parameters which are the same as the cloud host configuration of the VMware of the original cloud platform are manually input on the target cloud platform, so that a user is newly built on the target cloud platform, a virtual machine is built under the user account, and then resources in the original cloud host are uploaded to the target cloud host. After the migration is finished, in order to ensure that the target cloud host operates normally, the registry of the target cloud host needs to be modified;
secondly, a mirror image migration mode is adopted, namely a cloud host is established on a target cloud platform, and template information and an IP (Internet Protocol Address) Address of the cloud host are set; and acquiring the image file of the cloud host from the VMware of the original cloud platform, and importing the image file of the injected drive file into the newly created cloud host.
In addition, the existing solutions all require manual input of configuration parameters to configure the cloud host, so that the existing method for migrating the cloud host from the VMware cloud platform to the heterogeneous cloud platform inevitably has the problems of low migration efficiency and high error rate.
Moreover, the architecture of the VMware cloud platform (VMware Workstations) comprises a vsphere Client (vsphere Client), a Vcenter Server (Vcenter Server) and an ESXi Server. The established virtual machines are established on the ESxi server, a plurality of virtual machines can be established on one ESxi server, the ESxi servers can form a server cluster, and all the ESxi servers in the cluster are uniformly managed through the vcenter server. Because the resources of the ESxi server are all obtained from the vcenter server in the prior art, even if the space occupied by the resources needing to be transferred in the virtual machine is only 10G, the whole disk occupied by the resources needing to be transferred in the ESxi server needs to be converted into an image file, and the size of the image file can be 100G, so that the processing pressure of the server is increased greatly due to the fact that the transmission channel of the vcenter server is occupied.
In summary, the existing method for migrating the cloud host from the VMware cloud platform to the heterogeneous cloud platform inevitably has the problems of low migration efficiency, high error rate and high processing pressure of the server.
Disclosure of Invention
The embodiment of the invention provides a cross-platform cloud host resource migration method and device, communication equipment and a storage medium, which are used for realizing cloud host resource migration automation between heterogeneous cloud platforms and avoiding the problems of low migration efficiency, high error rate of manually configured data and high processing pressure of a vcenter server.
The embodiment of the invention provides a method for migrating cross-platform cloud host resources, which comprises the following steps:
acquiring an initial image file corresponding to an original cloud host from an ESxi server;
supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to the preset migration rule and the initial image file; the first configuration data is configuration data of a primary cloud host acquired from a vcenter server, and the second configuration data is configuration data of the primary cloud host in the initial image file;
and creating a target cloud host on a target cloud platform, and loading the target image file and the target configuration data in the process of creating the target cloud host.
Preferably, if at least two disks are configured in the primary cloud host, supplementing the first configuration data according to the second configuration data includes:
determining whether the original cloud host manages the disk in a disk management mode of the logical volume or not according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume, and supplementing first configuration data according to the determined number of the system disks and the determined number of the data disks; otherwise, directly supplementing the first configuration data according to the second configuration data.
Preferably, if at least two network cards are configured in the primary cloud host, supplementing the first configuration data according to the second configuration data includes:
if the IP internet protocol address corresponding to the network card does not exist in the first configuration data, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data;
determining target configuration data according to a preset migration rule and the supplemented first configuration data, wherein the determining of the target configuration data comprises the following steps:
determining an IP address allocation mode according to a preset migration rule;
if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and the preset migration rule; if the IP address allocation mode is a DHCP dynamic host configuration protocol allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and the preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from the IP address pool corresponding to the network of the target cloud platform.
Preferably, before creating the target cloud host, the method further comprises:
acquiring user information of a primary cloud platform from a vcenter server;
creating a target cloud host, comprising:
and according to the user information of the original cloud platform, a user is newly built on a target cloud platform, and a target cloud host is built under the newly built user.
Preferably, the user information of the cloud platform includes: a user account and a permission corresponding to the user account;
according to the user information of the original cloud platform, a new user is established on a target cloud platform, and the method comprises the following steps:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
The embodiment of the invention provides a cross-platform cloud host resource migration device, which comprises:
the acquisition module is used for acquiring an initial image file corresponding to the original cloud host from the ESxi server;
the configuration module is used for supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to the preset migration rule and the initial image file; the first configuration data is configuration data of a primary cloud host acquired from a vcenter server, and the second configuration data is configuration data of the primary cloud host in the initial image file;
and the loading module is used for creating a target cloud host on a target cloud platform and loading the target image file and the target configuration data in the process of creating the target cloud host.
Preferably, if at least two disks are configured in the primary cloud host, the first configuration data is supplemented according to the second configuration data, and the configuration module is specifically configured to:
determining whether the original cloud host manages the disk in a disk management mode of the logical volume or not according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume, and supplementing first configuration data according to the determined number of the system disks and the determined number of the data disks; otherwise, directly supplementing the first configuration data according to the second configuration data.
Preferably, if at least two network cards are configured in the primary cloud host, the first configuration data is supplemented according to the second configuration data, and the configuration module is specifically configured to:
if the IP internet protocol address corresponding to the network card does not exist in the first configuration data, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data;
determining target configuration data according to a preset migration rule and the supplemented first configuration data, wherein the configuration module is specifically configured to:
determining an allocation mode of an IP (Internet protocol) address according to a preset migration rule;
if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and the preset migration rule; if the IP address allocation mode is a DHCP dynamic host configuration protocol allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and the preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from the IP address pool corresponding to the network of the target cloud platform.
Preferably, before creating the target cloud host, the loading module is further configured to:
acquiring user information of a primary cloud platform from a vcenter server;
creating a target cloud host, wherein the loading module is specifically configured to:
and according to the acquired user information of the original cloud platform, a user is newly built on the target cloud platform, and a target cloud host is built under the newly built user.
Preferably, the user information of the cloud platform includes: a user account and a permission corresponding to the user account;
according to the user information of the original cloud platform, a user is newly built on the target cloud platform, and the loading module is specifically used for:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
An embodiment of the present invention provides a communication device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the above migration method of the cross-platform cloud host resource.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the migration method of the cross-platform cloud host resource as described above.
The embodiment of the invention provides a cross-platform cloud host resource migration method and device, communication equipment and a storage medium, so that a user can automatically migrate cross-platform cloud host resources by setting a migration rule of a cloud host, the error rate of manually inputting configuration data is reduced, the migration efficiency of the cloud host resources is improved, and the processing pressure of a vcenter server is reduced. Meanwhile, the method for acquiring the mirror image file from the ESxi server and acquiring the configuration data of the original cloud host from the vcenter server realizes multi-path acquisition of migration data and shortens the time required by migration.
Drawings
Fig. 1 is a schematic flowchart of a migration method of a cross-platform cloud host resource according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a migration method of cloud host resources from a VMware platform to an Openstack platform according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a migration apparatus of a cross-platform cloud host resource according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a cross-platform cloud host resource migration method and device, communication equipment and a storage medium, which are used for realizing cloud host resource migration automation between heterogeneous cloud platforms and avoiding the problems of low migration efficiency, high error rate of manually configured data and high processing pressure of a vcenter server.
The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, an embodiment of the present invention provides a method for migrating a cross-platform cloud host resource, including:
s110, acquiring an initial image file corresponding to an original cloud host from an ESxi server;
s120, supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to a preset migration rule and an initial image file; the first configuration data is the configuration data of the original cloud host acquired from the vcenter server, and the second configuration data is the configuration data of the cloud host in the initial image file;
s130, creating a target cloud host on the target cloud platform, and loading a target image file and target configuration data in the process of creating the target cloud host.
By the cloud host resource migration method provided by the embodiment of the invention, a user can automatically set the migration rule of the cloud host to realize the automatic migration of the cross-platform cloud host resource, thereby reducing the error rate caused by manually inputting the configuration parameters and improving the migration efficiency of the cloud host resource. Meanwhile, the method for acquiring the mirror image file from the ESxi server and acquiring the configuration data of the original cloud host from the vcenter server realizes multi-path acquisition of migration data and shortens the time required by migration.
For step S120, supplementing the first configuration data according to the disk information in the second configuration data, including:
firstly, determining the number of system disks and data disks according to second configuration data, wherein the specific method comprises the following steps:
first, whether the number of disks in the second configuration data is the same as the number of disks in the first configuration data is judged. Generally, the number of disks in the first configuration data and the second configuration data is the same; and if the number of the disks in the first configuration data is different from the number of the disks in the second configuration data, prompting error information.
And determining the number of the system disks and the number of the data disks according to the number of the disks in the second configuration data. That is, if only one disk is configured in the second configuration data, the disk is determined to be a system disk. If the second configuration data is configured with at least two disks, determining whether the original cloud host manages the disks in a disk management mode of the logical volume according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in the disk management mode of the logical volume; otherwise, directly determining that the number of the system disks is one, and the other disks are all data disks, and supplementing the number of the system disks and the number of the data disks in the first configuration data by taking the determined number of the system disks and the determined number of the data disks as a standard.
Secondly, determining the capacity corresponding to the system disk and the capacity corresponding to the data disk according to the capacity corresponding to the disk in the second configuration data; and supplementing the capacity corresponding to the system disk and the capacity corresponding to the data disk in the first configuration data with the determined capacity corresponding to the system disk and the determined capacity corresponding to the data disk.
Finally, determining the name corresponding to the system disk and the name corresponding to the data disk according to the name corresponding to the disk in the second configuration data; and supplementing the name corresponding to the system disk and the name corresponding to the data disk in the first configuration data with the determined name corresponding to the system disk and the determined name corresponding to the data disk.
For step S120, determining whether a modification rule for the disk information is defined in the preset migration rule, modifying the disk information in the supplemented first configuration data if the modification rule for the disk information is defined, and determining that the disk information in the supplemented first configuration data is the disk information in the target configuration data; and if the preset migration rule does not limit the modification rule of the disk information, determining that the disk information in the first configuration data is the disk information in the target configuration data. The disk information includes the number of disks, the disk capacity, and the disk name.
The system disk and the data disk can be distinguished by distinguishing the types of the disks in the original cloud host, namely distinguishing the system disk and the data disk, so that the problem that the system disk and the data disk can not be distinguished by a disk management mode aiming at a logical volume in the prior art is solved.
For step S120, supplementing the first configuration data according to the network card information in the second configuration data, including:
firstly, judging whether the number of the network cards in the second configuration data is the same as that of the network cards in the first configuration data, and if so, taking the number of the network cards in the first configuration data as a standard; if the configuration data is the same as the network cards in the first configuration data, the number of the network cards in the first configuration data does not need to be changed.
Secondly, if the first configuration data does not have an IP (Internet Protocol) address corresponding to the network card, the IP address corresponding to the network card in the first configuration data is supplemented according to the IP address corresponding to the network card in the second configuration data.
Aiming at the step S120, modifying the first configuration data supplemented with the network card information according to a preset migration rule, including:
if only one network card is configured in the original cloud host and the allocation mode of the IP address in the original cloud platform is a static allocation mode, determining the IP address corresponding to the network card in the target configuration data according to the IP address corresponding to the network card in the first configuration data and a preset migration rule; if the original cloud host is configured with at least two network cards, determining an allocation mode of an IP address corresponding to the network card according to a preset migration rule; if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and a preset migration rule; if the allocation mode of the IP address is a DHCP (Dynamic Host Configuration Protocol) allocation mode, determining a network where the target cloud platform is located according to a name of a network where the original platform is located in the first Configuration data and a preset migration rule, and acquiring an IP address corresponding to a network card in the target Configuration data from an IP address pool corresponding to the network where the target cloud platform is located; and executing the method for all the network cards in the first configuration data to reset the IP addresses corresponding to the network cards. In any IP address allocation manner, the network information of the target cloud platform is generated according to the network information of the original cloud platform in the first configuration data and the preset migration rule, and finally, a network corresponding to the network information of the target cloud platform is created on the target cloud platform.
By resetting the configuration file corresponding to the network card in the image file, the newly-built network card in the target cloud host supports dynamic IP address acquisition in a DHCP mode.
For step S120, obtaining a target image file according to a preset migration rule and the initial image file, including:
if the preset migration rule specifies the modification mode of the image file, modifying the IP address distribution mode in the initial image file according to the preset migration rule, and determining the modified image file as the target image file.
And if the preset migration rule does not specify the modification mode of the image file, directly determining that the initial image file is the target image file.
By configuring the network card information according to the preset migration rule, the problem that a target cloud host cannot automatically acquire an IP address when the cloud host is migrated through the mirror image file is solved, and the problem that the network card information stored in the vcenter server is incomplete or wrong is also solved.
Before determining the target image file, the method further comprises:
if the initial image file is modified, injecting a drive file of the target cloud platform into the modified initial image file; and if the initial image file is not modified, injecting a drive file of the target cloud platform into the initial image file.
With respect to step S130, before creating the target cloud host, the method further includes:
and uploading the target image file determined in the step S120 to a target cloud platform.
For step S130, the method of creating a target cloud host:
acquiring user information of a primary cloud platform from a vcenter server;
and according to the user information of the original cloud platform, a user is newly built on the target cloud platform, and a target cloud host is built under the newly built user.
Wherein, the user information of the original cloud platform comprises: a user account and a right item corresponding to the user account;
according to the user information of the original cloud platform, a new user is established on the target cloud platform, and the method comprises the following steps:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
If the user information of the original cloud platform further includes a password corresponding to the user account, after the user is newly created, the method further includes: setting a password corresponding to the user account as a newly-established password corresponding to the user;
if the user information of the original cloud platform does not store the password corresponding to the user account, after the user is newly created, the method further comprises the following steps: and setting the password corresponding to the user account as a preset initial password.
By the method for creating the target cloud host, the problem that in the prior art, when cloud host resources are migrated, the migrated resources are only packaged integrally and are not distinguished by taking a user as a unit, so that authority management on the resources migrated by the target cloud host cannot be realized is solved.
Example two:
the second embodiment of the present invention provides a method for migrating cloud host resources from a VMware cloud platform to an Openstack cloud platform, and referring to fig. 2, the method specifically includes:
s200, determining a cloud host to be migrated in the VMware cloud platform according to a migration rule preset by a user; because part of the cloud hosts created in the VMware cloud platform are used for testing and do not need to be migrated, the migration rule preset by the user specifies the conditions of the cloud hosts which do not need to be migrated;
s210, acquiring configuration data of an original cloud host to be migrated, user information and a mirror image file corresponding to the original cloud host from a VMware cloud platform; specifically, the acquisition of information may be achieved by:
s211, acquiring configuration data of a primary cloud host created on a VMware cloud platform through an Application Programming Interface (API) of a vcenter server, and determining the configuration data as first configuration data; wherein the first configuration data comprises: the name of the original cloud host, the memory of the original cloud host, the processor, the cluster where the original cloud host is located, the disk information and the network card information. The disk information comprises the number of disks in the original cloud host, the corresponding size of the disks and the names of the disks; the network card information includes the number of network cards in the original cloud host, the IP address corresponding to the network cards, and CIDR (Classless inter domain Routing, no class inter-domain Routing).
S212, obtaining user information from a vcenter server; the user information comprises a user account and a permission corresponding to the user account; namely, whether the user is an administrator or not and whether the operation can be executed with the authority of the administrator or not is determined; in addition, the acquired user information may further include a password corresponding to the user account.
S213, the initial image file corresponding to the primary cloud host is directly obtained from the ESxi server through the ovftool tool, and because the image file obtained from the vcenter server has a large amount of reserved space but is not actually occupied, the efficiency of obtaining the image file corresponding to the primary cloud host from the vcenter server is low, and the problem that the initial image file is directly obtained from the ESxi server can be avoided.
S220, calling a libgustfs function, acquiring configuration data of the primary cloud host from the image file acquired in the step S213, and determining that the configuration data is second configuration data.
The primary cloud host is a multi-disk cloud host, so that whether the primary cloud host manages the disk in a disk management mode of the logical volume is determined according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume; supplementing the number of the system disks and the number of the data disks in the first configuration data according to the determined number of the system disks and the determined number of the data disks;
determining the capacity corresponding to the system disk and the capacity corresponding to the data disk according to the capacity corresponding to the disk in the second configuration data; supplementing the capacity corresponding to the system disk and the capacity corresponding to the data disk in the first configuration data by the determined capacity corresponding to the system disk and the determined capacity corresponding to the data disk;
determining a name corresponding to the system disk and a name corresponding to the data disk according to the name corresponding to the disk in the second configuration data; and supplementing the name corresponding to the system disk and the name corresponding to the data disk in the first configuration data with the determined name corresponding to the system disk and the determined name corresponding to the data disk.
The original cloud host is a cloud host with multiple network cards, so that whether the number of the network cards in the second configuration data is the same as that of the network cards in the first configuration data or not is judged, and if the number of the network cards in the first configuration data is different, the number of the network cards in the first configuration data is used as the standard; if the configuration data are the same, the number of the network cards in the first configuration data does not need to be changed;
and judging whether the network card in the first configuration data corresponds to the IP address, if not, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data.
S230, determining target configuration data according to a migration rule preset by a user and the supplemented first configuration data, and setting whether the IP address allocation mode in the initial image file is a DHCP allocation mode or a static allocation mode according to the migration rule preset by the user, so as to determine the target image file. Specifically, the migration rule includes a mapping rule of a name of the cloud host, a mapping rule of the processor, a mapping rule of the memory, a mapping rule of the number of disks, a mapping rule of a disk specification, a mapping rule of the number of network cards, a mapping rule of a network corresponding to the network cards, and a mapping rule of an IP address corresponding to the network cards.
In this embodiment, the name of the cloud host is mapped according to a rule that the name of the target cloud host is the same as the name of the original cloud host;
the mapping rule of the processor is that the configuration data of the processor in the target cloud host is the same as the configuration data of the processor in the original cloud host;
the mapping rule of the memory is that the configuration data of the memory in the target cloud host is the same as the configuration data of the memory in the original cloud host;
the mapping rule of the number of the disks is that the number of the disks in the target cloud host is the same as the number of the disks in the original cloud host;
the mapping rule of the disk specification is that the size of a disk in the target cloud host is the same as that of a disk in the original cloud host;
the mapping rule of the number of the network cards is that the number of the network cards in the target cloud host is the same as the number of the network cards in the original cloud host;
the mapping rule of the network corresponding to the network card is the mapping from the original cloud host to the network of the target cloud host, namely, the network of the target cloud platform is only obtained.
The mapping rule of the IP address corresponding to the network card is that if the allocation mode of the IP address is a static allocation mode, the IP address corresponding to the network card of the cloud host in the target platform is determined according to the IP address corresponding to the network card in the first configuration data and a preset migration rule; if the IP address allocation mode is a DHCP allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and a preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from an IP address pool corresponding to the network of the target cloud platform; and executing the method for all the network cards in the first configuration data to reset the IP addresses corresponding to the network cards.
S240, according to the user account registered on the original cloud platform obtained in the step S212, a user is newly built on the target cloud platform by using the user account; if the acquired user information contains a password corresponding to the user account, setting a password for the newly-built user; if the password corresponding to the user account is not acquired in the acquired user information, setting an initial password for the newly-built user; and setting corresponding authority for the newly-built user according to the authority corresponding to the user account, creating a target cloud host under the newly-built user, and loading a target image file and target configuration data in the process of creating the target cloud host. Specifically, when the target cloud host is created, the data disk is processed by using a circular volume service, and a plurality of system disks managed by the logical volume are processed by using a plurality of block _ devices.
Example three:
referring to fig. 3, a third embodiment of the present invention provides a migration apparatus for a cross-platform cloud host resource, including:
the obtaining module 310 is configured to obtain an initial image file corresponding to an original cloud host from an ESXi server;
a configuration module 320 for supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to the preset migration rule and the initial image file; the first configuration data is configuration data of a primary cloud host acquired from a vcenter server, and the second configuration data is configuration data of a cloud host in the initial image file;
the loading module 330 is configured to create a target cloud host on a target cloud platform, and load the target image file and the target configuration data in a process of creating the target cloud host.
Specifically, if at least two disks are configured in the primary cloud host, the first configuration data is supplemented according to the second configuration data, and the configuration module 320 is specifically configured to:
determining whether the original cloud host manages the disk in a disk management mode of the logical volume or not according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume, and supplementing first configuration data according to the determined number of the system disks and the determined number of the data disks; otherwise, directly supplementing the first configuration data according to the second configuration data.
Specifically, if at least two network cards are configured in the primary cloud host, the first configuration data is supplemented according to the second configuration data, and the configuration module 320 is specifically configured to:
if the IP internet protocol address corresponding to the network card does not exist in the first configuration data, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data;
determining target configuration data according to a preset migration rule and the supplemented first configuration data, where the configuration module 320 is specifically configured to:
determining an IP address allocation mode according to a preset migration rule;
if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and the preset migration rule; if the IP address allocation mode is a DHCP dynamic host configuration protocol allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and the preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from the IP address pool corresponding to the network of the target cloud platform.
Specifically, before creating the target cloud host, the loading module 330 is further configured to:
acquiring user information of a primary cloud platform from a vcenter server;
creating a target cloud host, and the loading module 330 is specifically configured to:
and according to the acquired user information of the original cloud platform, a user is newly built on the target cloud platform, and a target cloud host is built under the newly built user.
Specifically, the user information of the cloud platform includes: a user account and a permission corresponding to the user account;
according to the user information of the original cloud platform, a new user is created on the target cloud platform, and the loading module 330 is specifically configured to:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
Example four:
the fourth embodiment of the present invention provides a communication device, where the communication device includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor executes the computer program, the method for migrating a cloud host resource across platforms in the first embodiment is implemented.
The memory may include, among other things, Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory.
Example five:
the fifth embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps in the migration method of the cross-platform cloud host resource described in the first embodiment are implemented.
In summary, embodiments of the present invention provide a method and an apparatus for migrating a cross-platform cloud host resource, a communication device, and a storage medium, so that a user can automatically migrate the cross-platform cloud host resource by setting a migration rule of a cloud host, thereby reducing an error rate of manually inputting configuration data, improving migration efficiency of the cloud host resource, and reducing processing pressure of a vcenter server. Meanwhile, the method for acquiring the mirror image file from the ESxi server and acquiring the configuration data of the original cloud host from the vcenter server realizes multi-path acquisition of migration data and shortens the time required by migration.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A method for migrating cloud host resources across platforms is characterized by comprising the following steps:
acquiring an initial image file corresponding to an original cloud host from an ESxi server;
supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to the preset migration rule and the initial image file; the first configuration data is configuration data of a primary cloud host acquired from a vcenter server, and the second configuration data is configuration data of the primary cloud host in the initial image file;
and creating a target cloud host on a target cloud platform, and loading the target image file and the target configuration data in the process of creating the target cloud host.
2. The migration method according to claim 1, wherein if at least two disks are configured in the second configuration data, supplementing the first configuration data according to the second configuration data comprises:
determining whether the original cloud host manages the disk in a disk management mode of the logical volume or not according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume, and supplementing first configuration data according to the determined number of the system disks and the determined number of the data disks; otherwise, directly supplementing the first configuration data according to the second configuration data.
3. The migration method according to claim 1, wherein if at least two network cards are configured in the second configuration data, supplementing the first configuration data according to the second configuration data comprises:
if the IP internet protocol address corresponding to the network card does not exist in the first configuration data, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data;
determining target configuration data according to a preset migration rule and the supplemented first configuration data, wherein the determining of the target configuration data comprises the following steps:
determining an IP address allocation mode according to a preset migration rule;
if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and the preset migration rule; if the IP address allocation mode is a DHCP dynamic host configuration protocol allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and the preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from the IP address pool corresponding to the network of the target cloud platform.
4. The migration method according to claim 1, wherein before creating the target cloud host, the method further comprises:
acquiring user information of a primary cloud platform from a vcenter server;
creating a target cloud host, comprising:
and according to the user information of the original cloud platform, a user is newly built on the target cloud platform, and a target cloud host is built under the newly built user.
5. The migration method according to claim 4, wherein the user information of the original cloud platform comprises: a user account and a permission corresponding to the user account;
according to the user information of the original cloud platform, a new user is established on a target cloud platform, and the method comprises the following steps:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
6. An apparatus for migrating cloud host resources across platforms, the apparatus comprising:
the acquisition module is used for acquiring an initial image file corresponding to the original cloud host from the ESxi server;
the configuration module is used for supplementing the first configuration data according to the second configuration data; determining target configuration data according to a preset migration rule and the supplemented first configuration data; determining a target image file according to the preset migration rule and the initial image file; the first configuration data is configuration data of a primary cloud host acquired from a vcenter server, and the second configuration data is configuration data of the primary cloud host in the initial image file;
and the loading module is used for creating a target cloud host on a target cloud platform and loading the target image file and the target configuration data in the process of creating the target cloud host.
7. The migration device according to claim 6, wherein if at least two disks are configured in the second configuration data, the first configuration data is supplemented according to the second configuration data, and the configuration module is specifically configured to:
determining whether the original cloud host manages the disk in a disk management mode of the logical volume or not according to the second configuration data; if so, determining the number of the system disks and the number of the data disks in a disk management mode of the logical volume, and supplementing first configuration data according to the determined number of the system disks and the determined number of the data disks; otherwise, directly supplementing the first configuration data according to the second configuration data.
8. The migration device according to claim 6, wherein if at least two network cards are configured in the second configuration data, the first configuration data is supplemented according to the second configuration data, and the configuration module is specifically configured to:
if the IP internet protocol address corresponding to the network card does not exist in the first configuration data, supplementing the IP address corresponding to the network card in the first configuration data according to the IP address corresponding to the network card in the second configuration data;
determining target configuration data according to a preset migration rule and the supplemented first configuration data, wherein the configuration module is specifically configured to:
determining an allocation mode of an IP (Internet protocol) address according to a preset migration rule;
if the allocation mode of the IP address is a static allocation mode, determining the IP address corresponding to the network card of the cloud host in the target platform according to the IP address corresponding to the network card in the first configuration data and the preset migration rule; if the IP address allocation mode is a DHCP dynamic host configuration protocol allocation mode, determining the network of the target cloud platform according to the name of the network of the original platform in the first configuration data and the preset migration rule, and acquiring the IP address corresponding to the network card in the target configuration data from the IP address pool corresponding to the network of the target cloud platform.
9. The migration apparatus according to claim 6, wherein before creating the target cloud host, the loading module is further configured to:
acquiring user information of a primary cloud platform from a vcenter server;
creating a target cloud host, wherein the loading module is specifically configured to:
and according to the acquired user information of the original cloud platform, a user is newly built on the target cloud platform, and a target cloud host is built under the newly built user.
10. The migration apparatus according to claim 9, wherein the user information of the native cloud platform comprises: a user account and a permission corresponding to the user account;
according to the user information of the original cloud platform, a user is newly built on the target cloud platform, and the loading module is specifically used for:
according to a user account registered on an original cloud platform, a user is newly built on a target cloud platform by using the user account; and setting corresponding authority for the newly-built user according to the corresponding authority of the user account.
11. A communication device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of migrating cloud host resources across platforms of any of claims 1-5.
12. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps in the method for migration of cloud host resources across platforms as claimed in any one of claims 1 to 5.
CN201711481073.7A 2017-12-29 2017-12-29 Cloud host resource migration method and device, communication device, and storage medium Active CN109995814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711481073.7A CN109995814B (en) 2017-12-29 2017-12-29 Cloud host resource migration method and device, communication device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711481073.7A CN109995814B (en) 2017-12-29 2017-12-29 Cloud host resource migration method and device, communication device, and storage medium

Publications (2)

Publication Number Publication Date
CN109995814A CN109995814A (en) 2019-07-09
CN109995814B true CN109995814B (en) 2021-08-13

Family

ID=67109213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711481073.7A Active CN109995814B (en) 2017-12-29 2017-12-29 Cloud host resource migration method and device, communication device, and storage medium

Country Status (1)

Country Link
CN (1) CN109995814B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602174A (en) * 2019-08-21 2019-12-20 浙江大学 Heterogeneous cloud data synchronization method
CN110795182B (en) * 2019-09-18 2024-09-13 平安科技(深圳)有限公司 Cloud host creation method and system
CN111459415B (en) * 2020-04-15 2023-05-23 腾讯云计算(长沙)有限责任公司 Cross-cloud data migration method, device, equipment and storage medium
CN114253463A (en) * 2020-09-25 2022-03-29 华为云计算技术有限公司 Cloud disk management method and device of cloud host, computer equipment and storage medium
CN112269759B (en) * 2020-10-23 2023-12-22 北京浪潮数据技术有限公司 Migration method and related device for shared file storage
CN112527193B (en) * 2020-12-04 2023-12-22 北京浪潮数据技术有限公司 Cloud hard disk data migration method, device, equipment and storage medium
CN112596744A (en) * 2020-12-24 2021-04-02 航天信息股份有限公司 Method, device, equipment and medium for generating cloud platform mirror image
CN114840490B (en) * 2022-03-23 2025-11-04 青岛海尔科技有限公司 Database account migration methods, storage media and electronic devices
CN115664920B (en) * 2022-10-31 2025-08-19 北京青云科技集团股份有限公司 Network communication management method, device and equipment of cloud platform and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035662A (en) * 2009-09-27 2011-04-27 中国移动通信集团公司 Virtual server management system, method and device
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
KR20130004832A (en) * 2011-07-04 2013-01-14 주식회사 케이티 Apparatus of migrating from physical server to virtual server and method thereof
CN103109271A (en) * 2012-08-30 2013-05-15 华为技术有限公司 Inter-platform application migration realization method and system
US8984243B1 (en) * 2013-02-22 2015-03-17 Amazon Technologies, Inc. Managing operational parameters for electronic resources
CN104572274A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Cross-cloud-point migration system and method
CN104965757A (en) * 2015-01-21 2015-10-07 深圳市腾讯计算机系统有限公司 Virtual machine live migration method, virtual machine migration management apparatus, and virtual machine live migration system
CN105094964A (en) * 2014-05-20 2015-11-25 苏宁云商集团股份有限公司 Virtual machine migration method and system
CN106469085A (en) * 2016-08-31 2017-03-01 北京航空航天大学 The online migration method, apparatus and system of virtual machine
CN106528103A (en) * 2016-10-31 2017-03-22 北京深之度科技有限公司 Data migration method and device, and computing device
CN106775928A (en) * 2016-11-25 2017-05-31 国家电网公司 A kind of virtual machine Autonomic Migration Framework system and method between isomery cloud platform
CN106933517A (en) * 2017-03-17 2017-07-07 深信服科技股份有限公司 A kind of data migration method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035662A (en) * 2009-09-27 2011-04-27 中国移动通信集团公司 Virtual server management system, method and device
KR20130004832A (en) * 2011-07-04 2013-01-14 주식회사 케이티 Apparatus of migrating from physical server to virtual server and method thereof
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
CN103109271A (en) * 2012-08-30 2013-05-15 华为技术有限公司 Inter-platform application migration realization method and system
US8984243B1 (en) * 2013-02-22 2015-03-17 Amazon Technologies, Inc. Managing operational parameters for electronic resources
CN104572274A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Cross-cloud-point migration system and method
CN105094964A (en) * 2014-05-20 2015-11-25 苏宁云商集团股份有限公司 Virtual machine migration method and system
CN104965757A (en) * 2015-01-21 2015-10-07 深圳市腾讯计算机系统有限公司 Virtual machine live migration method, virtual machine migration management apparatus, and virtual machine live migration system
CN106469085A (en) * 2016-08-31 2017-03-01 北京航空航天大学 The online migration method, apparatus and system of virtual machine
CN106528103A (en) * 2016-10-31 2017-03-22 北京深之度科技有限公司 Data migration method and device, and computing device
CN106775928A (en) * 2016-11-25 2017-05-31 国家电网公司 A kind of virtual machine Autonomic Migration Framework system and method between isomery cloud platform
CN106933517A (en) * 2017-03-17 2017-07-07 深信服科技股份有限公司 A kind of data migration method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"OpenStack平台的虚拟机调度关键技术研究";陈恂;《中国优秀硕士学位论文全文数据库》;20140915;全文 *

Also Published As

Publication number Publication date
CN109995814A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109995814B (en) Cloud host resource migration method and device, communication device, and storage medium
US12056519B2 (en) Virtual machine migration method and apparatus
US9218176B1 (en) Software deployment in a distributed virtual machine environment
US20230155957A1 (en) Automated local scaling of compute instances
US20200092222A1 (en) Automated migration of compute instances to isolated virtual networks
TWI516059B (en) Setup method and system for client and server environment
CN108322325B (en) Virtual machine management method and device
US20150128131A1 (en) Managing virtual machine patterns
CN107580083A (en) A kind of method and system of container IP address distribution
CN111865629B (en) Method, apparatus and computer program product for configuring service instances
US20140096136A1 (en) Creating a Virtual Machine and Cloud Server
CN104239122B (en) A kind of virtual machine migration method and device
CN106354544A (en) Virtual machine creating method and system and host
US10164835B2 (en) Accessing peripheral devices from a container within virtual machines running on different host computing systems
CN110266761B (en) Load balancing application creation method and device, computer equipment and storage medium
CN110225094B (en) Load balancing application virtual IP switching method and device, computer equipment and storage medium
US11036535B2 (en) Data storage method and apparatus
WO2018040525A1 (en) Method, device, and equipment for processing resource pool
EP3637252A1 (en) Virtual machine deployment method and omm virtual machine
CN103544047B (en) cloud system data management method
WO2020119189A1 (en) Method, system and apparatus for sharing of fpga board by multiple virtual machines
US20190319837A1 (en) Methods and apparatus to migrate physical server hosts between virtual standard switches and virtual distributed switches in a network
CN104281484A (en) VM (virtual machine) migration method and device
US11509730B1 (en) Analyzing web service frontends to extract security-relevant behavior information
WO2020252921A1 (en) Multi-active load balancing application expansion method, application, device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant