Sample Script: Creating an Empty vApp with vCloud PowerCLI
Hi Everyone, The New-CIVApp cmdlet does not allow us to create empty vApps (which can be useful when templating out network configurations, for example). This shortcoming can be overcome by calling the...
View ArticleAutomate DRS groups affinity in a vcloud environment
Hi, I'm trying to automate affinity rules for drs groups manger on a vcloud cluster.The idea is to let certain VMs run on assigned esx hosts.We do not create the vm's ourself -> our customers...
View ArticleAll vCloud VMs in a provider vDC
Trying to get all VMs use a provider. The issue is making the call from the provider to then get all the vApps - it cannot be made this way Does anyone have a clean way of perfroming this action? ( A...
View ArticleSet Mac address of vCloud VM
Hi For a customer I need to regularly clone a production VM into vCloud for a test-environment. The VM needs to have an identical Mac Address because of some old-fashioned licenses. After cloning, the...
View ArticleHow can I get a vCloud VM's NIC type?
I'm trying to write a script that will compare the NIC type in vCloud to the NIC type in vCenter to help workaround a bug in vCloud 1.5. I can get a vCenter VM's NIC type by getting the vCenter VM and...
View ArticleClone a cloud VM into the same vApp?
I would like to clone a VM inside a vApp to create another instance of it in that same vApp. I have tried this with Import-CIVApp: $targetVapp = Get-CIVApp MyVapp$sourceVM = (Get-CIVM -VApp...
View ArticleHow to Reset Mac address of a VM through REST API?
Hi All, How to Reset Mac address of a VM through REST API? Thanks in Advance.
View ArticlevCD Powercli question....digging through API
Does anyone know how to extract the DateCreated for vApps and VMs via PowerCLI? The dates are readily available in the DB in dbo.vms, but i can't seem to dig it out via PowerCLI. I've found some...
View ArticlePowerShell Script to move VM's between vCloud vApps
Hi, I am looking to build a powershell script which will allow me to move/migrate the VM's from vApp in a Org vDC to another vApp in another Org vDC in the same organization. I was Import-CIVApp...
View ArticlevCD - Get VM quantity of each Organization
Hi all,I need to export a nice, simple report, with two columns:Organization Name | Number of VMs I need all the VMs in each Org (both running and not running). I know there's a function getting this...
View ArticleImport and Export of vApp
Hi All, Is it possible to export vApp using PowerCLI? We have DR requirement which stats - All vApp created in DC-A should be available in DC-B.As long as place holder vApp's are available we always...
View ArticleTrouble adding more "CIVM" to a "CIVApp" in vCloud via PowerCLI 5.5
Hi All,I am having trouble performing some tasks in PowerCLI that I can do easily in the GUI. Firstly, in the vCloud Director GUI, I can create a new vApp from a template that has one machine in it. I...
View ArticleSetting Guest Customization Section Fails in 5.5
Hi, Since migrating to vCloud 5.5 the following script fails which worked in 5.1: $CIVMs = get-CIvApp $CIvAppName | get-civm Foreach ($vm in $CIVMs) { write-host "Customizing" $vm.name...
View ArticleThe VCD - vCenter Glue - Linking VMs and Events
Hi All I have sucessfully talked to the vCenter running our Blades and hosting vCLoud, and vCloud itself I can see VMs from both sides. 1. What i am looking for is the glue that allows you to link the...
View ArticleStart-Job with PowerCLI not working
This script never gets past the first write-host line in the start-job... # Do work$csv = Import-Csv tmpbuild.csv foreach ($item in $csv) { Start-Job -RunAs32 -ScriptBlock { # Add...
View ArticleError when cloning a VM related to vCloud Director
Hey there!I have the following cmdlet: New-VM -Name ClonedVM -VM SourceVM -Datastore NewDS -VMHost ESXi -Location Folder -Confirm:$false The problem is that I'm trying to clone a VM that is a part of...
View ArticlevApp; Add custom Guest Properties failes
Hi All,I tried to add some custom Guest Properties to a vApp which is already deployed according to this blog entry:https://communities.vmware.com/thread/442664 My current script looks like this:...
View ArticleDTD is prohibited in this XML document
I am trying to use "connect-ciserver <servername>", and after entering my credentials, I get the following error message: Connect-CIServer : 5/10/2012 2:22:57 PM Connect-CIServer For...
View ArticleScript Slow: VCD Pulling External/Internal IP from Org/vApp
I was curious if any of the script masters could review the following. This works fine, but it is pretty slow. I'm hoping that the speed can be improved. When I query against an organization, vapp,...
View Articleexporting firewall/NAT rules from Edge Gateway
Anyone using a powerCLI script to output firewall/nat rules for Edge Gateways (ver 5.1.2) configured on Org VDC networks for documenation purposes? I've been able to pull plenty of information using...
View Article