CN105528237A - 一种基于openstack的物理机系统打包方法 - Google Patents

一种基于openstack的物理机系统打包方法 Download PDF

Info

Publication number
CN105528237A
CN105528237A CN201510908625.2A CN201510908625A CN105528237A CN 105528237 A CN105528237 A CN 105528237A CN 201510908625 A CN201510908625 A CN 201510908625A CN 105528237 A CN105528237 A CN 105528237A
Authority
CN
China
Prior art keywords
physical machine
openstack
packaging method
physical
service
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.)
Granted
Application number
CN201510908625.2A
Other languages
English (en)
Other versions
CN105528237B (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 CN201510908625.2A priority Critical patent/CN105528237B/zh
Publication of CN105528237A publication Critical patent/CN105528237A/zh
Application granted granted Critical
Publication of CN105528237B publication Critical patent/CN105528237B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/45554Instruction set architectures of guest OS and hypervisor or native processor differ, e.g. Bochs or VirtualPC on PowerPC MacOS

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明涉及云计算技术领域,特别是一种基于openstack的物理机系统打包方法。本发明包括以下步骤:1、创建一个物理机打包网络;2、网络节点在上部署tftp服务;3、物理服务器pxe开机启动;4、物理机从tftp获取和加载微系统;5、微系统提供iscsi服务,并把物理机磁盘发布出去;6、网络节点登陆iscsi发现卷并dd成raw文件;7、raw文件转换成qcow2文件;8、qcow2文件上传至glance服务。本发明相比于传统的方法,物理机打包变成自动化的过程,可以提高物理机向虚拟机的效率;可以用于物理机应用向openstack虚拟机的迁移。

Description

一种基于openstack的物理机系统打包方法
技术领域
本发明涉及云计算技术领域,特别是一种基于openstack的物理机系统打包方法。
背景技术
在云计算领域,openstack是热门的开源的云平台,是广大企业组织搭建云平台的首选。现在越来越多的企业开始用openstack搭建自己的私有云平台,企业的大部分应用都跑在虚拟机里,但是还有一些遗留的应用跑在物理机系统上。目前业界通常迁移物理机系统的方式在物理机系统上安装p2v的工具,把物理机系统转换成一个镜像,然后拷贝并上传openstack环境,最后才创建虚拟机完成创建。这种方式效率太慢,不适合大规模的迁移物理机,如何快速的把遗留在物理机的上的应用迁移到openstack管理虚拟机上来,成为亟待解决的问题。
发明内容
本发明解决的技术问题在于提供一种基于openstack的物理机系统打包方法,解决大规模的物理机应用向虚拟机迁移问题。
本发明解决上述技术问题的技术方案是:
所述的方法包括以下步骤:
步骤1:创建一个物理机打包网络;
步骤2:网络节点上部署tftp服务;
步骤3:物理服务器pxe开机启动;
步骤4:物理机从tftp获取和加载微系统;
步骤5:微系统提供iscsi服务,并把物理机磁盘发布出去;
步骤6:网络节点登陆iscsi发现卷并dd成raw文件;
步骤7:raw文件转换成qcow2文件;
步骤8:qcow2文件上传至glance服务。
所述的创建一个物理机打包网络,是指通过openstack的neutron网络组件创建一个私有的网络;并且私有网络提供dhcp服务,私有网络能够到达需要打包的物理服务器;
所述的网络节点,是指openstack的网络节点,通常提供dhcp和路由服务。
所述的微系统是指一种内存操作系统,内存操作系统提供iscsi服务。
所述的dd是指Linux/UNIX下一个操作磁盘的命令,可以指定大小拷贝数据。这里把物理机磁盘的数据拷贝成raw文件
所述glance服务,是指openstack的虚拟机镜像服务,创建一台虚拟机需要从glance下载虚拟机镜像。
本发明与openstack的组件相结合,使物理机打包变成自动化的过程,可以提高物理机向虚拟机的效率。
附图说明
下面结合附图对本发明进一步说明:
图1为本发明的流程图。
具体实施方式
见图1所示,本发明包括以下步骤:
1、创建一个物理机打包网络;
调用neutron的创建网络的接口
#neutronnet-createdeploy-net
#neutronsubnet-createdeploy-net10.0.10.0/24--allocation-poolstart=10.0.10.3,end=10.0.10.254
2、网络节点在上部署tftp服务;
1)部署网络10.0.10.2用于监听tftp服务,需要在网络节点配置10.10.10.2
2)假如需要打包服务器的mac地址为f2:f2:b9:5e:93:9f,那么在pxelinux.cfg目录下创建以f2:f2:b9:5e:93:9f命名的文件,内容如下:
#catf2:f2:b9:5e:93:9f
defaultdeploy
labeldeploy
kernel/tftpboot/caef70f5-1840-4fa3-b542-59287a1baf9f/deploy_kernel
appendinitrd=/tftpboot/caef70f5-1840-4fa3-b542-59287a1baf9f/deploy_ramdiskselinux=0
disk=cciss/c0d0,sda,hda,vda
3、物理服务器pxe开机启动;
#ipmitool-Ilan-H192.168.8.23-P123456classispoweron
4、物理机从tftp获取和加载微系统;
物理机开机后获取ip,然后会自动加载内核和ramdisk初始化微系统
5、微系统提供iscsi服务,并把物理机磁盘发布出去;
步骤如下:
1)#tgtadm--lldiscsi--modetarget--opnew--tid1--targetnameiqn.2008-10.org.openstack:caef70f5-1840-4fa3-b542-59287a1baf9f
2)#tgtadm--lldiscsi--modelogicalunit--opnew--tid1--lun1--backing-storesda
3)#tgtadm--lldiscsi--modetarget--opbind--tid1--initiator-addressALL
6、网络节点登陆iscsi发现卷并dd成raw文件;
1)登陆iscsi发现卷
#iscsiadm-mdiscovery-tsendtargets-p10.0.10.4
#iscsiadm--modenode--targetnameiqn.2008-10.org.openstack:caef70f5-1840-4fa3-b542-59287a1baf9f--portal10.0.10.4:3260-login
2)dd成raw
#ddif=/dev/sdbof=/deploy_inst/phy.rawbs=1M
7、raw文件转换成qcow2文件;
#qemu-imgconvert-fraw-Oqcow2/deploy_inst/phy.raw/deploy_inst/phy.qcow2
8、qcow2文件上传至glance服务
#glanceimage-create--namephy-package--file/deploy_inst/iso/phy.qcow2--disk-formatqcow2--container-formatbare--is-publicTrue–progress。

