Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 258290

Register unmanaged machine using vRealize API

$
0
0

Hello,

 

I am trying to register a VM by using the following API:

 

/iaas-proxy-provider/api/machines/register

 

with the following payload:

{    "owner": "user@example.local",    "virtualMachineId": "ff1b4d87-1209-4096-8920-2ac8dcff3f3d",    "requestingUser": "user@example.local",    "componentId": "VirtualMachine",    "machineProperties": [],    "compositeBlueprintId": "CentOS7",    "deploymentName": "Deployment_MACHINE-1",    "hostReservationId": "17d5fde6-6d13-48d6-a62d-271e5323b79a",    "templateId": "de26e2f2-b4b1-43f6-a96a-cb4c5ae753b0",    "hostStorageReservationId": "819ee0b5-b1dc-4b77-bba3-2a691333a090"
}

 

My question is: how to get the values for templateId and hostStorageReservationId. I was able to determine correct values expected by API by performing Bulk Import functionality of vRealize and examining the logs on IaaS server:

RegisterVmFromQueueActivity.ProcessElement:
Register VM: ff1b4d87-1209-4096-8920-2ac8dcff3f3d, 
blueprint: de26e2f2-b4b1-43f6-a96a-cb4c5ae753b0,
reservation: Reservation-DEV-1 (17d5fde6-6d13-48d6-a62d-271e5323b79a), 
storage: Pure-A (819ee0b5-b1dc-4b77-bba3-2a691333a090), 
owner: user@example.local,
element: 4

 

The value for blueprint matches the templateId in API call and storage matches hostStorageReservationId. If I performed the API call, the import process started correctly.

It appears that IaaS server is able to extract these 2 values from its SQL internal database.

 

My question is: Is there a way to get these values by using vRealize API or any vRO plugin? I am unable to find any relevant API or class that would provide these values.


Viewing all articles
Browse latest Browse all 258290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>