CN106406979A - Method of migrating virtual machine of XenServer platform to KVM virtual platform - Google Patents

Method of migrating virtual machine of XenServer platform to KVM virtual platform Download PDF

Info

Publication number
CN106406979A
CN106406979A CN201610802586.2A CN201610802586A CN106406979A CN 106406979 A CN106406979 A CN 106406979A CN 201610802586 A CN201610802586 A CN 201610802586A CN 106406979 A CN106406979 A CN 106406979A
Authority
CN
China
Prior art keywords
platform
virtual machine
xenserver
file
kvm
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.)
Pending
Application number
CN201610802586.2A
Other languages
Chinese (zh)
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201610802586.2A priority Critical patent/CN106406979A/en
Publication of CN106406979A publication Critical patent/CN106406979A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The present invention relates to the technical field of cloud computing, and particularly relates to a method of migrating a virtual machine of a XenServer platform to a KVM virtual platform. The method comprises the following steps of entering a host in which the XenServer virtual machine is; searching a vdi file corresponding to the virtual machine according to a script command; exporting the vdi file to a local file according to a DD command; copying the local file to a host in which the KVM platform is; converting the exported file into a qcow2 file according to a command; and creating a KVM platform virtual machine according to the qcow2 file. In the prior art, the operation is complex, the data is easy to loss, the occupation time is long when a P2V migration tool is used, and the migrated service stops for a long time. Through adoption of the method, problems in the prior art are solved.

Description

XenServer platform virtual machine migrates to the method for KVM virtualization platform
Technical field
The present invention relates to cloud computing administrative skill field, particularly relate to a kind of by XenServer platform virtual machine migrate to The method of KVM virtualization platform.
Background technology
Under cloud computing environment, XenServer is the enterprise-level virtual platform in cloud computing environment through checking, can There is provided the institute creating and managing needed for Virtual base framework functional.It is firmly got a lot of enterprises requiring harshness and trusts, and is used for Run the application of most critical;And adopted by the cloud computing environment of maximum-norm and xSP.Domestic in early days also a lot of enterprises use XenServer virtual platform, such as tide, Huawei etc..But XenServer is commercial version, expense costly, with The emergence of KVM virtualization platform;Increasing enterprise uses KVM virtualization platform at present.So how that XenServer is empty The virtual machine (vm) migration of planization platform to KVM virtualization platform also will be the big difficult point that we face.Compare the side of main flow at present Method has following two:
(1) derive XVA file, by being decompressed to XVA file and being combined into image file mode.
(2) P2V Migration tools are passed through, virtual machine is treated as physical machine derives ISO mirror image, then imports KVM platform again.
There is following drawback in both the above mode:
(1) derive the mode complex operation that XVA file remerges, be easily caused loss of data.
(2) more long by P2V Migration tools holding time, the business downtime simultaneously migrating is longer.
In order to from truly realizing XenServer virtual machine (vm) migration to KVM virtualization platform, need a kind of safety Stable, operate easy method.
Content of the invention
Present invention solves the technical problem that being to provide one kind to migrate XenServer platform virtual machine to KVM virtualization The method of platform, solves the deficiency that conventional method exists, is that under cloud computing environment, XenServer virtual machine (vm) migration is virtual to KVM Changing platform provides a kind of safe and reliable solution.
The present invention solves the technical scheme of above-mentioned technical problem:
Comprise the steps:
Step 1:Enter XenServer virtual machine place host;
Step 2:Virtual machine corresponding vdi file is searched by script command;
Step 3:Vdi file is exported to by local file by DD order;
Step 4:Local file is copied to KVM platform place host;
Step 5:Local file is changed into by qcow2 file by order;
Step 6:By qcow2 document creation KVM platform virtual machine.
Described step 2, specifically refers to what use was combined based on XenServer Virtual Machine Manager order itself Linux script, perform script can find out virtual machine corresponding vdi file.
Described Linux script, including:
Check virtual machine correlation vdi uuid;
Check vdi associated storage information;
Check vdi storage location.
Described DD order is:
Refer to provide #dd if=vdi storage location of=to export local file path bs=2097152 count= 378.
Described step 4, specifically refers to using FTP or SCP order copy local file to KVM platform host.
Described step 5, specifically refers to create a disk unit, and the local file carry that copy is come, then Carry out file format conversion.
Described qcow2 file, provides a kind of disk mirroring supporting KVM virtualization platform and KVM virtual machine template literary composition Part.
The present invention program has the beneficial effect that:
The method of the present invention provides one kind to use copy mode the staged files, has ensured the complete of virtual-machine data file Property, safe.
The method of the present invention pass through derive, copy and conversion can direct access virtual machine template file mode, simple to operate, Used time is short.
Brief description
The present invention is further described below in conjunction with the accompanying drawings:
Fig. 1 is the flow chart of the inventive method.
Specific embodiment
As shown in figure 1, essential core of the present invention is to change to realize by underlying virtual machine file, specific implementation process As follows:
1st, enter XenServer virtual machine place host;
2nd, virtual machine corresponding vdi file is searched by script command;
Script getVHD.sh core code is as follows:
#xe vbd-list vm-uuid=$ 1//check that virtual machine correlation vdi uuid, $ 1 are virtual machine uuid
#xe vdi-list uuid=$ 2//check vdi associated storage information, $ 2 are vdi uuid
#lvscan|grep<vdi-uuid>// search vdi storage location
3rd, vdi is exported to by local file by DD order;
#dd if=vdi storage location of=exports local file path bs=2097152 count=378
4th, local file is copied to KVM platform host;
Here FTP or SCP order copied files can be passed through
5th, the file translations of derivation are become by qcow2 file by order;
Core commands
#xmblock-attach 0tap2:tapdisk:vhd:Copy the file path xvdb w 0 coming
// create a disk unit, and the file mount that copy is come.
#qemu-img convert-p-0qcow2/dev/xvdb NYJ_TDCB_WEB_system.qcow2
// carry out file format conversion
Step 6:By qcow2 document creation KVM platform virtual machine, qocw2 is KVM virtualization platform virtual machine template File.

