CN109710375A - A method of separation virtual machine system subregion - Google Patents

A method of separation virtual machine system subregion Download PDF

Info

Publication number
CN109710375A
CN109710375A CN201811487265.3A CN201811487265A CN109710375A CN 109710375 A CN109710375 A CN 109710375A CN 201811487265 A CN201811487265 A CN 201811487265A CN 109710375 A CN109710375 A CN 109710375A
Authority
CN
China
Prior art keywords
disk
virtual machine
subregion
partitioning
cylinder
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.)
Withdrawn
Application number
CN201811487265.3A
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 CN201811487265.3A priority Critical patent/CN109710375A/en
Publication of CN109710375A publication Critical patent/CN109710375A/en
Withdrawn legal-status Critical Current

Links

Abstract

The present invention relates to cloud computing and technical field of virtualization, especially a kind of method for separating virtual machine system subregion.The method of the present invention is that the magnetic disk of virtual machine file where needing system partitioning to be separated is converted to raw format, then the partitioning scenario of this disk is checked, if the cylinder of system partitioning to be separated and other subregions is overlapped, then the subregion other than system partitioning in disk is deleted, it then is new disk system partitioning copy, this disk is finally converted into required disc format according to different virtualizations, and starts virtual machine using this disk as starting disk.The present invention when solving the separation of a virtual machine system subregion can not batch operation, can not can be used in the case where not can enter virtual machine system the problem of separation system subregion in virtual machine external separation system subregion.

Description

