VMware Cloud Community
filosmith
Enthusiast
Enthusiast

Cloudclient import unmanaged vms

Has anyone been able to import an unmanaged vm with cloudclient 4.4? What's it asking for in the blueprintid field? I think I'm almost there.

CloudClient>vra machines unmanaged register --owner me@my.com --deploymentName deploysment1 --compositeBlueprintId MY_COMPOSITE_BLUEPRINT --reservationid reservationName --componentId vSphere_Machine_1 --vmid unmanagedVmName --blueprintid

Here, I've tried MY_COMPOSITE_BLUEPRINT, which is also the name of the template that MY_COMPOSITE_BLUEPRINT clones.

It complains thusly:

com.vmware.cloudclient.exception.CloudClientException: Failed to convert 'MY_COMPOSITE_BLUEPRINT' to type VirtualMachineTemplateItem for option 'blueprintid'

Error: Unable to find a VirtualMachineTemplateItem by the name or id 'MY_COMPOSITE_BLUEPRINT'.

Thanks

Tags (1)
Reply
0 Kudos
7 Replies
parmarr
VMware Employee
VMware Employee

Hello, I see you have the request pending for quite some time. You can reach out to support by filing a SR with them, heres how to do it :

How to file a Support Request in My VMware (2006985) | VMware KB

Sincerely, Rahul Parmar VMware Support Moderator
Reply
0 Kudos
alexanderjn
Enthusiast
Enthusiast

Using the name of the fields in a CSV generated from Infrastructure > Administration > Bulk Imports > Generate CSV file, the parameters should be as follows for importing a vSphere VM to a new vRA deployment:

CloudClient>vra machines unmanaged register --blueprintid system_blueprint_vsphere --vmid <Virtual Machine Name> --reservationid <Host Reservation (Name or ID)> --deploymentName <Deployment Name> --compositeBlueprintId <Blueprint ID>  --componentId <Component Blueprint ID> --owner <Owner Name>

You can use tab completion for most of the fields as well.

As an example, if I had a VM I wanted to import with the following attribute:

  • Name: import-tst1

And if I created a blueprint (containing a single vSphere component VM) in vRA 7 with the following attributes:

  • Blueprint Name: New vSphere VM
  • Component VM ID: vSphere_VM

And if I wanted to assign the imported vm to the following user, reservation, and new deployment:

  • User: alexanderjn@my.com
  • vRA Reservation: Reservation_Site1_Production
  • Deployment Name: import-tst1_Deployment

CloudClient>vra machines unmanaged register --blueprintid system_blueprint_vsphere --vmid import-tst1 --reservationid Reservation_Site1_Production --deploymentName import-tst1_Deployment --compositeBlueprintId New\ vSphere\ VM  --componentId vSphere_VM --owner alexanderjn@my.com

Hope that helps!

Reply
0 Kudos
Sak_123
Contributor
Contributor

Hello Alex,

Thanks for the solution on blueprintid , it worked. But when I am trying to run the full command "CloudClient>vra machines unmanaged register --blueprintid system_blueprint_vsphere --vmid <Virtual Machine Name> --reservationid <Host Reservation (Name or ID)> --deploymentName <Deployment Name> --compositeBlueprintId <Blueprint ID>  --componentId <Component Blueprint ID> --owner <Owner Name>"  it gives error on ---
"Options 'deploymentName', 'compositeBlueprintid', 'componentId' are not available for this command. Use tab assist or the "help" command to see the legal options
"

So I used the command which i being suggested by cloud client itself , i.e. ,

vra machines unmanaged register (--owner, --blueprintid, --reservationid, --hoststoragereservationid, --vmid, --export, --format, --clusterName)

What should we use for --hoststoragereservationid ?

I tried everything but every time it says  -- Invalid HostReservationToStorageID.

Reply
0 Kudos
Sak_123
Contributor
Contributor

Hello Smith,

I am able to perform "Cloud client import unman aged vms" successfully. I am using vRA 7.3 and Cloud client 4.5.

Use - vra machines unmanaged register --blueprintid <system_blueprint_vsphere> --componentId <vSphere__vCenter__Machine_1> --owner sakshi@ucsbang6.com --compositeBlueprintId <Windows> --deploymentName <Test-Windows> --reservationid <test-res> --vmid <de74af17-21b9-4a95-a56a-07b8996585cf>

Please find the property values in following places :

--blueprintid - system_blueprint_vsphere (for all vSphere blueprints)

--componentId -    It is the id which you have given(auto-filled) under general tab while designing the blueprint in vRA.

--owner - owner of the vm

--compositeBlueprintId  - Name/id of the Blueprint

--deploymentName - name of the vm , which you wish to import to vRA

--reservationid  - name of the reservation created in vRA/reservation attached to the reservation policy assigned to the blueprint

--vmid - You will get this value in cloud client. Type vra machines unmanaged list , you will get list of all vms and their ids.

Hope that helps.

Reply
0 Kudos
jgiordan
Contributor
Contributor

Hello,

Do you found a workaroud to the message:

ocm.vmware.cloudclient.exception.CloudClientException: Failed to convert 'name_of_blueprint' to type VirtualMachineTemplateItem for option 'blueprintid'

Error: Unable to find a VirtualMachineTemplateItem by the name or id 'name_of_blueprint'.

Im using CloudClient 4.6 and im getting the same error

Reply
0 Kudos
Sak_123
Contributor
Contributor

Hello,

Please use this for all vSphere blueprints:   system_blueprint_vsphere 

Hope it helps !

Reply
0 Kudos
jgiordan
Contributor
Contributor

Got the same error using 'system_blueprint_vsphere'

com.vmware.cloudclient.exception.CloudClientException: Failed to convert 'system_blueprint_vsphere' to type VirtualMachineTemplateItem for option 'blueprintid'

Error: Unable to find a VirtualMachineTemplateItem by the name or id 'system_blueprint_vsphere'.

Reply
0 Kudos