Claims (9)

1. a kind of XenServer platform virtual machine migrates method to KVM virtualization platform it is characterised in that methods described bag Include following steps:
Step 1:Enter XenServer virtual machine place host;
Step 2:Virtual machine corresponding vdi file is searched by script command;
Step 3:Vdi file is exported to by local file by DD order;
Step 4:Local file is copied to KVM platform place host;
Step 5:Local file is changed into by qcow2 file by order;
Step 6:By qcow2 document creation KVM platform virtual machine.
2. the XenServer platform virtual machine according to claim order migrates to the method for KVM virtualization platform, its feature It is that described step 2 specifically refers to:Using the Linux being combined based on XenServer Virtual Machine Manager order itself Script, perform script can find out virtual machine corresponding vdi file.
3. XenServer platform virtual machine according to claim 2 migrates to the method for KVM virtualization platform, its feature It is, described Linux script, including:
Check virtual machine correlation vdi uuid;
Check vdi associated storage information;
Check vdi storage location.
4. the XenServer platform virtual machine according to claim order migrates to the method for KVM virtualization platform, its feature It is, described DD order is:
#dd if=vdi storage location of=exports local file path bs=2097152 count=378.
5. according to claim 2 XenServer platform virtual machine is migrated to the method for KVM virtualization platform, it is special Levy and be, described DD order is:
#dd if=vdi storage location of=exports local file path bs=2097152 count=378.
6. XenServer platform virtual machine according to claim 3 migrates to the method for KVM virtualization platform, its feature It is, described DD order is:
#dd if=vdi storage location of=exports local file path bs=2097152 count=378.
7. the XenServer platform virtual machine according to any one of claim 1-6 migrates to the side of KVM virtualization platform Method, it is characterised in that described step 4, specifically refers to:Using FTP or SCP order copy local file to KVM platform host Machine.
8. XenServer platform virtual machine according to claim 7 migrates to the method for KVM virtualization platform, its feature It is that described step 5 specifically refers to:Create a disk unit, and the local file carry that copy is come, Ran Houjin Row file format is changed.
9. XenServer platform virtual machine according to claim 8 migrates to the method for KVM virtualization platform, its feature It is that described qcow2 file provides a kind of disk mirroring supporting KVM virtualization platform and KVM virtual machine template file.
CN201610802586.2A 2016-09-04 2016-09-04 Method of migrating virtual machine of XenServer platform to KVM virtual platform Pending CN106406979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610802586.2A CN106406979A (en) 2016-09-04 2016-09-04 Method of migrating virtual machine of XenServer platform to KVM virtual platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610802586.2A CN106406979A (en) 2016-09-04 2016-09-04 Method of migrating virtual machine of XenServer platform to KVM virtual platform

Publications (1)

Publication Number Publication Date
CN106406979A true CN106406979A (en) 2017-02-15

Family

ID=57998595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610802586.2A Pending CN106406979A (en) 2016-09-04 2016-09-04 Method of migrating virtual machine of XenServer platform to KVM virtual platform

Country Status (1)