A method of separation virtual machine system subregion
Technical field
The present invention relates to cloud computing and technical field of virtualization, especially a kind of method for separating virtual machine system subregion.
Background technique:
In cloud computing, usually one piece of disk place system subregion puts data using other disks.It can accomplish to lead in this way It crosses and changes system disk, that is, the disk for the system partitioning that changes the outfit, the function of carrying out switching system, go back original system also facilitates packing to be mirrored into, and uses To create other virtual machines.
Disk can be understood as one piece of hard disk of computer, and system partitioning can be understood as the C disk inside windows.
It is packaged mirror image, after being exactly modified to virtual machine, using system disk as template, new mirror is created with this template Picture.
Such as office is mounted in C disk inside windows, then system disk has been packaged into mirror image.Then this is used A mirror image removes creation virtual machine, then just having office inside new virtual machine, not needing to install again.
But in some old virtual machines, or due to operation is nonstandard;It can be in the disk for being filled with system partitioning On, and subregion has been divided, to fill data.Such as D disk has been divided to fill picture etc. again on this block disk.
This when, if to do replacement system disk, this partial data will lose.Or virtual machine is packaged into mirror Picture will all be placed into these data inside mirror image.Both of which is unacceptable.So system partitioning point From.
Separation system subregion common practices is into virtual machine, using the p2v tool of tool, such as xenserver, System disk changes into a file, then this file is taken above physical machine.These operations are all face operations on a virtual machine.
The problem of operating in this way has:
First is that if there is many platform virtual machines will operate, it is necessary to which a tableland enters virtual machine and operated.Even if It is a virtual machine, repetitive manual is also wanted to carry out these operations.
Second is that if it is not known that the case where virtual machine password or user are not intended to the information and data of leakage virtual machine Under cannot be introduced into virtual machine, just have no idea to operate.
If it is not known that password, can also be mounted to virtual machine by the mini system such as winpe and be operated again, but such as Fruit is that user is less comfortable with you to enter virtual machine, is afraid of information leakage, is then not to be allowed into virtual machine.
Third is that currently existing scheme, after being converted using software, the file of unloading is temporarily present inside virtual machine, if empty Insufficient space in quasi- machine, then can not be operated.
Fourth is that after being converted using software, file there are in virtual machine, then also needing to pass to physical machine from virtual machine, Time-consuming will greatly increase.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of method for separating virtual machine system subregion, realize in physical machine On the disk file of virtual machine is operated.
The technical solution that the present invention solves above-mentioned technical problem is:
The method is that the magnetic disk of virtual machine file where needing system partitioning to be separated is converted to raw format, so The partitioning scenario of this disk is checked afterwards, if the cylinder of system partitioning to be separated and other subregions is overlapped, being in disk Subregion other than system subregion is deleted, and is then new disk system partitioning copy, finally this disk according to different virtualizations It is converted into required disc format, and starts virtual machine using this disk as starting disk.
The method uses disk tools, operates to the disk of raw format, checks the subregion feelings of this disk file Condition;The tool is fdisk order.
The cylinder overlapping is checked by the output of fdisk order;The end position of system partitioning and data subregion Starting position is in the same cylinder.
The method calculates data block size and number, system partitioning is then copied out work according to cylinder information For new disk.
Whole operation of the invention is all to operate in physical machine to the disk file of virtual machine.It does not need to enter void Quasi- machine is kept completely separate with the system of virtual machine, disk size, network condition these factors completely, is not influenced by these factors.It can Grasped automatically to all designated virtual machines in same physical machine automatically by writing script file in physical machine Make, does not need an artificial platform virtual machine and operated.And the virtual machine of either what operating system, it is all same foot This operation.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is flow chart of the present invention.
Specific embodiment
As shown in Figure 1, the implementation steps of the method for the present invention are as follows:
Step 1: the magnetic disk of virtual machine file where needing system partitioning to be separated is converted to raw format;
There are above physical machine for the disk file of virtual machine.
Raw format is changed into, is to leave behind this naked format of raw to remove other all information, it can be in physics The corresponding partition information of this file is seen on machine.
Step 2: using disk tools, the disk of raw format is operated, checks the partitioning scenario of this disk file;
Such as with fdisk order, so that it may see the partitioning scenario of raw formatted file.
Step 3: if the cylinder of system partitioning to be separated and other subregions is overlapped, then follow the steps 4:
Cylinder overlapping can be can see by the output of fdisk order, the end position and data subregion of system partitioning Starting position on the same cylinder.
It is to be operated according to cylinder for unit because can't see smaller granularity, when operation.If number It is separated according to inside raw file, is separated according to how many a cylinders.If cylinder is overlapped, the knot of system partitioning While beam cylinder separates, the data of the data subregion on this cylinder of a part can be also separated.This can be directly resulted in Entire disk is unavailable.
Step 4: using disk partition tool, other subregions other than system partitioning in raw disk file are all deleted;
As talking about above, it is unavailable that cylinder overlapping will lead to the disk separated, so in addition to system point Subregion other than area is all deleted.Accordingly even when the entire cylinder data of cylinder that system partitioning terminates all are exported when copy ?.Only more spaces of a part of blank, do not interfere with whole system partitioning operation yet.
Step 5: checking cylinder information, calculate data block size and number, then system partitioning is copied out as new Disk;
Because having gone out other than dress number system subregion before this block disk, it is also possible to have other data subregions, so entire magnetic Disk file is very big.And system partitioning is now only needed, so only system partitioning is copied out.
By the available system partitioning of disk tools, the cylinder of beginning, the cylinder of end thus can be only this portion Cylinder is divided to copy out.Form a new disk file.
Step 6: new system disk being converted into required disc format according to different virtualizations, and using this disk as starting Disk starts virtual machine.
Disk file after copying out is raw format, and there is no the characteristics such as compression, is also not necessarily suitable all Virtualization.So this disk file is changed into format required for corresponding virtualize.

Claims (5)

1. a kind of method for separating virtual machine system subregion, it is characterised in that: the method is that handle needs system point to be separated Magnetic disk of virtual machine file where area is converted to raw format, then checks the partitioning scenario of this disk, if system to be separated The cylinder of subregion and other subregions is overlapped, then the subregion other than system partitioning in disk is deleted, then system partitioning is copied For new disk, this disk is finally converted into required disc format according to different virtualizations, and using this disk as starting magnetic Disk startup virtual machine.
2. according to the method described in claim 1, it is characterized by: the method uses disk tools, to the magnetic of raw format Disk is operated, and checks the partitioning scenario of this disk file;The tool is fdisk order.
3. according to the method described in claim 1, it is characterized by: the cylinder overlapping is looked by the output of fdisk order It sees;The end position of system partitioning and the starting position of data subregion are in the same cylinder.
4. according to the method described in claim 2, it is characterized by: the cylinder overlapping is looked by the output of fdisk order It sees;The end position of system partitioning and the starting position of data subregion are in the same cylinder.
5. method according to any one of claims 1 to 4, it is characterised in that: the method is calculated according to cylinder information Then data block size and number is copied out system partitioning as new disk.
CN201811487265.3A 2018-12-06 2018-12-06 A method of separation virtual machine system subregion Withdrawn CN109710375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811487265.3A CN109710375A (en) 2018-12-06 2018-12-06 A method of separation virtual machine system subregion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811487265.3A CN109710375A (en) 2018-12-06 2018-12-06 A method of separation virtual machine system subregion

Publications (1)

Publication Number Publication Date
CN109710375A true CN109710375A (en) 2019-05-03

Family

ID=66254668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811487265.3A Withdrawn CN109710375A (en) 2018-12-06 2018-12-06 A method of separation virtual machine system subregion

Country Status (1)

Country Link
CN (1) CN109710375A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806922A (en) * 2019-10-14 2020-02-18 广州微算互联信息技术有限公司 Script execution method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675769A (en) * 1995-02-23 1997-10-07 Powerquest Corporation Method for manipulating disk partitions
US6167494A (en) * 1998-04-28 2000-12-26 International Business Machine Corporation Method and system for recovering from operating system failure
CN102354302A (en) * 2011-09-28 2012-02-15 奇智软件(北京)有限公司 Method and device for erasing disk
CN103383648A (en) * 2012-12-21 2013-11-06 北京安天电子设备有限公司 Method and system for compressible virtual machine magnetic disk size recycling
CN105718377A (en) * 2014-12-05 2016-06-29 华为技术有限公司 Method and apparatus for copying magnetic disk data in virtual application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5675769A (en) * 1995-02-23 1997-10-07 Powerquest Corporation Method for manipulating disk partitions
US6167494A (en) * 1998-04-28 2000-12-26 International Business Machine Corporation Method and system for recovering from operating system failure
CN102354302A (en) * 2011-09-28 2012-02-15 奇智软件(北京)有限公司 Method and device for erasing disk
CN103383648A (en) * 2012-12-21 2013-11-06 北京安天电子设备有限公司 Method and system for compressible virtual machine magnetic disk size recycling
CN105718377A (en) * 2014-12-05 2016-06-29 华为技术有限公司 Method and apparatus for copying magnetic disk data in virtual application

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806922A (en) * 2019-10-14 2020-02-18 广州微算互联信息技术有限公司 Script execution method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3138010B1 (en) System and method for optimized signature comparisons and data replication
CN104298559B (en) The method and device of physical host system virtualization
US8825936B2 (en) Systems and methods for increasing data volume sparseness
US11403146B2 (en) Method, apparatus, and server for managing image across cloud servers
US10437487B2 (en) Prioritized backup operations for virtual machines
US10574524B2 (en) Increasing reusability of and reducing storage resources required for virtual machine images
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
US20110078681A1 (en) Method and system for running virtual machine image
KR20110050452A (en) Recovery of a computer that includes virtual disks
CN105573830B (en) A kind of virtual machine migration method
CN103218227B (en) The method of compatible multiple file system and device on a kind of Android device built-in hard disk
EP3474143B1 (en) Method and apparatus for incremental recovery of data
WO2016065956A1 (en) Method and device for creating virtual machine
JP7012074B2 (en) Virtual disk expansion method and equipment
CN109995814A (en) Moving method and device, communication equipment, the storage medium of cloud host resource
CN113312155B (en) Virtual machine creation method, device, equipment, system and computer program product
CN109739617A (en) A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership
CN106126115A (en) A kind of method and device of the disk of EVM(extended virtual machine)
US9459883B2 (en) Modifying disk images
CN109710375A (en) A method of separation virtual machine system subregion
CN106815067A (en) The online moving method of virtual machine, device with I/O virtualizations
US11263082B2 (en) Data recovery of guest virtual machines
CN101645048B (en) Method for realizing computer virtualized evidence obtaining
CN109615668A (en) Digital picture based on component is synchronous
CN106021373A (en) File updating method and device

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190503