rmxymh / infra-ecosphere

Provisioning Emulator with simulated BMC and Virtualbox.
MIT License
46 stars 20 forks source link

IPMI-proxy in virtualbox #2

Open awijntje opened 7 years ago

awijntje commented 7 years ago

Hi there,

Stumbled onto this project a couple of days ago and it looks like it perfectly addresses a need I have for having Ironic (installed in virtualbox) talk to virtualbox, however so fat I've not been able to get it to work and any help would really be appreciated.

My setup: Windows Host running virtualbox and infra-ecosphere VM running RHEL7 with ony a NAT-network and IPMI-proxy

On my VM i've installed ipmi-proxy and based on the closed issue in your Github figured out how to set the configuration for fake nodes (although I'm not completely sure this is correct). However IPMI commands issued within the VM never reach the HOST (I can see IPMI-proxy on the VM responding but infra-ecosphere on the HOST shows no responses or activity).

Presumably this has to do with how the ipmi-proxy connects to the webapi port on the host or my network configuration. In your setup what type of interface (network) does the VM use to facilitate this communication and how is this configured in the cfg file (specifically the fake node bit)?

Regards,

Alan Wijntje

sjwl commented 5 years ago

I got this to work.

here is the infra-ecosphere.cfg on my MacBook

{
    "Nodes": [
        {
            "BMCIP": "127.0.0.1",
            "VMName": "test"
        }
    ],
    "BMCUsers": [
        {
            "Username": "admin",
            "Password": "admin"
        }
    ],
    "WebAPIPort":   9090
}

and the infra-ecosphere.cfg on my VM

{
    "Nodes": [
        {
            "BMCIP": "127.0.0.1",
            "VMName": ""
        }
    ],
    "BMCUsers": [
        {
            "Username": "admin",
            "Password": "admin"
        }
    ],
    "WebAPIPort":   9090
}

Notice the second one has the name blanked out, making it a fake node.

Also here is the IPMI command I issued on the VM running the ipmi-proxy to test

ipmitool -U admin -P admin -H 127.0.0.1 chassis power status
Chassis Power is on

and on my MacBook I can see the infra-ecosphere debug output

GET /api/BMCs/127.0.0.1 GetBMC  77.617576ms

Also be sure whatever IPMI client you use, to be sure it's IPMI v1.5, not v2.0. v2.0 will not work and exhibit the same behavior as you're seeing.