Country Link
CN (1) CN106406979A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066312A (en) * 2017-04-14 2017-08-18 济南浪潮高新科技投资发展有限公司 Using the virtual machine (vm) migration implementation method of automatic compatible technology
CN107589982A (en) * 2017-09-12 2018-01-16 国云科技股份有限公司 A kind of method that virtual machine moves to KVM from VMware
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN108255575A (en) * 2017-12-06 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108255574A (en) * 2017-12-05 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108345493A (en) * 2018-03-13 2018-07-31 国云科技股份有限公司 A method of based on cloudy across the cloud migration of system Windows virtual machines under the overall leadership
CN108733383A (en) * 2018-03-30 2018-11-02 广东睿江云计算股份有限公司 A kind of XenServer virtual machines are loaded into method, the system of CD ISO files
CN109062670A (en) * 2018-08-14 2018-12-21 郑州云海信息技术有限公司 A kind of virtual machine migration method and device
CN109522088A (en) * 2018-09-30 2019-03-26 华为技术有限公司 A kind of virtual machine migration method and device
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership
CN110532061A (en) * 2019-08-13 2019-12-03 国云科技股份有限公司 A method of migrating virtual machine under cloudy environment
CN113515344A (en) * 2021-05-17 2021-10-19 中国工商银行股份有限公司 Method and device for automatically migrating virtual machine across technical platforms

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446119A (en) * 2010-10-13 2012-05-09 中标软件有限公司 Virtual machine dynamical migration method based on Passthrough I/O device
CN102455942A (en) * 2010-12-02 2012-05-16 中标软件有限公司 Method and system for dynamic migration of WAN virtual machines
US20140196037A1 (en) * 2013-01-09 2014-07-10 The Research Foundation For The State University Of New York Gang migration of virtual machines using cluster-wide deduplication
CN104506589A (en) * 2014-12-10 2015-04-08 上海爱数软件有限公司 Resource migration scheduling method based on super fusion storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446119A (en) * 2010-10-13 2012-05-09 中标软件有限公司 Virtual machine dynamical migration method based on Passthrough I/O device
CN102455942A (en) * 2010-12-02 2012-05-16 中标软件有限公司 Method and system for dynamic migration of WAN virtual machines
US20140196037A1 (en) * 2013-01-09 2014-07-10 The Research Foundation For The State University Of New York Gang migration of virtual machines using cluster-wide deduplication
CN104506589A (en) * 2014-12-10 2015-04-08 上海爱数软件有限公司 Resource migration scheduling method based on super fusion storage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FIRXIAO: ""xenserver迁移至kvm"", 《IT610:HTTP://WWW.IT610.COM/ARTICLE/2073095.HTM》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066312A (en) * 2017-04-14 2017-08-18 济南浪潮高新科技投资发展有限公司 Using the virtual machine (vm) migration implementation method of automatic compatible technology
CN107589982A (en) * 2017-09-12 2018-01-16 国云科技股份有限公司 A kind of method that virtual machine moves to KVM from VMware
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN108255574A (en) * 2017-12-05 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108255575A (en) * 2017-12-06 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108345493A (en) * 2018-03-13 2018-07-31 国云科技股份有限公司 A method of based on cloudy across the cloud migration of system Windows virtual machines under the overall leadership
CN108733383A (en) * 2018-03-30 2018-11-02 广东睿江云计算股份有限公司 A kind of XenServer virtual machines are loaded into method, the system of CD ISO files
CN108733383B (en) * 2018-03-30 2022-04-08 广东睿江云计算股份有限公司 Method and system for loading optical disk ISO file into XenServer virtual machine
CN109062670A (en) * 2018-08-14 2018-12-21 郑州云海信息技术有限公司 A kind of virtual machine migration method and device
CN109522088A (en) * 2018-09-30 2019-03-26 华为技术有限公司 A kind of virtual machine migration method and device
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership
CN110532061A (en) * 2019-08-13 2019-12-03 国云科技股份有限公司 A method of migrating virtual machine under cloudy environment
CN113515344A (en) * 2021-05-17 2021-10-19 中国工商银行股份有限公司 Method and device for automatically migrating virtual machine across technical platforms

Similar Documents

Publication Publication Date Title
CN106406979A (en) Method of migrating virtual machine of XenServer platform to KVM virtual platform
US9996396B2 (en) Cross architecture virtual machine migration
CN103970585B (en) Create the method and device of virtual machine
CN102999369B (en) The method and device of virtual machine upgrading
US8635395B2 (en) Method of suspending and resuming virtual machines
US8196138B2 (en) Method and system for migrating virtual machines between hypervisors
CN105022656B (en) virtual machine snapshot management method and device
WO2012131507A1 (en) Running a plurality of instances of an application
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
US9396004B1 (en) System and method for management of a configuration of a virtual machine
WO2016184320A1 (en) Method and device for upgrading qemu online
CN103761168B (en) It is a kind of that the method for carrying backup virtual machine is wrapping with based on nfs
CN107678831A (en) It is a kind of to realize the V2V methods migrated between virtual platform
US9841983B2 (en) Single click host maintenance
CN105677480A (en) Data processing method and device
US8856775B2 (en) Unstacking software components for migration to virtualized environments
CN111679889B (en) Conversion migration method and system of virtual machine
US9317340B2 (en) Intelligent virtual machine (VM) re-location
US9892154B2 (en) Verifying data structure consistency across computing environments
CN103207805A (en) Virtualization-based hard disk reuse system
US20140089557A1 (en) Image storage optimization in virtual environments
US10831524B2 (en) Virtual host migration system and method, computer apparatus and computer readable storage medium
US9336216B2 (en) Command-based data migration
CN109240803A (en) A kind of virtual machine migration method, device, server and storage medium
US8930967B2 (en) Shared versioned workload partitions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170215