VMware Cloud Community
TheVMinator
Expert
Expert
Jump to solution

VCAC and Validation

I'm looking for a strategy for validating my VMs once they are provisioned.  There are both linux and windows VMs.

1.  VCAC provisions a  VM, assigns it an IP address, hostname, DNS suffixes, virtual machine name, and other various attributes that VMs have

2.  Afterward I'd like to validate that these things all completed successfully and were in fact configured as expected.

What is the best way to do this and why?  What scripting / automation tools/methods are the best?

Should I use vCO to do this with workflows?

Should I think about adding another tool such as puppet to assist?

0 Kudos
1 Solution

Accepted Solutions
d-fens
Enthusiast
Enthusiast
Jump to solution

Hi, I find it the easiest way to have a PowerShell scriptas a scheduled job (or as part of a stub workflow) enumerating over all the VMs within the vCAC management context and then loading their properties to check them against the actual provisioned resources. You might code sth like this:

PS > $m.GetType().FullName;
DynamicOps.ManagementModel.ManagementModelEntities
PS > foreach($vm in $m.VirtualMachines) {

if(!$vm.IsManaged) { continue; }
$vm.VirtualMachineName;
$vm.GetType().FullName;

# your code to check
} # foreach

For information on how to use the MgmtContext you can check here: Investigating the vCAC 5.2 mgmtContext – d-fens GmbH and vCAC: Using the .NET ODATA REST Client from PowerShell – d-fens GmbH

For loading properties you can check here: vCAC: Dynamically load properties in PowerShell for vCAC entities – d-fens GmbH

and if you are using vCenter as a provisioning target you can login to the vCenter easily like this and use standard PowerCLI Cmdlets to verify plaement and settings: [NoBrainer] Enumerate over all vCenter VMs in vCAC – d-fens GmbH

If you are using a different target (eg vCD or AWS) you can do the same with their respective PowerShell modules.

Ronald Rink d-fens GmbH

View solution in original post

0 Kudos
2 Replies
d-fens
Enthusiast
Enthusiast
Jump to solution

Hi, I find it the easiest way to have a PowerShell scriptas a scheduled job (or as part of a stub workflow) enumerating over all the VMs within the vCAC management context and then loading their properties to check them against the actual provisioned resources. You might code sth like this:

PS > $m.GetType().FullName;
DynamicOps.ManagementModel.ManagementModelEntities
PS > foreach($vm in $m.VirtualMachines) {

if(!$vm.IsManaged) { continue; }
$vm.VirtualMachineName;
$vm.GetType().FullName;

# your code to check
} # foreach

For information on how to use the MgmtContext you can check here: Investigating the vCAC 5.2 mgmtContext – d-fens GmbH and vCAC: Using the .NET ODATA REST Client from PowerShell – d-fens GmbH

For loading properties you can check here: vCAC: Dynamically load properties in PowerShell for vCAC entities – d-fens GmbH

and if you are using vCenter as a provisioning target you can login to the vCenter easily like this and use standard PowerCLI Cmdlets to verify plaement and settings: [NoBrainer] Enumerate over all vCenter VMs in vCAC – d-fens GmbH

If you are using a different target (eg vCD or AWS) you can do the same with their respective PowerShell modules.

Ronald Rink d-fens GmbH
0 Kudos
TheVMinator
Expert
Expert
Jump to solution

ok thanks

0 Kudos