Movatterモバイル変換


[0]ホーム

URL:


CN105306225B - Openstack-based physical machine remote shutdown method - Google Patents

Openstack-based physical machine remote shutdown method
Download PDF

Info

Publication number
CN105306225B
CN105306225BCN201510745585.4ACN201510745585ACN105306225BCN 105306225 BCN105306225 BCN 105306225BCN 201510745585 ACN201510745585 ACN 201510745585ACN 105306225 BCN105306225 BCN 105306225B
Authority
CN
China
Prior art keywords
physical machine
openstack
machine
shut down
ipmi
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
CN201510745585.4A
Other languages
Chinese (zh)
Other versions
CN105306225A (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.)
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 LtdfiledCriticalG Cloud Technology Co Ltd
Priority to CN201510745585.4ApriorityCriticalpatent/CN105306225B/en
Publication of CN105306225ApublicationCriticalpatent/CN105306225A/en
Application grantedgrantedCritical
Publication of CN105306225BpublicationCriticalpatent/CN105306225B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明涉及物理机电源控制技术领域,特别是一种基于Openstack的物理机远程关机方法。本发明首先搭建Openstack的云平台,设置物理机的IPMI地址、IPMI登录用户名和密码;然后在Openstack云平台控制节点通过组件向目标物理机发送关闭虚拟机的请求,等待成功关闭所有虚拟机之后,发送开机、关机或者重启的命令给目标物理机的基板管理控制器(BMC);最后物理机的基板管理控制器(BMC)执行请求,并返回执行结果。本发明解决了物理机关机前需先关闭虚拟机并保证在其部署的应用服务正常退出、满足Openstack开源云平台Juno版本不能远程物理机关机、不能统一管理物理机和虚拟机电源状态等问题;可应用于云平台的物理机电源控制上。

The present invention relates to the field of physical machine power control technology, in particular to a physical machine remote shutdown method based on Openstack. The present invention first builds an Openstack cloud platform, sets the IPMI address, IPMI login username and password of the physical machine; then the Openstack cloud platform control node sends a request to shut down a virtual machine to the target physical machine through a component, waits for all virtual machines to be successfully shut down, and then sends a startup, shutdown or restart command to the baseboard management controller (BMC) of the target physical machine; finally, the baseboard management controller (BMC) of the physical machine executes the request and returns the execution result. The present invention solves the problems that the virtual machine needs to be shut down before the physical machine is shut down and the application service deployed therein is guaranteed to exit normally, that the Juno version of the Openstack open source cloud platform cannot be physically shut down remotely, and that the power status of the physical machine and the virtual machine cannot be uniformly managed; and can be applied to the power control of the physical machine of the cloud platform.

Description

Translated fromChinese
一种基于Openstack的物理机远程关机方法A remote shutdown method for physical machines based on Openstack

技术领域technical field

本发明涉及物理机电源控制技术领域,特别是一种基于Openstack的物理机远程关机方法。The invention relates to the technical field of physical machine power control, in particular to an Openstack-based remote shutdown method for a physical machine.

背景技术Background technique

随着Openstack开源云平台快速发展,已经有越来越多服务商和企业通过开源IasS(基础设施即服务)云平台搭建类似亚马逊公有云的服务,包括有新浪、中国移动、中国电信、国家电网、日本电信运营商KDDI等用户也使用上开源Openstack云平台。然而Openstack云平台侧重于对虚拟机进行远程管控,而忽略物理机远程管控重要性。随着业务的不断扩展导致云平台增加越来越多的物理机节点来提供虚拟化服务,随之而来的问题:With the rapid development of the Openstack open source cloud platform, more and more service providers and enterprises have built services similar to Amazon's public cloud through the open source IasS (Infrastructure as a Service) cloud platform, including Sina, China Mobile, China Telecom, and State Grid , Japanese telecom operator KDDI and other users also use the open source Openstack cloud platform. However, the Openstack cloud platform focuses on remote control of virtual machines, while ignoring the importance of remote control of physical machines. With the continuous expansion of business, the cloud platform adds more and more physical machine nodes to provide virtualization services, and the following problems arise:

一是传统开源云平台通常没有物理机远程管理的功能,不能通过云平台统一远程管理物理机,需要另外一套物理机管理系统来管理物理机,特别是服务器空闲不用,需要远程对物理机进行关机操作。One is that the traditional open source cloud platform usually does not have the function of remote management of physical machines. It cannot remotely manage physical machines through the cloud platform. Another set of physical machine management system is needed to manage physical machines. Especially when the server is idle, it is necessary to remotely manage physical machines. Shutdown operation.

二是应用服务质量问题。众所周知,用户的最关心的应用都部署在虚拟机里面,而虚拟机则基于物理机。若对物理机进行关机,为了保证应用能够数据完整性,就需要通过云平台先关闭该物理机上所有虚拟机,保证应用正常退出,才能通过其他系统进行物理机关机操作。The second is the problem of application service quality. As we all know, the most concerned applications of users are deployed in virtual machines, and virtual machines are based on physical machines. If the physical machine is shut down, in order to ensure the data integrity of the application, all virtual machines on the physical machine need to be shut down through the cloud platform to ensure that the application exits normally, and then the physical shutdown operation can be performed through other systems.

为了Openstack云平台统一管理物理机和虚拟机的电源状态,提高应用服务质量,需要一种基于Openstack的物理机远程关机的方法,统一管理虚拟机和物理机的电源状态。In order to uniformly manage the power status of physical machines and virtual machines on the Openstack cloud platform and improve application service quality, a method for remotely shutting down physical machines based on Openstack is needed to uniformly manage the power status of virtual machines and physical machines.

发明内容Contents of the invention

本发明解决的技术问题在于提供一种基于Openstack的物理机远程关机的方法,解决了物理机关机前先关闭虚拟机、提高部署在虚拟机上的应用程序服务质量、满足Openstack开源云平台Juno版本不能远程物理机关机、不能统一管理物理机和虚拟机电源状态等问题。The technical problem solved by the present invention is to provide a method for remote shutdown of a physical machine based on Openstack, which solves the problem of shutting down the virtual machine before the physical shutdown, improving the service quality of the application program deployed on the virtual machine, and meeting the Juno version of the Openstack open source cloud platform Issues such as the inability to remotely physically shut down the machine, and the inability to manage the power status of physical machines and virtual machines in a unified manner.

本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the problems of the technologies described above is:

所述的方法包括如下步骤:Described method comprises the steps:

步骤1:设置物理机的IPMI智能平台管理接口地址、登录用户名和密码;Step 1: Set the IPMI intelligent platform management interface address, login user name and password of the physical machine;

步骤2:用户请求对目标节点远程关机;Step 2: The user requests to remotely shut down the target node;

步骤3:发送请求“关闭目标节点所有的虚拟机”;Step 3: Send a request "shut down all virtual machines on the target node";

步骤4:目标节点执行关闭本机上所有虚拟机;Step 4: The target node performs shutdown of all virtual machines on the machine;

步骤5:通过IPMI智能平台管理接口执行关机。Step 5: Perform shutdown through the IPMI intelligent platform management interface.

所述智能平台管理接口是一种开放标准的通用服务器硬件管理接口,不仅允许进行带外服务器管理,而且不需要通过操作系统来处理请求。The intelligent platform management interface is an open-standard general server hardware management interface, which not only allows out-of-band server management, but also does not need to process requests through the operating system.

所述用户通过Openstack的Web界面,点击目标节点,并请求对目标节点远程关机。The user clicks on the target node through the web interface of Openstack, and requests to remotely shut down the target node.

通过Web服务器判断目标节点的电源状态符合关机的要求,若符合要求则下发请求给后台服务。The power state of the target node is judged by the Web server to meet the shutdown requirements, and if it meets the requirements, a request is sent to the background service.

所述目标节点收到请求后,通过Libvirt接口查询本地上所有处于正在运行状态的虚拟机列表,循环对每个虚拟机执行关闭电源操作,并返回结果。After the target node receives the request, it queries the list of all running virtual machines locally through the Libvirt interface, executes a power-off operation on each virtual machine in a loop, and returns the result.

所述后台服务收到虚拟机关闭电源的结果,IPMI的地址、登录用户名和密码,调用IPMI命令行工具的命令,通过IPMI智能平台管理接口发送给目标节点的BMC执行关机。The background service receives the result that the virtual machine is powered off, the IPMI address, login user name and password, calls the command of the IPMI command line tool, and sends it to the BMC of the target node through the IPMI intelligent platform management interface to perform shutdown.

所述Openstack是由NASA(美国国家航空航天局)和Rackspace合作研发并发起的,以Apache许可证授权的自由软件和开放源代码项目;是一个开源的云计算管理平台项目,由多个主要的组件组合起来完成具体工作Said Openstack is a free software and open source code project authorized by the Apache license, which was jointly developed and initiated by NASA (National Aeronautics and Space Administration) and Rackspace; it is an open source cloud computing management platform project, composed of several major Components combine to do specific work

所述Libvirt是Linux操作系统的免费、开源的主流虚拟化工具的C函数库,其目的是包括Kvm、Xen在内的各种虚拟化工具提供一套方便、可靠的编程接口,支持C、C++、Java和Python等多种主流编程语言。Described Libvirt is the C function storehouse of free, open-source mainstream virtualization tool of Linux operating system, and its purpose is that various virtualization tools including Kvm, Xen provide a set of convenient, reliable programming interface, support C, C++ , Java and Python and other mainstream programming languages.

本发明通过Libvirt接口和智能平台管理接口,支持对各种主流品牌的服务器远程关机,并在平台上统一对虚拟机和物理机先后进行关闭电源操作,本发明也为用户提供很大的便利性。本发明区别于一般的开源云平台不能统一管理物理机和虚拟机的电源状态,不受服务器品牌和操作系统的限制,按需关闭物理机和虚拟机,有效控制电费支出。The present invention supports remote shutdown of servers of various mainstream brands through the Libvirt interface and the intelligent platform management interface, and performs power-off operations on virtual machines and physical machines on the platform in a unified manner. The present invention also provides great convenience for users . The present invention is different from the general open source cloud platform which cannot uniformly manage the power state of the physical machine and the virtual machine, and is not restricted by the server brand and the operating system, shuts down the physical machine and the virtual machine as needed, and effectively controls the electricity expense.

附图说明Description of drawings

下面结合附图对本发明进一步说明:Below in conjunction with accompanying drawing, the present invention is further described:

图1为本发明方法流程图;Fig. 1 is a flow chart of the method of the present invention;

图2为本发明部署图。Fig. 2 is a deployment diagram of the present invention.

具体实施方式Detailed ways

如图1、2所示,本发明首先设置物理机的IPMI智能平台管理接口地址、登录用户名和密码As shown in Figures 1 and 2, the present invention first sets the IPMI intelligent platform management interface address, login user name and password of the physical machine

#The ipmi ip of the physical node#The ipmi ip of the physical node

ipmi_ip=20.251.36.116ipmi_ip=20.251.36.116

#The ipmi user of the physical node#The ipmi user of the physical node

ipmi_user=ADMINipmi_user=ADMIN

#The ipmi password of the physical node#The ipmi password of the physical node

ipmi_password=ADMINipmi_password=ADMIN

这里定义了IPMI智能平台管理接口地址、登录用户名和密码的配置项,保存到目标节点的配置项文件。The IPMI intelligent platform management interface address, login user name and password configuration items are defined here, and are saved to the configuration item file of the target node.

发送请求“关闭目标节点所有的虚拟机”:Send the request "shut down all virtual machines on the target node":

步骤4:目标节点执行关闭本机上所有虚拟机Step 4: The target node performs shutdown of all virtual machines on the machine

执行单个虚拟机的关机流程:Execute the shutdown process of a single virtual machine:

通过IPMI智能平台管理接口执行关机Perform shutdown through the IPMI intelligent platform management interface

这里判断了物理机的状态,若物理机的状态符合关机,才能执行执行关机。The state of the physical machine is judged here. If the state of the physical machine is suitable for shutdown, the shutdown can be executed.

最后,物理机远程关机完成。Finally, the remote shutdown of the physical machine is completed.

Claims (2)

Translated fromChinese
1.一种基于Openstack的物理机远程关机方法,其特征在于:所述的方法包括如下步骤:1. a physical machine remote shutdown method based on Openstack, is characterized in that: described method comprises the steps:步骤1:设置物理机的IPMI智能平台管理接口的地址、登录用户名和密码;Step 1: Set the address, login user name and password of the IPMI intelligent platform management interface of the physical machine;步骤2:用户请求对物理机远程关机;Step 2: The user requests to remotely shut down the physical machine;步骤3:发送请求“关闭物理机所有的虚拟机”;Step 3: Send a request "shut down all virtual machines of the physical machine";步骤4:物理机执行关闭本机上所有虚拟机;Step 4: The physical machine performs shutdown of all virtual machines on the machine;步骤5:通过IPMI智能平台管理接口执行关机;Step 5: Execute shutdown through the IPMI intelligent platform management interface;所述智能平台管理接口是一种开放标准的通用服务器硬件管理接口,不仅允许进行带外服务器管理,而且不需要通过操作系统来处理请求;The intelligent platform management interface is an open standard general server hardware management interface, which not only allows out-of-band server management, but also does not need to process requests through the operating system;所述用户通过Openstack的Web界面,点击物理机,并请求对物理机远程关机;The user clicks on the physical machine through the web interface of Openstack, and requests to remotely shut down the physical machine;通过Web服务器判断物理机的电源状态符合关机的要求,若符合要求则下发请求给后台服务;The power status of the physical machine is judged by the web server to meet the shutdown requirements, and if it meets the requirements, a request is sent to the background service;所述物理机收到请求后,通过Libvirt接口查询本地上所有处于正在运行状态的虚拟机列表,循环对每个虚拟机执行关闭电源操作,并返回结果。After the physical machine receives the request, it queries the list of all running virtual machines locally through the Libvirt interface, executes a power-off operation on each virtual machine in a loop, and returns the result.2.根据权利要求1所述的基于Openstack的物理机远程关机方法,其特征在于:所述后台服务收到虚拟机关闭电源的结果、IPMI的地址、登录用户名和密码,调用IPMI命令行工具的命令,通过IPMI智能平台管理接口发送给物理机的BMC执行关机。2. the physical machine remote shutdown method based on Openstack according to claim 1, is characterized in that: the background service receives the result of virtual machine power off, the address of IPMI, login user name and password, calls the IPMI command line tool The command is sent to the BMC of the physical machine through the IPMI intelligent platform management interface to execute shutdown.
CN201510745585.4A2015-11-032015-11-03Openstack-based physical machine remote shutdown methodActiveCN105306225B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510745585.4ACN105306225B (en)2015-11-032015-11-03Openstack-based physical machine remote shutdown method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510745585.4ACN105306225B (en)2015-11-032015-11-03Openstack-based physical machine remote shutdown method

Publications (2)

Publication NumberPublication Date
CN105306225A CN105306225A (en)2016-02-03
CN105306225Btrue CN105306225B (en)2018-09-07

Family

ID=55203020

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510745585.4AActiveCN105306225B (en)2015-11-032015-11-03Openstack-based physical machine remote shutdown method

Country Status (1)

CountryLink
CN (1)CN105306225B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107179957B (en)*2016-03-102020-08-25阿里巴巴集团控股有限公司Physical machine fault classification processing method and device and virtual machine recovery method and system
CN107018032A (en)*2017-06-082017-08-04山东超越数控电子有限公司A kind of monitoring system server and method
CN108228315A (en)*2017-12-062018-06-29顺丰科技有限公司virtual machine command line management method and device
CN108848155A (en)*2018-06-082018-11-20郑州云海信息技术有限公司A kind of method and apparatus for the function controlling physical machine
CN109194732A (en)*2018-08-282019-01-11郑州云海信息技术有限公司A kind of the High Availabitity dispositions method and device of OpenStack
US12183134B2 (en)2018-09-262024-12-31Intel CorporationPower off and power on method and apparatus for an in-vehicle system
CN111078310A (en)*2019-11-132020-04-28国云科技股份有限公司 A method for quickly shutting down a desktop cloud server
CN111679862A (en)*2020-05-222020-09-18平安普惠企业管理有限公司Cloud host shutdown method and device, electronic equipment and medium
CN111752695B (en)*2020-06-282024-11-05北京百度网讯科技有限公司 Offline method, device, equipment and storage medium
CN112783603B (en)*2021-01-182024-08-06深圳市科思科技股份有限公司Cluster shutdown control method, system and storage medium
CN114237386A (en)*2021-11-292022-03-25歌尔光学科技有限公司Control method of virtual reality device, and storage medium
CN115904635B (en)*2023-02-162023-06-06江西联创精密机电有限公司Virtual machine management method and system based on server
CN116225715A (en)*2023-03-062023-06-06深圳市瑞云科技股份有限公司 Node machine power management method, system and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101650666A (en)*2009-08-312010-02-17曙光信息产业(北京)有限公司Computer management system and method
CN103092326A (en)*2013-01-252013-05-08浪潮电子信息产业股份有限公司Host energy saving method based on time
CN103473139A (en)*2013-09-262013-12-25四川中电启明星信息技术有限公司Virtual machine cluster resource allocation and scheduling method
CN104079434A (en)*2014-07-072014-10-01用友软件股份有限公司Device and method for managing physical devices in cloud computing system
CN104270430A (en)*2014-09-192015-01-07国云科技股份有限公司 A server remote scheduling method suitable for cloud computing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8112748B2 (en)*2005-09-012012-02-07International Business Machines CorporationMethod for operating software configured for internet access on a remote computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101650666A (en)*2009-08-312010-02-17曙光信息产业(北京)有限公司Computer management system and method
CN103092326A (en)*2013-01-252013-05-08浪潮电子信息产业股份有限公司Host energy saving method based on time
CN103473139A (en)*2013-09-262013-12-25四川中电启明星信息技术有限公司Virtual machine cluster resource allocation and scheduling method
CN104079434A (en)*2014-07-072014-10-01用友软件股份有限公司Device and method for managing physical devices in cloud computing system
CN104270430A (en)*2014-09-192015-01-07国云科技股份有限公司 A server remote scheduling method suitable for cloud computing

Also Published As

Publication numberPublication date
CN105306225A (en)2016-02-03

Similar Documents

PublicationPublication DateTitle
CN105306225B (en)Openstack-based physical machine remote shutdown method
CN104580519B (en)A kind of method of rapid deployment openstack cloud computing platforms
EP3284213B1 (en)Managing virtual network functions
US10003672B2 (en)Apparatus, systems and methods for deployment of interactive desktop applications on distributed infrastructures
CN103297504B (en)The method of physics bare machine rapid deployment operating system in a kind of cloud data center
CN106982266A (en)A kind of method and apparatus of automatically dispose cluster
CN103441867B (en)Method for updating internal network resource allocation of virtual machine
CN108089913B (en)Virtual machine deployment method of super-fusion system
US9690593B2 (en)Server information handling system configuration from an end state definition file
US10432450B2 (en)Data plane API in a distributed computing network
CN102427481A (en)System for managing cloud computing service and cloud computing management method
CN103514038B (en)A kind of smooth method for closing and system of virtual system
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
US10353798B1 (en)Rapid development environment
CN108984272A (en)The control method and device of OpenStack cloud computing management platform
CN104754032A (en)Method and device for deploying OpenStack
CN104572269A (en)Quick cluster deployment method based on Linux operation system
CN105426243A (en) A method for remote maintenance of physical machines based on Openstack
CN106293847A (en)Method for supporting service of virtualization platform
CN111786810A (en) A method and system for automatic deployment of large-scale test bed nodes
CN105450748A (en) A method of physical machine remote desktop based on Openstack
CN106020935A (en)Method for running openstack component service across versions
CN106557354B (en)Method for setting attribute parameters of private image and computer equipment
CN106126283A (en)A kind of method of product allocation, Apparatus and system
CN106254162B (en)Network-based Linux system in cluster calculate node operating system recovery method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP02Change in the address of a patent holder

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

Patentee 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

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

CP02Change in the address of a patent holder

[8]ページ先頭

©2009-2025 Movatter.jp