Dear All,
We have requirement to migrate the Virtual Machines in the Vcloud environment to VRealize Automation 7.2. Can you please suggest the steps to migrate them please.
Existing - Vcloud 8.1
New- VRA 7.2
Dear All,
We have requirement to migrate the Virtual Machines in the Vcloud environment to VRealize Automation 7.2. Can you please suggest the steps to migrate them please.
Existing - Vcloud 8.1
New- VRA 7.2
Thank you. Your code sample helped a lot!
If you want to speed up your code a little bit you can wait for your Edge to become Ready instead of a simple Sleep:
while((Search-Cloud -QueryType EdgeGateway -Name $Name).IsBusy -eq $True){ $i++ Start-Sleep 1 if($i -gt $Timeout) { Write-Error "Creating Edge Gateway."; break} Write-Progress -Activity "Creating Edge Gateway" -Status "Wait for Edge to become Ready..." } Write-Progress -Activity "Creating Edge Gateway" -Completed
Kind regards,
Markus
After looking at the code, I think this is a gap in the VCD REST API. Worse, because the <Item> comes from OVF, this might not even be easily fixable (we have a similar problem for disks, where we have a custom attribute 'storageProfileHref' to point to the corresponding vCD storage profile). Getting this to work will require a code change in vCD.
In the mean time, you can use the solution you proposed: just attempt to eject the media ID for all media with the name "test_disk.iso", some will fail (which you can ignore), but one will work.
I'm a VMware customer (not service provider) running vCD 5.5.6. In one environment (not replicated in others), vApp Templates are losing the base disk when a linked clone consolidation operation occurs.
As an example I have a VM and I add it to the catalog as either a new or update an existing vApp Template. Now that I have my template, I clean up and delete the VM in my cloud. The chain length of the vApp Template changes from 2 to 1 but the storage used shows as 0 bytes and the flat VMDK goes missing from the datastore. Deploying from the vApp Template results in a "file not found", "cannot create snapshot", "unable to create" error.
Another example, I deployed from a working vApp Template and force a consolidate on the fast provisioned linked clone. Both the VM and the vApp Template have a chain length of 1 but only the VM is usable. The vApp Template has now lost access to a flat VMDK.
Has anyone run into this before?
please find the simplified form of migration steps in the following article.
http://blog.virtualmaster.it/2015/07/vcloud-director-to-vrealize-automation-migration-process/
can you please upload the screenshot? just trying to understand the context.
My final version of the Function to create a Edge Gateway in vCloud Director https://mycloudrevolution.com/2017/06/27/powercli-create-vcloud-director-edge-gateway/ :
#Requires -Version 4 #Requires -Modules VMware.VimAutomation.Cloud, @{ModuleName="VMware.VimAutomation.Cloud";ModuleVersion="6.3.0.0"} Function New-MyEdgeGateway {<# .SYNOPSIS Creates a new Edge Gateway with Default Parameters .DESCRIPTION Creates a new Edge Gateway with Default Parameters Default Parameters are: * Size * HA State * DNS Relay .NOTES File Name : New-MyEdgeGateway.ps1 Author : Markus Kraus Version : 1.0 State : Ready .LINK https://mycloudrevolution.com/ .EXAMPLE New-MyEdgeGateway -Name "TestEdge" -OrgVDCName "TestVDC" -OrgName "TestOrg" -ExternalNetwork "ExternalNetwork" -IPAddress "192.168.100.1" -SubnetMask "255.255.255.0" -Gateway "192.168.100.254" -IPRangeStart ""192.168.100.2" -IPRangeEnd ""192.168.100.3" -Verbose .PARAMETER Name Name of the New Edge Gateway as String .PARAMETER OrgVDCName OrgVDC where the new Edge Gateway should be created as string .PARAMETER OrgName Org where the new Edge Gateway should be created as string .PARAMETER ExternalNetwork External Network of the new Edge Gateway as String .PARAMETER IPAddress IP Address of the New Edge Gateway as IP Address .PARAMETER SubnetMask Subnet Mask of the New Edge Gateway as IP Address .PARAMETER Gateway Gateway of the New Edge Gateway as IP Address .PARAMETER IPRangeStart Sub Allocation IP Range Start of the New Edge Gateway as IP Address .PARAMETER IPRangeEnd Sub Allocation IP Range End of the New Edge Gateway as IP Address .PARAMETER Timeout Timeout for the Edge Gateway to get Ready Default: 120s #> Param ( [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Name of the New Edge Gateway as String")] [ValidateNotNullorEmpty()] [String] $Name, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="OrgVDC where the new Edge Gateway should be created as string")] [ValidateNotNullorEmpty()] [String] $OrgVdcName, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Org where the new Edge Gateway should be created as string")] [ValidateNotNullorEmpty()] [String] $OrgName, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="External Network of the New Edge Gateway as String")] [ValidateNotNullorEmpty()] [String] $ExternalNetwork, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="IP Address of the New Edge Gateway as IP Address")] [ValidateNotNullorEmpty()] [IPAddress] $IPAddress, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Subnet Mask of the New Edge Gateway as IP Address")] [ValidateNotNullorEmpty()] [IPAddress] $SubnetMask, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Gateway of the New Edge Gateway as IP Address")] [ValidateNotNullorEmpty()] [IPAddress] $Gateway, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Sub Allocation IP Range Start the New Edge Gateway as IP Address")] [ValidateNotNullorEmpty()] [IPAddress] $IPRangeStart, [Parameter(Mandatory=$True, ValueFromPipeline=$False, HelpMessage="Sub Allocation IP Range End the New Edge Gateway as IP Address")] [ValidateNotNullorEmpty()] [IPAddress] $IPRangeEnd, [Parameter(Mandatory=$False, ValueFromPipeline=$False,HelpMessage="Timeout for the Edge Gateway to get Ready")] [ValidateNotNullorEmpty()] [int] $Timeout = 120 ) Process { ## Get Org vDC Write-Verbose "Get Org vDC" [Array] $orgVdc = Get-Org -Name $OrgName | Get-OrgVdc -Name $OrgVdcName if ( $orgVdc.Count -gt 1) { throw "Multiple OrgVdcs found!" } elseif ( $orgVdc.Count -lt 1) { throw "No OrgVdc found!" } ## Get External Network Write-Verbose "Get External Network" $extNetwork = Get-ExternalNetwork | Get-CIView -Verbose:$False | where {$_.name -eq $ExternalNetwork} ## Build EdgeGatway Configuration Write-Verbose "Build EdgeGatway Configuration" $EdgeGateway = New-Object VMware.VimAutomation.Cloud.Views.Gateway $EdgeGateway.Name = $Name $EdgeGateway.Configuration = New-Object VMware.VimAutomation.Cloud.Views.GatewayConfiguration #$EdgeGateway.Configuration.BackwardCompatibilityMode = $false $EdgeGateway.Configuration.GatewayBackingConfig = "compact" $EdgeGateway.Configuration.UseDefaultRouteForDnsRelay = $false $EdgeGateway.Configuration.HaEnabled = $false $EdgeGateway.Configuration.EdgeGatewayServiceConfiguration = New-Object VMware.VimAutomation.Cloud.Views.GatewayFeatures $EdgeGateway.Configuration.GatewayInterfaces = New-Object VMware.VimAutomation.Cloud.Views.GatewayInterfaces $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface = New-Object VMware.VimAutomation.Cloud.Views.GatewayInterface $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].name = $extNetwork.Name $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].DisplayName = $extNetwork.Name $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].Network = $extNetwork.Href $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].InterfaceType = "uplink" $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].UseForDefaultRoute = $true $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].ApplyRateLimit = $false ## Inputs müssen verändert werden $ExNetexternalSubnet = New-Object VMware.VimAutomation.Cloud.Views.SubnetParticipation $ExNetexternalSubnet.Gateway = $Gateway.IPAddressToString $ExNetexternalSubnet.Netmask = $SubnetMask.IPAddressToString $ExNetexternalSubnet.IpAddress = $IPAddress.IPAddressToString $ExNetexternalSubnet.IpRanges = New-Object VMware.VimAutomation.Cloud.Views.IpRanges $ExNetexternalSubnet.IpRanges.IpRange = New-Object VMware.VimAutomation.Cloud.Views.IpRange $ExNetexternalSubnet.IpRanges.IpRange[0].StartAddress = $IPRangeStart.IPAddressToString $ExNetexternalSubnet.IpRanges.IpRange[0].EndAddress = $IPRangeEnd.IPAddressToString $EdgeGateway.Configuration.GatewayInterfaces.GatewayInterface[0].SubnetParticipation = $ExNetexternalSubnet ## Create EdgeGatway Write-Verbose "Create EdgeGatway" $CreateEdgeGateway = $orgVdc.ExtensionData.CreateEdgeGateway($EdgeGateway) ## Wait for EdgeGatway to become Ready Write-Verbose "Wait for EdgeGatway to become Ready" while((Search-Cloud -QueryType EdgeGateway -Name $Name -Verbose:$False).IsBusy -eq $True){ $i++ Start-Sleep 5 if($i -gt $Timeout) { Write-Error "Creating Edge Gateway."; break} Write-Progress -Activity "Creating Edge Gateway" -Status "Wait for Edge to become Ready..." } Write-Progress -Activity "Creating Edge Gateway" -Completed Start-Sleep 1 Search-Cloud -QueryType EdgeGateway -Name $Name | Select Name, IsBusy, GatewayStatus, HaStatus | ft -AutoSize } }
Hi,
I am running vCD 8.1 which is connected to two remote vCenters - vmware 6.0
I have multiple tenants that are now are in need of disaster recovery features. I have used VMware replication with SRM in the past but NOT in an environment where vCD is used.
Can I use vmware replication with vCloud director??
Thank you so much.....yezdi
Hi,
I am trying to setup vCloud Director 8.20 with NSX 6.3, once we have added our provider VDC we are unable to setup a network pool. The error is related to the hosts not being prepared for VXLAN.
My understanding is that NSX base would allow same features as vShield would so we should be able to setup vCloud director with VLXAN backed network pool so that customers can create their own networks.
The current "NSX for vShields Endpoints" (NSX base?) licence won't let me install the VXLAN components on to the hosts.
Is it the case that we would have to go up to NSX Standard so that we can have VXLAN based isolated networks for our vCloud customers as we would have if we had a previous version of vCloud setup?
Regards
David
Are vCD events sent over AMQP for DRS / affinity rule creation, modification and deletion? We are using vCD 8.20 and are not seeing any yet, do I have to enable something or is this not supported?
Hi there,
Just wanted to report a possible defect in vCloud Director 8.20.0.1 (Build 5439762) when creating/editing an Organization VDC Template with the Pay-As-You-Go allocation model for the Memory resources guaranteed field; the default value is 20% for Pay-As-You-Go and the interface does not allow the value to be less than 20%; if it is set any lower it is set back to 20%. Values over 20% are retained however there is no way to set to less then 20% .
Reviewing the documentation (vCloud Director Administrator's Guide - vCloud Director 8.20 p.68) there is no mention of a minimum value for this field so suspect this may be a bug as creating an Organization VDC as PAYG (when not using a template allows this to be set to 0-20%).
As a workaround the following can be executed against the vCloud Director Database which seems to be the only way I have found that allows this to be updated;
UPDATE [vCloud].[dbo].[org_prov_vdc_specification] SET [memory_guarantee_percentage] = 0 WHERE [id] = ( SELECT [current_specification] FROM [vCloud].[dbo].[org_prov_vdc_template] WHERE [provider_name] = 'Test Org VDC (DC1)' );
After this is executed the Interface does not show the correct values however any VDCs that are Instantiated from the Template get the correct settings and the API returns the correct values.
Further when attempting to update via the API (Updating the XML specification and attempting a HTTP PUT against the URI in the Link.edit property) an exception is thrown regarding a duplicate key in dbo.org_prov_vdc_template_bindings.
<Error xmlns="http://www.vmware.com/vcloud/v1.5" stackTrace="org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [/* Method: VdcTemplateService.updateTemplate */ insert into org_prov_vdc_template_bindings (external_network_id, name, prov_vdc_id, org_prov_vdc_template_id, id) values (?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
" majorErrorCode="500" message="[ 23eccef1-9feb-488e-9d16-8ce81e1f56e9 ] Could not execute JDBC batch update; SQL [/* Method: VdcTemplateService.updateTemplate */ insert into org_prov_vdc_template_bindings (external_network_id, name, prov_vdc_id, org_prov_vdc_template_id, id) values (?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- Could not execute JDBC batch update
- Violation of UNIQUE KEY constraint 'uq_or_pr_vd_te_b_o_p_v_t_i_n_p'. Cannot insert duplicate key in object 'dbo.org_prov_vdc_template_bindings'. The duplicate key value is (0xbc18684d77004d6994865c8005757513, 0565aa5e-4e05-37cc-0203-2f7364b9fb5a, 0x2cbb70a62bb74fa6a140dd3dc5d93e0e)." minorErrorCode="INTERNAL_SERVER_ERROR" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5http://10.9.10.40/api/v1.5/schema/master.xsd"></Error>
A quick hack to attempt to update the specification via the REST API via Powershell which throw the Exception as per below:
function Get-vCloudAPIResponse(){<# .SYNOPSIS Wrapper function which returns the XML response from a vCloud Director API Call .DESCRIPTION Wrapper function which returns the XML response from a vCloud Director API Call .PARAMETER URI The URI of the vCloud API object to perform the GET request against .PARAMETER ContentType The Content-Type to pass to vCloud in the headers .EXAMPLE Get-vCloudAPIResponse -URI "https://vcd.pigeonnuggets.com/api/vApp/vm-f13ad1ca-3151-455c-aa84-935a2669da96/virtualHardwareSection/disks" -ContentType "application/vnd.vmware.vcloud.rasditemslist+xml" Returns the XML response from a HTTP GET to the API /virtualHardwareSection/disks section for object vm-f13ad1ca-3151-455c-aa84-935a2669da96 using the Session Key from the current connection and sets the content type to application/vnd.vmware.vcloud.rasditemslist+xml .NOTES NAME: Get-vCloudAPIResponse AUTHOR: Adrian Begg LASTEDIT: 2017-05-24 KEYWORDS: vmware get vcloud director #Requires -Version 2.0 #> Param( [Parameter(Mandatory=$True)] [string] $URI, [Parameter(Mandatory=$True)] [string] $ContentType ) if(!$global:DefaultCIServers.IsConnected){ throw "You are not currently connected to any servers. Please connect first using a Connect-CIServer cmdlet." } # Setup Web Request for the API call to retireve the data from vCloud $webclient = New-Object system.net.webclient $webclient.Headers.Add("x-vcloud-authorization",$global:DefaultCIServers.SessionSecret) $webclient.Headers.Add("Accept","application/*+xml;version=27.0") $webclient.Headers.Add("Content-Type", $ContentType) $webclient.Headers.Add("Accept-Language: en") try{ [xml]$xmlResponse = $webclient.DownloadString($URI) } catch { throw "An error occured attempting to make HTTP GET against $URI" } $xmlResponse } function Publish-vCloudAPICall(){ <# .SYNOPSIS Wrapper function which performs a POST of XML to the vCloud Director API .DESCRIPTION Wrapper function which performs a POST of XML to the vCloud Director API .PARAMETER URI The URI of the vCloud API object to perform the POST request against .PARAMETER ContentType The Content-Type to pass to vCloud in the headers .PARAMETER Data The payload to POST to the API .EXAMPLE .NOTES NAME: Publish-vCloudAPICall AUTHOR: Adrian Begg LASTEDIT: 2017-05-24 KEYWORDS: vmware publish vcloud director #Requires -Version 2.0 #> Param( [Parameter(Mandatory=$True)] [string] $URI, [Parameter(Mandatory=$True)] [string] $ContentType, [Parameter(Mandatory=$True)] [xml] $Data ) if(!$global:DefaultCIServers.IsConnected){ throw "You are not currently connected to any servers. Please connect first using a Connect-CIServer cmdlet." } # Setup Web Request $webclient = New-Object system.net.webclient $webclient.Headers.Add("x-vcloud-authorization",$global:DefaultCIServers.SessionSecret) $webclient.Headers.Add("Accept","application/*+xml;version=27.0") $webclient.Headers.Add("Content-Type", $ContentType) $webclient.Headers.Add("Accept-Language: en") # Convert the new configuration to byte array for upload [string] $strUploadData = $Data.OuterXml [byte[]]$byteArray = [System.Text.Encoding]::ASCII.GetBytes($strUploadData) # "To the cloud !" try{ $UploadData = $webclient.UploadData($URI, "PUT", $bytearray) } catch { throw "An error occured attempting to make HTTP POST against $URI" } } function Get-CIVdcTemplate(){ <# .SYNOPSIS Returns a Virtual Datacenter Template .DESCRIPTION Returns a Virtual Datacenter Template if no name is provided a collection of all VDC Templates is returned .PARAMETER TemplateName The name of the VDC Tempalte to search for .EXAMPLE Get-CIVdcTemplate Returns a collection of VDC Templates .EXAMPLE Get-CIVdcTemplate -TemplateName "Test VDC Template" Returns the template with the name "Test VDC Template" .NOTES NAME: Get-CIVdcTemplate AUTHOR: Adrian Begg LASTEDIT: 2017-07-11 #Requires -Version 2.0 #> Param( [Parameter(Mandatory=$False)] [string] $TemplateName ) # Check if the server is connected if(!$global:DefaultCIServers.IsConnected){ throw "You are not currently connected to any servers. Please connect first using a Connect-CIServer cmdlet." } # Check the version of vCloud Director is above v8.20 if(!($global:DefaultCIServers.Version -gt 8.00)){ throw "Org VDC Templates are introdcued in vCloud Director 8.00. The current connected server is version $($global:DefaultCIServers.Version)" } # Query the Organisation for the VDC TemplateRefereneces $URI = $global:DefaultCIServers.ServiceUri.AbsoluteURI + "admin/extension/vdcTemplateReferences" [xml] $XMLTemplateRef = Get-vCloudAPIResponse -URI $URI -ContentType "application/vnd.vmware.admin.vmwVdcTemplate+xml" if(!([string]::IsNullOrEmpty($TemplateName))){ $colVDCReferences = $XMLTemplateRef.VMWVdcTemplateReferences.Reference | ?{$_.name -eq $TemplateName} } else{ $colVDCReferences = $XMLTemplateRef.VMWVdcTemplateReferences.Reference } $colVDCTemplates = New-Object -TypeName System.Collections.ArrayList foreach($objRef in $colVDCReferences){ # Retrieve the configuration for each of the VDC Templates and add to a collection $VDCTemplateURI = $objRef.href [xml] $VDCTemplateSpec = Get-vCloudAPIResponse -URI $VDCTemplateURI -ContentType "application/vnd.vmware.admin.vmwVdcTemplate+xml" # Add the object to the collection $objVDCTemplate = New-Object System.Management.Automation.PSObject $objVDCTemplate | Add-Member Note* Name $objRef.name $objVDCTemplate | Add-Member Note* URI $objRef.href $objVDCTemplate | Add-Member Note* VDCTemplateXML $VDCTemplateSpec $colVDCTemplates.Add($objVDCTemplate) > $null } $colVDCTemplates } # Manually attempt to update via the API call HTTP PUT against the URI $objTest = Get-CIVdcTemplate "Test Org VDC (DC1)" $objTest.VDCTemplateXML.VMWVdcTemplate.VdcTemplateSpecification.MemoryGuaranteedPercentage = "0" Update-vCloudAPICall -URI $objTest.URI -Data $objTest.VDCTemplateXML.OuterXml -ContentType "application/vnd.vmware.admin.vmwVdcTemplate+xml"
Hello,
How can I split my vms per cluster based on operating system? Anyone?
Regards,
Rui
Haven't seen any such feature in VCD. You could create multiple storage policies and ensure that provisioning of VM's from catalogs is getting created on respective SP and limit the movement of VM between SP , provide each SP a name that is matching with the guest O/S naming convention for easy identification. For eg : Windows catalog -residing on Windows-Storage Profile , Linux Catalog on Linux-Storage Profile. May be a VRO workflow will be of little more helpful with some NSX Security group integration. Other than ease of identification what are we trying to achieve here?
Hello,
I was not able to find an API that fully disables time sync. This blog does have some ways to do it that could work: Completely Disable Time Synchronization for your VM - Virtualize Business Critical Applications - VMware Blogs
Hello,
After converting to a template, are you able to view were the flat files are stored?
I tested and found that vCD will pick up the change from vSphere, so parts of the recommendation in that article are sufficient.
Hi,
Yesterday I installed vCloud Director 8.20 into our lab and there are some problems with that and now i want to back to 8.10, but i can't find any downgrade process for that. Where can i find it? Or do you know how can I do it?
Thanks for your support,
Norbi.
Hi all,
I am looking for a way to view with PowerCLI what I can see in the web client at https://cell.domain.tld/cloud/#/activityLogTask?org=[org-ID-goes-here], or Organization, My Cloud, Logs, Tasks.
I have tried Search-Cloud -QueryType Task, but that seems to be System tasks only. I also looked into the ExtensionData properties of myOrg without luck. I know the information is contained in the jobs table in the SQL database, but I do not want to mess with that if I can do it via PowerCLI/API.
Any advise?
Thanks,
JD