Claims (7)

1.一种基于openstack的物理机系统打包方法,其特征在于:所述的方法包括以下步骤:
步骤1:创建一个物理机打包网络;
步骤2:网络节点上部署tftp服务;
步骤3:物理服务器pxe开机启动;
步骤4:物理机从tftp获取和加载微系统;
步骤5:微系统提供iscsi服务,并把物理机磁盘发布出去;
步骤6:网络节点登陆iscsi发现卷并dd成raw文件;
步骤7:raw文件转换成qcow2文件;
步骤8:qcow2文件上传至glance服务。
2.根据权利要求1所述的一种基于openstack的物理机系统打包方法,其特征在于:所述的创建一个物理机打包网络,是指通过openstack的neutron网络组件创建一个私有的网络;并且私有网络提供dhcp服务,私有网络能够到达需要打包的物理服务器;
所述的网络节点,是指openstack的网络节点,通常提供dhcp和路由服务。
3.根据权利要求1所述的一种基于openstack的物理机系统打包方法,其特征在于:所述的微系统是指一种内存操作系统,内存操作系统提供iscsi服务。
4.根据权利要求2所述的一种基于openstack的物理机系统打包方法,其特征在于:所述的微系统是指一种内存操作系统,内存操作系统提供iscsi服务。
5.根据权利要求1至4任一项所述的一种基于openstack的物理机系统打包方法,其特征在于:所述的dd是指Linux/UNIX下一个操作磁盘的命令,可以指定大小拷贝数据。这里把物理机磁盘的数据拷贝成raw文件。
6.根据权利要求1至4任一项所述的一种基于openstack的物理机系统打包方法,其特征在于:所述glance服务,是指openstack的虚拟机镜像服务,创建一台虚拟机需要从glance下载虚拟机镜像。
7.根据权利要求5所述的一种基于openstack的物理机系统打包方法,其特征在于:所述glance服务,是指openstack的虚拟机镜像服务,创建一台虚拟机需要从glance下载虚拟机镜像。
CN201510908625.2A 2015-12-10 2015-12-10 一种基于openstack的物理机系统打包方法 Active CN105528237B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510908625.2A CN105528237B (zh) 2015-12-10 2015-12-10 一种基于openstack的物理机系统打包方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510908625.2A CN105528237B (zh) 2015-12-10 2015-12-10 一种基于openstack的物理机系统打包方法

Publications (2)

Publication Number Publication Date
CN105528237A true CN105528237A (zh) 2016-04-27
CN105528237B CN105528237B (zh) 2019-02-01

Family

ID=55770483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510908625.2A Active CN105528237B (zh) 2015-12-10 2015-12-10 一种基于openstack的物理机系统打包方法

Country Status (1)

