carl1's Posts

I am using cloud-accounts-vsphere for the url, but this should be similar $tbody = @{ hostName = "${vCenterManagementIp}" acceptSelfSignedCertificate = $true regions = @( @{ name='Datac... See more...
I am using cloud-accounts-vsphere for the url, but this should be similar $tbody = @{ hostName = "${vCenterManagementIp}" acceptSelfSignedCertificate = $true regions = @( @{ name='Datacenter:datacenter-3' externalRegionId='Datacenter:datacenter-3' } ) apiKey="${apiToken}" nsxHostName="${nsxHostName}" sddcId="$sddcId" password="${vCenterPassword}" createDefaultZones=$true dcId="${proxy_id}" name="vmcexpert${kit}-${student}_VMConAWS" username="${vCenterUsername}" } $tpayload = $tbody | convertTo-Json $tdata = invoke-RestMethod -method POST -headers $theaders -body $tpayload -ContentType 'application/json' -uri $turl
For vRA 7, this is a real problem.  VMware support has a procedure to clean some up.  For the vCenter danglers, "inaccessible" means that there are pieces of the VM still around.  Usually, this is a ... See more...
For vRA 7, this is a real problem.  VMware support has a procedure to clean some up.  For the vCenter danglers, "inaccessible" means that there are pieces of the VM still around.  Usually, this is a DS problem.  Again, I would submit a VMware support ticket. Carl L.
We have an CloudZone with two AZ's in it.  We have a CloudTemplate with a VM and a LB.  We are getting intermittent problems where the LB is deployed to a different AZ than the VM, causing the provis... See more...
We have an CloudZone with two AZ's in it.  We have a CloudTemplate with a VM and a LB.  We are getting intermittent problems where the LB is deployed to a different AZ than the VM, causing the provision to fail.  Is there any way to tell vRA to place the LB on the same AZ where the VM was placed? Thanks, Carl L.
<?xml version='1.0' encoding='UTF-8'?> <dunes-script-module name="getNextSequenceNumber" result-type="number" api-version="6.0.0" id="5fd1baf9-d866-4253-af5b-50405abec0d2" version="0.1.1" category-n... See more...
<?xml version='1.0' encoding='UTF-8'?> <dunes-script-module name="getNextSequenceNumber" result-type="number" api-version="6.0.0" id="5fd1baf9-d866-4253-af5b-50405abec0d2" version="0.1.1" category-name="community.utility"> <description><![CDATA[Get the next number in a sequence in a vRO cluster safe way. Requires a configuration element "Sequences" to exist.]]></description> <param n="sequenceName" t="string"><![CDATA[Sequence name]]></param> <param n="autoCreate" t="boolean"><![CDATA[Optional: If sequence is not found, should it be created with an initial value of 1. Default is false.]]></param> <script encoded="false"><![CDATA[/* All codes are used at your own risk. We take no responsibility for any unexpected side effects. We do ask that, should you find an error, please report it so that we can fix it for others or join the community to assist in the correction. Licensing is under GPL, which can be found at https://www.gnu.org/licenses/gpl-3.0.en.html */ /* Version Date Developer Description of change 0.1.1 Dec 18, 2021 Carl Linkletter Initial */ System.getModule("community.utility.log").logDebug("community.utility", 1, "Start: getNextSequenceNumber: " + sequenceName); if (! autoCreate) autoCreate = false; var configElement = null; var ans = null; var path = "Sequences"; var lock="Community_ConfigElement/" + path; var owner = System.nextUUID(); var configElement = System.getModule("community.utility").findConfigurationElement(path); if (configElement == null) { throw "Configuration element '" + path + "' not found."; } // Lock affinity group to ensure another cluster is not doing the same thing at the same time. try { System.getModule("community.utility.log").logDebug("community.utility", 2, 'Acquiring lock "' + lock + '"'); LockingSystem.lockAndWait(lock, owner); System.getModule("community.utility.log").logDebug("community.utility", 3, 'Acquiring lock "' + lock + '" acquired.'); configElement.reload(); // flush vRO Config Element cache var attr = configElement.getAttributeWithKey(sequenceName); if (attr == null) { if (! autoCreate) throw "No key found with name " + sequenceName + " in path " + path; ans = 1; } else { ans = attr.value; } configElement.setAttributeWithKey(sequenceName, (ans+1), "number"); } finally { LockingSystem.unlock(lock, owner); System.getModule("community.utility.log").logDebug("community.utility", 2, 'Lock "' + lock + '" released'); } System.getModule("community.utility.log).logDebug("community.utility", 1, "END: getNextSequenceNumber: " + sequenceName + " = " + ans); return ans; ]]></script> </dunes-script-module>
So you are runing 3 vRO instances (even if you are a single vRA node).  The workflow that is changing the value is likely running on a different node than that which is checking it's value.  Config E... See more...
So you are runing 3 vRO instances (even if you are a single vRA node).  The workflow that is changing the value is likely running on a different node than that which is checking it's value.  Config Elements are cached in RAM. So if vRO 1  checks the value vRO 2 changes it (but this is in the vRO DB only) vRO 1 checks the value again but the cache has not changed So what you need to do is do a "config_element.reload()" to load the new value.  If there is any chance that more than one vRO workflow could change it at the same time, you will need to set a mutex lock to ensure only one running workflow changes it at a time. For example, here is a code sample that gets sequence numbers.  Sorry it is in XML form but you can get the idea.  My lab is not up tonight. Carl L.
VMUG Advantage subscription.  Doesn't cost much and gives you a whole lot of product and licenses. Carl L.  
I would double check your indentation (2 spaces for each level, no tabs).  Your commands should go into a script file but cloud-init seems to be seeing it as a directive. Carl L.
These properties are part of the Custom Resources mechanism in 7.6, which does not exist in 8.  That is, vRA 8 will not automatically run scripts for you.  If you want this to work again, you will ne... See more...
These properties are part of the Custom Resources mechanism in 7.6, which does not exist in 8.  That is, vRA 8 will not automatically run scripts for you.  If you want this to work again, you will need to do it your self in vRO or ABX. Carl L.
Simply leave the line out.  vRA does not use customization spec to set the hostname and IP address (like vRA 7 did).  vRA 8 sets it directly so, unless you need to change the root password or auto-jo... See more...
Simply leave the line out.  vRA does not use customization spec to set the hostname and IP address (like vRA 7 did).  vRA 8 sets it directly so, unless you need to change the root password or auto-join to an AD domain, you can just delete your customizationSpec line. Carl L.
Different solution would be to simply add the property in your Cloud Template   myco_owner: ${env.requestedBy}   Carl L.
We are not using storage policies on the vCenter side so I cannot use Storage Policies.  We are simply setting tags on the Storage clusters and that works.  However, for database VMs, we need to set ... See more...
We are not using storage policies on the vCenter side so I cannot use Storage Policies.  We are simply setting tags on the Storage clusters and that works.  However, for database VMs, we need to set the DB disk to "independent-persistent".  Anyone know how to set that in the Cloud Template without the use of a storage Profile?  I did a test and you cannot mix.  You either use Storage Profiles/Policies or not. Thanks in advance, Carl L.
So Cloud-init and Custom Specs are in-compatible.  The problem is that the cust spec will reboot the VM while cloud-init is still working.  And, cloud-init only runs once.  So you may loose some setu... See more...
So Cloud-init and Custom Specs are in-compatible.  The problem is that the cust spec will reboot the VM while cloud-init is still working.  And, cloud-init only runs once.  So you may loose some setup.  If you want to know how to get cloud-init to set the IP, https://vnuggets.com/2020/01/29/vra-with-cloud-init-and-static-networking/ Good article. Carl L.
That depends upon if you want to allow your provision request to be submitted via a REST call to vRA as the REST call  is to cloud assembly, not service broker (thus no form processing). Carl L.
I am looking to create the cloudinit yaml code via a vRO or ABS action.  It can't be done on the form as our blueprints are called via REST (form actions are not processed).  Anyone have any idea how... See more...
I am looking to create the cloudinit yaml code via a vRO or ABS action.  It can't be done on the form as our blueprints are called via REST (form actions are not processed).  Anyone have any idea how I might do this? We try to keep our blueprint count down to about 10 instead of over 100 before.  We want to have one blueprint for Linux and Windows and the formatting depends upon the drives that are presented.  So a lot of variability in what it has to process. Thanks, Carl L.
Does anyone have an example of doing a cloudbase-init (windows of course) format of a disk drive?  I can't see any way of doing it but I must be wrong. Thanks all, Carl L.
So that is up to you.  You can either use vSphere Customization Specs (where you set the property to set the name of the GuestOS to match the VM name) or you can use cloud init and programmically set... See more...
So that is up to you.  You can either use vSphere Customization Specs (where you set the property to set the name of the GuestOS to match the VM name) or you can use cloud init and programmically set the VM name/IP.  There are lots of blogs on cloud init.  My first hit was https://vmwarelab.org/2020/02/14/vsphere-customization-with-cloud-init-while-using-vrealize-automation-8-or-cloud/ Carl L.
LCM - 8.4 vRA - 8.4 I am looking to punch out a vRA/vRO completely configured.  I have the REST call to LCM to provision the new environment.  I have the configuration of most of the vRA infrastruc... See more...
LCM - 8.4 vRA - 8.4 I am looking to punch out a vRA/vRO completely configured.  I have the REST call to LCM to provision the new environment.  I have the configuration of most of the vRA infrastructure and vRO endpoints working.  What I can't find is how to ask LCM to push all of the content to vRA/vRO (blueprints, workflows, actions, etc).  A REST call would be ideal.  Any guidance would be appreciated. Thanks, Carl L.
You seem to be assuming that there is only one network involved.  What if vRA has a choice of 3 networks that the VM could be placed on.  The NetworkID's are your list of possible networks.  For an e... See more...
You seem to be assuming that there is only one network involved.  What if vRA has a choice of 3 networks that the VM could be placed on.  The NetworkID's are your list of possible networks.  For an external IPAM solution, you would ask your IPAM system for a free IP on the first network.  If the answer is that there are none free, then try on the next one, etc.  When you get it, you should not just return an array of addresses, but also an array of the networkID's that you found your free IP on.   Carl L.
Just for completeness and since this is resolved my problem as well.  You should not only return "addresses" but also "networkSelectionIds" to tell vRA what cable you chose. Background:  vRA gives y... See more...
Just for completeness and since this is resolved my problem as well.  You should not only return "addresses" but also "networkSelectionIds" to tell vRA what cable you chose. Background:  vRA gives you a list of networkSelectionIds, which tells you all the vCables that the VM could be connected to.  So, the normal pattern would be to ask your IPAM system for an address on the first cable.  If it is full, then ask it for an IP from the 2nd cable, etc.  You need to tell vRA what cable your IP is for so that the VM is configured correctly.   Carl L.
I must be missing something here.  I don't understand how ABX can do this. I am assuming that you want to generate a VM name prefix using the org but then append it with some kind of a sequence numbe... See more...
I must be missing something here.  I don't understand how ABX can do this. I am assuming that you want to generate a VM name prefix using the org but then append it with some kind of a sequence number to guarantee unique VM names.  It is the sequence number that I have a problem with. With ABX, having files is moot since ABX is not persistent space.  Also, if you are generating unique names, in production you will be running clusters so you had better find some way to do safe locking of a sequence number. With vRO, it has a Locking mechanism that is vRO cluster safe so that solves problem one.  But, configuration element values are cached so you must reload the config element to get the most current value. bit, bit my 2 bits worth, Carl L.