VMware Cloud Community
sc2317
Enthusiast
Enthusiast

Extend vRA Provisioned Machine Lease to Unlimited

Hi,

I am using vRA version 7.2 and I would like to make one of the machine's reservation to unlimited. However, I am getting below error which is expected if Blueprint has limited lease period.

pastedImage_0.png

Basically, when I created machine from Blueprint it had limited lease. However, before changing the lease of this machine I made the blueprint lease to unlimited but it is still throwing me the same error. I am not sure if its supported to change the lease to unlimited in this way. I know we can use cloudclient to achieve this, but I don't want to remove the machine from vRA or have it linked to other Blueprint.

Can we make the lease to unlimited without using cloudclient ?

0 Kudos
4 Replies
stevedrummond
Hot Shot
Hot Shot

In 7.2, no you can't. In 7.1 the empty lease worked but in 7.2 they "fixed it".

In 7.5+ you can update the lease property on the blueprint and propagate those changes to existing deployments.

The only options you have for 7.2 are to remove/reimport (doesn't work with public cloud or any real blueprint) or update it in the database. We went with the latter, building custom day-2 actions to perform the work in the DB programatically. We also removed all leases from all blueprints and manage it a different way.

0 Kudos
sc2317
Enthusiast
Enthusiast

Hi Steve,

Thanks, could you please suggest how can I change this in the database ?

0 Kudos
stevedrummond
Hot Shot
Hot Shot

You should only touch the database if you know exactly what you're doing and of course GSS will absolutely tell you not to do it unless using their scripts.

Still if you want to know, see below.

Log into postgres and run (for each resource in the deployment, not just machines!):

begin;

update cat_resource

set lease_end_date = {newDate};

where name = {resourceName}

commit;

You can also update the archive period by targeting set archive_days = {newDays}.

I don't know if vRA syncs the lease changes to IaaS so I do that as well for the machines.

Log into IaaS SQL and run:

update virtualmachine

set expires = {newDate}

where virtualmachinename = {machineName};

You can obviously tailor the queries however you want to target all/exact resources, remembering that ALL resources in a deployment must have the same lease.

0 Kudos
spena190
VMware Employee
VMware Employee

Hi guys!

I am trying to accomplished the same in vRA 8.1. I am trying to change the lease back to never expire using the "Deployment.ChangeLease" action. Any suggestions?

Thank you!

0 Kudos