Country Link
CN (1) CN105528237B (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911500A (zh) * 2017-02-20 2017-06-30 北京百度网讯科技有限公司 物理机的配置方法、装置和物理机
CN108121591A (zh) * 2017-12-18 2018-06-05 浪潮软件股份有限公司 一种Kubernetes节点的实现方法及装置
CN108984276A (zh) * 2018-08-29 2018-12-11 郑州云海信息技术有限公司 一种主机迁移方法和装置
CN109271209A (zh) * 2018-09-26 2019-01-25 四川巧夺天工信息安全智能设备有限公司 一种解析并提取qcow2及qcow3镜像文件的方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404412A (zh) * 2011-12-28 2012-04-04 北京邮电大学 云计算数据中心节能方法及系统
CN102724277A (zh) * 2012-05-04 2012-10-10 华为技术有限公司 虚拟机热迁移和部署的方法、服务器及集群系统
CN102821158A (zh) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 一种实现虚拟机迁移的方法和云系统
US20140047342A1 (en) * 2012-08-07 2014-02-13 Advanced Micro Devices, Inc. System and method for allocating a cluster of nodes for a cloud computing system based on hardware characteristics

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404412A (zh) * 2011-12-28 2012-04-04 北京邮电大学 云计算数据中心节能方法及系统
CN102724277A (zh) * 2012-05-04 2012-10-10 华为技术有限公司 虚拟机热迁移和部署的方法、服务器及集群系统
US20140047342A1 (en) * 2012-08-07 2014-02-13 Advanced Micro Devices, Inc. System and method for allocating a cluster of nodes for a cloud computing system based on hardware characteristics
CN102821158A (zh) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 一种实现虚拟机迁移的方法和云系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911500A (zh) * 2017-02-20 2017-06-30 北京百度网讯科技有限公司 物理机的配置方法、装置和物理机
CN106911500B (zh) * 2017-02-20 2020-12-04 北京百度网讯科技有限公司 物理机的配置方法、装置和物理机
CN108121591A (zh) * 2017-12-18 2018-06-05 浪潮软件股份有限公司 一种Kubernetes节点的实现方法及装置
CN108984276A (zh) * 2018-08-29 2018-12-11 郑州云海信息技术有限公司 一种主机迁移方法和装置
CN109271209A (zh) * 2018-09-26 2019-01-25 四川巧夺天工信息安全智能设备有限公司 一种解析并提取qcow2及qcow3镜像文件的方法

Also Published As

Publication number Publication date
CN105528237B (zh) 2019-02-01

Similar Documents

Publication Publication Date Title
US11416275B2 (en) Techniques for migration paths
US10628194B2 (en) Techniques for data migration
US8830870B2 (en) Network adapter hardware state migration discovery in a stateful environment
US10686755B2 (en) Assigning IP addresses and configuration parameters in hyper-converged infrastructure
US9100399B2 (en) Portable virtual systems for composite solutions
US20180013791A1 (en) Methods and systems for providing configuration management for computing environments
WO2019015288A1 (zh) 数据持久化处理的方法、装置、系统及可读存储介质
US20130086200A1 (en) Live Logical Partition Migration with Stateful Offload Connections Using Context Extraction and Insertion
US11210132B2 (en) Virtual machine migration in virtualization environment having different virtualization systems
US10360011B2 (en) Private computer network installations
US20140007092A1 (en) Automatic transfer of workload configuration
CN103984575A (zh) 一种云计算环境下集群Linux操作系统快速部署方法
US8909912B2 (en) Apparatus and method for configuring a target machine with captured operational state comprising a static machine profile and a dynamic machine state to continue operations of a source machine
US10185575B2 (en) Computing device for operating a machine session with persistent read cache and non-persistent write cache and related methods
US11418566B2 (en) Adding and removing virtual disks remotely to a streaming machine
CN105528237A (zh) 一种基于openstack的物理机系统打包方法
CN113127150A (zh) 云原生系统的快速部署方法、装置、电子设备和存储介质
CN103440111A (zh) 虚拟机磁盘空间的扩展方法、宿主机和平台
CN113079702A (zh) 使用单个标识和缓存虚拟磁盘置备虚拟机
CN105573803A (zh) 一种物理机部署的方法
CN102929662A (zh) 一种基于网络批量分区的方法
US11106380B2 (en) Migration of storage for workloads between desktop and cloud environments
US10171292B1 (en) Deploying a cloud infrastructure in a remote site
US9354863B2 (en) Sharing of portable initialized objects between computing platforms
US9934052B1 (en) Large scale virtual application deployment using system provisioning tools

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Applicant after: G-Cloud Technology Co., Ltd.

Address before: 523808 No. 14 Building, Songke Garden, Songshan Lake Science and Technology Industrial Park, Dongguan City, Guangdong Province

Applicant before: G-Cloud Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant