After installing VirtualBMC in macOS, starting the server and adding a BMC for at least one VM, and then trying to start that BMC, you get the following error:
INFO VirtualBMC [-] Started vBMC server on port 50891
ERROR VirtualBMC [-] Control server error: Can't pickle local object 'VirtualBMCManager._sync_vbmc_states..vbmc_runner'
This is because the multiprocessing module needs to specify fork
as the startup method, since starting with Python 3.8 for macOS the startup method has been replaced by spawn
.
Add a line to the /path/to/python/site-packages/virtualbmc/manager.py
file:
if not instance or not instance.is_alive():
multiprocessing.set_start_method('fork', force=True) <<--
instance = multiprocessing.Process(
name='vbmcd-managing-domain-%s' % domain_name,
target=vbmc_runner,
args=(bmc_config,)
)
Now you can start a VBMC server and add BMC to different VMs without error.
vbmc list
+--------------+---------+---------+------+
| Domain name | Status | Address | Port |
+--------------+---------+---------+------+
| compute-1 | running | :: | 6241 |
| compute-2 | running | :: | 6242 |
| controller-1 | running | :: | 6233 |
| controller-2 | running | :: | 6234 |
| controller-3 | running | :: | 6235 |
+--------------+---------+---------+------+