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

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

Info

Publication number
CN105528237B
CN105528237B CN201510908625.2A CN201510908625A CN105528237B CN 105528237 B CN105528237 B CN 105528237B CN 201510908625 A CN201510908625 A CN 201510908625A CN 105528237 B CN105528237 B CN 105528237B
Authority
CN
China
Prior art keywords
physical machine
openstack
service
method based
physical
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
CN201510908625.2A
Other languages
English (en)
Other versions
CN105528237A (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的创建网络的接口
#neutron net-create deploy-net
#neutron subnet-create deploy-net 10.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命名的文件,内容如下:
#cat f2:f2:b9:5e:93:9f
default deploy
label deploy
kernel/tftpboot/caef70f5-1840-4fa3-b542-59287a1baf9f/deploy_kernel
append initrd=/tftpboot/caef70f5-1840-4fa3-b542-59287a1baf9f/deploy_ramdisk selinux=0
disk=cciss/c0d0,sda,hda,vda
3、物理服务器pxe开机启动;
#ipmitool -I lan-H 192.168.8.23-P 123456 classis power on
4、物理机从tftp获取和加载微系统;
物理机开机后获取ip,然后会自动加载内核和ramdisk初始化微系统
5、微系统提供iscsi服务,并把物理机磁盘发布出去;
步骤如下:
1)#tgtadm --lld iscsi --mode target --op new --tid 1 --targetnameiqn.2008-10.org.openstack:caef70f5-1840-4fa3-b542-59287a1baf9f
2)#tgtadm--lld iscsi--mode logicalunit--op new--tid 1--lun 1--backing-store sda
3)#tgtadm--lld iscsi--mode target--op bind--tid 1--initiator-addressALL
6、网络节点登录 iscsi发现卷并dd成raw文件;
1)登陆iscsi发现卷
#iscsiadm -m discovery -t sendtargets -p 10.0.10.4
#iscsiadm --mode node --targetname iqn.2008-10.org.openstack:caef70f5-1840-4fa3-b542-59287a1baf9f --portal 10.0.10.4:3260 -login
2)dd成raw
#dd if=/dev/sdb of=/deploy_inst/phy.raw bs=1M
7、raw文件转换成qcow2文件;
#qemu-img convert -f raw -O qcow2 /deploy_inst/phy.raw /deploy_inst/phy.qcow2
8、qcow2文件上传至glance服务
#glance image-create --name phy-package --file /deploy_inst/iso/phy.qcow2 --disk-format qcow2--container-format bare --is-public True –progress。

Claims (5)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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镜像文件的方法

Citations (3)

* 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 广州杰赛科技股份有限公司 一种实现虚拟机迁移的方法和云系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (3)

* 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 广州杰赛科技股份有限公司 一种实现虚拟机迁移的方法和云系统

Also Published As

Publication number Publication date
CN105528237A (zh) 2016-04-27

Similar Documents

Publication Publication Date Title
US11349710B1 (en) Composable edge device platforms
CN108809722B (zh) 一种部署Kubernetes集群的方法、装置和存储介质
EP3340033B1 (en) System and method for remotely updating firmware
US10761873B2 (en) Evaluating distributed application performance in a new environment
US10320674B2 (en) Independent network interfaces for virtual network environments
US9910765B2 (en) Providing testing environments for software applications using virtualization and a native hardware layer
US10127055B2 (en) iSCSI based bare metal OS image deployment and diskless boot
EP3261300B1 (en) Method and device for establishing link between virtual network functions
CN105528237B (zh) 一种基于openstack的物理机系统打包方法
US20150113531A1 (en) System for migrating virtual machine and method thereof
US10686755B2 (en) Assigning IP addresses and configuration parameters in hyper-converged infrastructure
US9934057B2 (en) Shadow VNICs for the control and observability of IO virtual functions
US11086662B2 (en) Method and system of migrating applications to a cloud-computing environment
US9100399B2 (en) Portable virtual systems for composite solutions
US20130086298A1 (en) Live Logical Partition Migration with Stateful Offload Connections Using Context Extraction and Insertion
US11132187B2 (en) Bare metal provisioning of software defined infrastructure
CN103984575A (zh) 一种云计算环境下集群Linux操作系统快速部署方法
US10437621B2 (en) Monitoring and managing applications on virtual machines using a proxy agent
WO2013049991A1 (en) Network adapter hardware state migration discovery in a stateful environment
Da Silva et al. Internet of things out of the box: using TOSCA for automating the deployment of IoT environments
US11762644B2 (en) Agentless installation for building deployments
US20150326437A1 (en) Server Information Handling System Configuration by Peer-to-Peer Networking
US20210288885A1 (en) Simulation and testing of infrastucture as a service scale using a container orchestration engine
US10164835B2 (en) Accessing peripheral devices from a container within virtual machines running on different host computing systems
US20170339223A1 (en) Adding and removing virtual disks remotely to a streaming machine

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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant