Create virtual BMCs for controlling virtual instances via IPMI for vSphere environment
VirtualBMC for vSphere (vbmc4vsphere)
A virtual BMC for controlling virtual machines using IPMI commands for the VMware vSphere environment.
In other words, the VMware vSphere version of VirtualBMC part of the OpenStack project.
0.0.3, this can be used as a BMC of Nested-ESXi, therefore you can make the vSphere DPM work in your nested environment for testing purpose.
- For testing purposes only. Not for production use.
- The vCenter Server credentials including password are stored in plain text.
- The vSphere DPM can be enabled with VirtualBMC for vSphere, but be careful with the recommendations presented in the vSphere DPM in nested environments may not be accurate or meet expectations. See the wiki page for detail.
pip install vbmc4vsphere
If you want to run VirtualBMC for vSphere in Docker container, see the guide on wiki page.
Supported IPMI commands
# Power the virtual machine on, off, graceful off and reset ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 power on|off|soft|reset # Check the power status ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 power status # Set the boot device to network, dick or cdrom ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 chassis bootdev pxe|disk|cdrom # Get the current boot device ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 chassis bootparam get 5 # Get the channel info. Note that its output is always a dummy, not actual information. ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 channel info # Get the network info. Note that its output is always a dummy, not actual information. ipmitool -I lanplus -U admin -P password -H 192.168.0.1 -p 6230 lan print 1
Not Implemented yet:
- Inject NMI:
Install VirtualBMC for vSphere on some linux host, start
vbmcd daemon, and then configure through
pip install vbmc4vsphere
- Start daemon:
$ vbmcdBy default, daemon starts in background. You can start it in foreground by
--foregroundoption to get logs.
$ vbmcd --foreground
- In order to see all command options supported by the
$ vbmc --helpIt’s also possible to list the options from a specific command. For example, in order to know what can be provided as part of the
$ vbmc add --help
- Adding a new virtual BMC to control VM called lab-vesxi01:
$ vbmc add lab-vesxi01 --port 6230 --viserver 192.168.0.1 --viserver-username email@example.com --viserver-password my-secure-password
- Binding a network port number below 1025 is restricted and only users with privilege will be able to start a virtual BMC on those ports.
- Passing the credential for your vCenter Server is required.
- By default, IPMI credential is confugired as
password. You can specify your own username and password by
--passwordat this time.
- Adding a additional virtual BMC to control VM called lab-vesxi02:
$ vbmc add lab-vesxi02 --port 6231 --viserver 192.168.0.1 --viserver-username firstname.lastname@example.org --viserver-password my-secure-password
- Specify a different port for each virtual machine.
- Starting the virtual BMC to control VMs:
$ vbmc start lab-vesxi01 $ vbmc start lab-vesxi02
- Getting the list of virtual BMCs including their VM name and IPMI network endpoints they are reachable at:
$ vbmc list +-------------+---------+---------+------+ | VM name | Status | Address | Port | +-------------+---------+---------+------+ | lab-vesxi01 | running | :: | 6230 | | lab-vesxi02 | running | :: | 6231 | +-------------+---------+---------+------+
- To view configuration information for a specific virtual BMC:
$ vbmc show lab-vesxi01 +-------------------+--------------------+ | Property | Value | +-------------------+--------------------+ | active | False | | address | :: | | password | *** | | port | 6230 | | status | running | | username | admin | | viserver | 192.168.0.1 | | viserver_password | *** | | viserver_username | email@example.com | | vm_name | lab-vesxi01 | +-------------------+--------------------+
- Stopping the virtual BMC:
$ vbmc stop lab-vesxi01 $ vbmc stop lab-vesxi02
Once the virtual BMC for a specific VM has been created and started you can then issue IPMI commands against the address and port of that virtual BMC to control the VM.
In this example, if your VirtualBMC host has
192.168.0.100, you can control:
by using IPMI. For example:
- To power on the virtual machine
$ ipmitool -I lanplus -H 192.168.0.100 -p 6230 -U admin -P password chassis power on Chassis Power Control: Up/On
- To check its power status:
$ ipmitool -I lanplus -H 192.168.0.100 -p 6230 -U admin -P password chassis power status Chassis Power is on
- To shutdown
$ ipmitool -I lanplus -H 192.168.0.100 -p 6230 -U admin -P password chassis power soft Chassis Power Control: Soft
- To reset the
$ ipmitool -I lanplus -H 192.168.0.100 -p 6231 -U admin -P password chassis power reset Chassis Power Control: Reset
Optional configuration file
vbmc can make use of an optional configuration file, which is looked for in the following locations (in this order):
VIRTUALBMC_CONFIGenvironment variable pointing to a file
If no configuration file has been found, the internal defaults apply.
The configuration files are not created automatically unless you create them manually. And even if you don't create a configuration file, it won't matter in most cases.
Below is a sample of
[default] #show_passwords = false config_dir = /home/vbmc/.vbmc #pid_file = /home/vbmc/.vbmc/master.pid #server_port = 50891 #server_response_timeout = 5000 #server_spawn_wait = 3000 [log] # logfile = /home/vbmc/.vbmc/log/vbmc.log debug = true [ipmi] session_timeout = 10
Manage stored data manually
Once you invoke
vbmc add command, everything that you specified will be stored as
config file per virtual machine under
$HOME/.vbmc/ by default. This path can be changed by
config_dir in your
virtialbmc.conf described above.
Please note everything including password stored in plain text in the
$ cat ~/.vbmc/lab-vesxi01/config [VirtualBMC] username = admin password = password address = :: port = 6230 vm_name = lab-vesxi01 viserver = 192.168.0.1 viserver_username = firstname.lastname@example.org viserver_password = my-secure-password active = True
Use with Nested-ESXi and vCenter Server
In the vCenter Server, by using VirtualBMC for vSphere (
0.0.3 or later), you can enable the vSphere DPM: Distributed Power Management feature for Nested-ESXi host that is running in your VMware vSphere environment.
So you can achieve:
- Power-On the virtual ESXi in the same way as for physical ESXi.
- Automated power on/off control of ESXi hosts based on the load of the host cluster by vCenter Server.
Use with Nested-KVM and oVirt
In the oVirt, by using VirtualBMC for vSphere, you can enable the Power Management feature for Nested-KVM that is running in your vSphere environment.
This project is started based on the copy of VirtualBMC 2.1.0.dev and customized to support the VMware vSphere environment instead of the OpenStack.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size vbmc4vsphere-0.0.5-py3-none-any.whl (30.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size vbmc4vsphere-0.0.5.tar.gz (27.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for vbmc4vsphere-0.0.5-py3-none-any.whl