VMware Cloud Community
ronaldod
Enthusiast
Enthusiast

VRA 8.6 Adding disk in the same folder (by API)

There is now a second day action that allows you to add a disk in the same folder of the VM. But i can not find it back in the /iaas/api/block-devices. Is there an other way to create new disk in the folder of the vm or is there a "move" option ?

Reply
0 Kudos
9 Replies
Ankush11s
VMware Employee
VMware Employee

You can use deployment day 2 API
example:
/deployment/api/deployments/{deploymentId}/resources/{resourceId}/requests

this will be in body

{
  "actionId": "string",
  "inputs": {},
  "reason": "string"
}
you need to add all the required parameter under inputs to do this 
Tags (1)
Reply
0 Kudos
ronaldod
Enthusiast
Enthusiast

We run a workflow as a second day action So this option is not useful as it locks the object as only one API request is allowed to be active. And running it async is also not wanted.

So what i am looking for is an option to move the disk to the folder of the VM or extra variables for the creation that it is created in the a certain folder.

 

 

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee

At what stage you want to add the Disk , Is it during deployment or Post the VM deployment ?


If we want to perform the adding Disk task via vRA , it would be the recommended way to use Day 2 action API or define the disk in Blueprint itself .


If we want to add the disk outside vRA then you can utilize PowerCli and add this to VM and choose the folder also
Having said that , directly adding via vCenter will not be tracked by vRA.

 

Reply
0 Kudos
ronaldod
Enthusiast
Enthusiast

It is needed as post deployment  As a second day action. Doing it with the API call it can be tracked within vRA. I was expecting it in the examples in VRA or in the IAAS api call but it looks atleast not documented or integrated in those options.

Is it documented where i can find the scripts that vRA uses for builtin 2day actions to find out how they fixed this ?

 

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee

I would not say this is the workflow which vRA is using but it would give reference for what you are looking for 
Add a Disk workflow in vRO under device managemenet.

Reply
0 Kudos
virtume
VMware Employee
VMware Employee

Did you find a fix for this. ? 

Reply
0 Kudos
ronaldod
Enthusiast
Enthusiast

In 8.6 I could not find the solution. Need to find a way the builtin scripts for the second days. Anyone know their locations ?

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee

OOB day 2 code is not in default workflow , It is something within product
But having said that if you can confirm you are comfortable with Python i can share some sample how you can utilise the Day 2 action via rest api using Python and achieve it 

Reply
0 Kudos
ronaldod
Enthusiast
Enthusiast

I'm pretty ok on python. Not a ninja yet. But how is it different from the other approach. If API can do it. I'm very interested in the calls that you use.

Reply
0 Kudos