HPE Morpheus Enterprise
1839710 Members
2463 Online
110153 Solutions
New Discussion

Re: Compute: Virtual machine API

 
Ibrahim-GCC
Regular Advisor

Compute: Virtual machine API

We intend to include the currently operational virtual machines into the Morpheus environment, which is already running on oVirt. If we provide the IP address and login information, we have the ability to add virtual machines to the compute part, as I’ve seen.

But I can’t seem to locate the API for those particular functionalities. Please advise on the best method of action in this situation.

4 REPLIES 4
Not applicable

Re: Compute: Virtual machine API

The previous POST and the body worked for me and this one too.
Did you try it?

Not applicable

Re: Compute: Virtual machine API

@ibrahim You can get that via CLI using a dry run

morpheus hosts add -c CLOUD -d

Example output:

REQUEST
POST https://appliance/api/servers

JSON
{
  "server": {
    "name": "apitest",
    "zone": {
      "id": 1
    },
    "computeServerType": {
      "id": 3
    },
    "plan": {
      "id": 105
    },
    "sshHost": "1.1.1.1",
    "sshPort": 22,
    "sshUsername": "user",
    "sshPassword": "pass"
  },
  "volumes": [
    {
      "id": -1,
      "rootVolume": true,
      "name": "root",
      "size": 10,
      "sizeId": null,
      "storageType": 1,
      "datastoreId": "autoCluster"
    }
  ],
  "servicePlanOptions": {
    "maxCores": 1,
    "coresPerSocket": 1,
    "maxMemory": 1073741824 #thats 1GB
  }
}
Ibrahim-GCC
Regular Advisor

Re: Compute: Virtual machine API

Hi @aabraham

What I am looking is I wants to add the virtual machines using API. Currently we are having it in the UI. Same steps needs to perform using API.


Ibrahim-GCC
Regular Advisor

Re: Compute: Virtual machine API

Hi @aabraham ,

Do you have any input on the above request?

Regards,
Ibrahim K