86
#vmworld CODE2394U Hybrid Cloud: Configuration and Day-to-Day Operations the API/CLI Way Gururaja Hegdal, VMware, Inc. #CODE2394U VMworld 2019 Content: Not for publication or distribution

Hybrid Cloud: Configuration and Day-to-Day Operations the

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

vmworld

CODE2394U

Hybrid Cloud Configuration and Day-to-Day Operationsthe APICLI Way

Gururaja Hegdal VMware Inc

CODE2394U

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc

Disclaimer

This presentation may contain product features or functionality that are currently under development

This overview of new technology represents no commitment from VMware to deliver these features in any generally available product

Features are subject to change and must not be included in contracts purchase orders or sales agreements of any kind

Technical feasibility and market demand will affect final delivery

Pricing and packaging for any new featuresfunctionalitytechnology discussed or presented have not been determined

2

The information in this presentation is for informational purposes only and may not be incorporated into any contract There is no commitment or obligation to deliver any items presented herein VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc

Agenda

3

Introduction - Hybrid Cloud

Hybrid Linked Mode Configuration

VMC SDDC - Provisioning Operations

HCX Migration

VMworld 2019 Content Not for publication or distribution

4copy2019 VMware Inc

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 5

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc

Disclaimer

This presentation may contain product features or functionality that are currently under development

This overview of new technology represents no commitment from VMware to deliver these features in any generally available product

Features are subject to change and must not be included in contracts purchase orders or sales agreements of any kind

Technical feasibility and market demand will affect final delivery

Pricing and packaging for any new featuresfunctionalitytechnology discussed or presented have not been determined

2

The information in this presentation is for informational purposes only and may not be incorporated into any contract There is no commitment or obligation to deliver any items presented herein VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc

Agenda

3

Introduction - Hybrid Cloud

Hybrid Linked Mode Configuration

VMC SDDC - Provisioning Operations

HCX Migration

VMworld 2019 Content Not for publication or distribution

4copy2019 VMware Inc

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 5

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc

Agenda

3

Introduction - Hybrid Cloud

Hybrid Linked Mode Configuration

VMC SDDC - Provisioning Operations

HCX Migration

VMworld 2019 Content Not for publication or distribution

4copy2019 VMware Inc

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 5

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

4copy2019 VMware Inc

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 5

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 5

Hybrid Cloud

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

6copy2019 VMware Inc

Hybrid Linked Mode Configuration ndash APICLI Ways

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 7

Hybrid Linked Mode (HLM) Configuration

HLM initiated from Cloud

bull apiexplorer

bull DCLI

bull PowerCLI

bull vSphere Automation SDK

HLM initiated from Onprem ndash Cloud Gateway appliance

bull UI-Installer

bull CLI-installer

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

8copy2019 VMware Inc

HLM Initiated from Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 9

HLM Configuration - Cloud

Onpremise version

bull vSphere 60 Update 3 patch c and later

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

NTP service or other authoritative time source

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 10

HLM Configuration - CloudThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 11

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Template Spec -

spec

admin_groups [stringstring

]domain_name stringpassword secret stringport stringpsc_hostname stringssl_thumbprint stringusername string

Sample Spec -

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

Response Body

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

Establish HLM

POST hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 12

Validate HLM Link

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

Response Body

value [

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_name vspherelocalrdquo

]

GET hvclinks

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 13

Delete HLM Link

Validate existence of HLM linkndash value []

Through ldquoapiexplorerrdquo (contdhellip)

HLM Configuration - Cloud

DELETE hvclinkslink

Response Bodyno content

Response Code200

Parameter Value Description Parameter Type Data Type

link 2f240651-9f7e-4d0f-a0a4-4c091f79b1fd Identifier of the hybrid link path string

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 14

Through ldquoDCLIrdquo amp ldquoPowerCLIrdquo

HLM Configuration - Cloud

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 15

HLM Configuration - CloudThrough ldquoDCLIrdquo

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

Available Commands

create Creates a new hybrid link between the local and foreign PSC Warning This command is available as

technical preview It may be changed in a future release

delete Deletes an existing hybrid link Warning This command is available as technical preview It may be

changed in a future release

list Enumerates the list of registered hybrid links Warning This command is available as technical

preview It may be changed in a future release

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 16

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --help

Usernamecloudadminvmclocal

Password Do you want to save credentials in the credstore (y or n) [y]y

usage com vmware vcenter hvc links create [-h]

[--admin-groups ADMIN_GROUPS] --domain-name DOMAIN_NAME

--password [PASSWORD] [--port PORT] --psc-hostname PSC_HOSTNAME

[--ssl-thumbprint SSL_THUMBPRINT] --username USERNAME

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

create --psc-hostname lsquopsc01tempcom --username administratorvspherelocal --password lsquopscpassword --ssl-thumbprint

E2652985BF8E8CD269C7744035A5A86E0E805F90 --domain-name vspherelocal --admin-groups

lsquonewadminstemplocal

023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 17

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list --help

usage com vmware vcenter hvc links list [-h]

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

list

|------------------------------------|-------------|

|link |display_name |

|------------------------------------|-------------|

|023e8c5f-89f3-4744-948b-55dbd460111d|vspherelocal|

|------------------------------------|-------------|

ghegdal-a01~ ghegdal$

Validate HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 18

HLM Configuration - CloudThrough ldquoDCLIrdquo (contdhellip)

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --help

usage com vmware vcenter hvc links delete [-h] --link LINK

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links

delete --link 023e8c5f-89f3-4744-948b-55dbd460111d

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ dcli +server vcentersddc-xxxxxvmcvmwarecom +skip-server-verification com vmware vcenter hvc links list

ghegdal-a01~ ghegdal$

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 19

HLM Configuration - CloudThrough ldquoPowerCLIrdquo

Connect-CisServer

Get-CisService

Connect-CisServer [-Server] ltString[]gt [-Force] [-NotDefault] [-Password ltSecureStringgt] [-Port ltInt32gt] [-

SaveCredentials] [-User ltStringgt] [ltCommonParametersgt]

Get-CisService [[-Name] ltString[]gt] [-Server ltCisServer[]gt] [ltCommonParametersgt]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 20

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt Connect-CisServer -Server $serverAddress -User $user -Password $pass

Name User Port

---- ---- ----

vcentersddc-xxxxxxxxxxxxxvmhellip cloudadminvmclocal 443

$hvcSvc=Get-CisService -Name comvmwarevcenterhvclinksrsquo

$hlmSpec = $hvcSvcHelpcreatespecCreate()

$hlmSpecpsc_hostname = rdquopsc01tempcom

$hlmSpecusername = administratorvspherelocal

$hlmSpecpassword = [VMwareVimAutomationCisCoreTypesV1Secret] pscpassword

$hlmSpecssl_thumbprint = E2652985BF8E8CD269C7744035A5A86E0E805F90

$hlmSpecdomain_name = vspherelocal

$hlmSpecadmin_groups = (newadminstemplocal)

$hvcSvccreate($hlmSpec)

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 21

HLM Configuration - CloudThrough ldquoPowerCLIrdquo (contdhellip)

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_link

Value

-----

023e8c5f-89f3-4744-948b-55dbd460111d

PS Usersghegdalgt $hvcSvclist() | ForEach-Object $_display_name

vspherelocal

PS Usersghegdalgt

Validate HLM

PS Usersghegdalgt $hvcSvcdelete(023e8c5f-89f3-4744-948b-55dbd460111d)

PS Usersghegdalgt

Delete HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 22

Establish HLM

Through ldquovSphere Automation SDKrdquo

HLM Configuration - Cloud

Method Description

setAdminGroups(javautilSetltjavalangStringgt adminGroups) List of groups to be added to enable administrator access to

setDomainName(javalangString domainName) The domain to which the PSC belongs

setPassword(char[] password) The administrator password of the PSC

setPort(javalangString port) The HTTPS port of the PSC to be linked

setPscHostname(javalangString pscHostname) The PSC hostname for the domain to be linked

setSslThumbprint(javalangString sslThumbprint) The ssl thumbprint of the server

setUsername(javalangString username) The administrator username of the PSC

Method Description

public javalangString create(LinksTypesCreateSpec spec) Creates a new hybrid link between the local and foreign PSCspec - Specification for the new link to be created

LinksTypesCreateSpec spec

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 23

Establish HLM ndash java code snippet

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

Prepare the spec for creating a link

LinksTypesCreateSpec spec = new LinksTypesCreateSpec()

Set the PSC details of the foreign SSO domain being linked

specsetPscHostname(_foreignHostname)

specsetPort(_foreignPort)

specsetUsername(_foreignUsername)

specsetPassword(_foreignPasswordtoCharArray())

specsetDomainName(_foreignDomain)

specsetSslThumbprint(_foreignSslThumbprint)

SetltStringgt AdminGrpSet = new HashSetltStringgt()

AdminGrpSetadd(_foreignAdminGroups)

specsetAdminGroups(AdminGrpSet)

Invoke the create operation and get link id back on a successful link

String linkId = linkProvidercreate(spec)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 24

Validate HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()

for (LinksTypesSummary summary linkedDomains)

Systemoutprintln(Link ID + summarygetLink() + Linked Domain + summarygetDisplayName())

Method Description

public interface Linkslist()

Enumerates the list of registered hybrid links

Class LinksTypesSummarypublic javalangString getLink()

Unique identifier for the link

Java code snippet

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 25

Delete HLM Link

Through ldquovSphere Automation SDKrdquo (contdhellip)

HLM Configuration - Cloud

Creates a session with the server by authenticating user and retrieving

authenticated stubs for client-side interfaces

Links linkProvider = vapiAuthHelpergetStubFactory()createStub(Linksclass

sessionStubConfig)

ListltLinksTypesSummarygt linkedDomains = linkProviderlist()String linkId

for (LinksTypesSummary summary linkedDomains)

linkId = summarygetLink()

Systemoutprintln(Link ID + linkId +

Linked Domain + summarygetDisplayName())

linkProviderdelete(linkId)

Method Description

void delete(javalangString link) Deletes an existing hybrid link

Java code snippet

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

26copy2019 VMware Inc

HLM Initiated from Onprem ndashCloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 27

HLM Configuration ndash Cloud Gateway ApplianceInstaller ISO bundle

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 28

HLM Configuration ndash Cloud Gateway Appliance

Onpremise version

bull vSphere 65 Update 2 patch d and later

Firewall ports open

Configure a management gateway

Identity Source ndash form users group who will have Cloud Administrator permissions

bull NTP service or other authoritative time source

Host resource requirement

bull CPUs ndash 8 Memory ndash 24GB Storage ndash 190 GB

Prerequisites

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 29

Procedurebull Prepare a JSON template for the installation - cli-installertemplates folder

bull Copy a template to a working directory and edit it to include the necessary parametersbull From the command line change to the cli-installer folder and run the installation prechecks

ndash For Windows OS vcgw-deployexe install path-to-template --precheck-only

ndash For LinuxMAC OS vcgw-deploy install path-to-template --precheck-only

bull Launch the installerndash For Windows OS vcgw-deployexe install path-to-template --accept-eula

ndash For LinuxMAC OS vcgw-deploy install path-to-template --accept-eula

bull For more information about all available template parameters vcgw-deploy install --template-help

bull After deployment initiate HLM configuration by logging in through Gateway appliance

HLM Configuration ndash Cloud Gateway ApplianceThrough ldquoCLI-Installerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 30

HLM Configuration ndash Cloud Gateway ApplianceSample Template File

__version 2130

__comments rdquoDeploy Cloud Gateway Appliance pointing to Embedded node on VC Server

new_vcsa

vc

hostname vcsa01tempcom

username Administratorvspherelocal

password vcpassword

deployment_network VM Network

datacenter [

Onprem-VC-DataCenter

]

datastore Vmfs-Datastore-1

target [

ClusterCGW

esx01tempcom

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 31

Sample Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

appliance

thin_disk_mode true

name Cloud-Gateway-VM-ThruCLI

network

ip_family ipv4

mode dhcp

os

password vmware

time_tools_sync true

ssh_enable false

sso

platform_services_controller psc01tempcom

domain_name vspherelocal

password pscpassword

sso_port 443

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

32copy2019 VMware Inc

VMC SDDC ndashProvisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 33

PowerCLI

vSphere Management SDK

Content Onboarding Assistant

VMC SDDC Provisioning Operations

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 34

vSphere API definition

VMC SDDC Operations ndash VM MigrationRelocation

RelocateVM_Task(relocate)NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

spec VirtualMachineRelocateSpec The specification of where to relocate the virtual machine

priority VirtualMachineMovePriority The task priority

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

datastore ManagedObjectReference The datastore where the virtual machine should be located

deviceChange VirtualDeviceConfigSpec[] An optional list of virtual device specs that allow specifying the new device locations for the relocate operation

folder ManagedObjectReference The folder where the virtual machine should be located

host ManagedObjectReference The target host for the virtual machine

pool ManagedObjectReference resource pool to which this virtual machine should be attached

service ServiceLocator service endpoint of VC where virtual machine should be locatedVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 35

vSphere API definition (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

VirtualMachineMovePriority(vimVirtualMachineMovePriority)

NAME DESCRIPTION

defaultPriority The task of moving this virtual machine is the default priority

highPriority The task of moving this virtual machine is high priority

lowPriority The task of moving this virtual machine is low priority

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 36

vSphere API definition

VMC SDDC Operations ndash VM Clone

CloneVM_Task(clone)

NAME TYPE DESCRIPTION

_this ManagedObjectReference A reference to the VirtualMachine used to make the method call

folder VirtualMachineRelocateSpec The location of the new virtual machine

name xsdstring The name of the new virtual machine

spec VirtualMachineCloneSpec Specifies how to clone the virtual machine The folder specified in the spec takes precedence over the folder parameter

VirtualMachineRelocateSpec(vimvmRelocateSpec)

NAME TYPE DESCRIPTION

location VirtualMachineRelocateSpec RelocateSpec that specifies the location of resources the newly cloned virtual machine will use

config VirtualMachineConfigSpec Use deviceChange in location instead for specifying any virtual device changes for disks and networks

customization CustomizationSpec guest operating system customization specification

template xsdboolean Specifies whether or not the new virtual machine should be marked as a template VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 37

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Establish connection with Onprem VC and VMC VC

$onpremVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

$vmcVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCpassword

Source VM to Migraterelocate

$vm_view = Get-View (Get-VM -Server $onpremVCConn -Name $srcVmName) -Property ConfigHardwareDevice

Target datastore Resource pool in VMC to migrate the VM to

$datastore_view = (Get-Datastore -Server $vmcVCConn -Name $vmcDatastoreName)

$rp_view = (Get-ResourcePool -Server $vmcVCConn -Name $vmcResourcepool)

$resource = $rp_viewExtensionDataMoRef

Destination ESXi host in VMC to migrate the VM to

$vmhost_view = (Get-VMHost -Server $vmcVCConn -Name $vmcDestHostName)

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

RelocateSpec for VM Migration

$spec = New-Object VMwareVimVirtualMachineRelocateSpec

$specdatastore = $datastore_viewId

$spechost = $vmhost_viewId

$specpool = $resourceVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 38

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM MigrationRelocation

Service Locator for the destination VMC VC

$service = New-Object VMwareVimServiceLocator

$credential = New-Object VMwareVimServiceLocatorNamePassword

$credentialusername = $vmcVCusername

$credentialpassword = $vmcVCpassword

$servicecredential = $credential

$servicesslThumbprint = $vmcVCThumbprint

$serviceinstanceUuid = $vmcVCConnInstanceUuid

$serviceurl = https$vmcVCName

$specservice = $service

Assign VM Network in Spec on destination VMC VC

$dev = New-Object VMwareVimVirtualDeviceConfigSpec

$devOperation = edit

$devDevice = $vmNetworkAdapter

$devdeviceBacking = New-Object VMwareVimVirtualEthernetCardDistributedVirtualPortBackingInfo

$devdevicebackingport = New-Object VMwareVimDistributedVirtualSwitchPortConnection

$devdevicebackingportswitchUuid = $vds_uuid

$devdevicebackingportportgroupKey = $dvpg_key

$specDeviceChange += $dev

Trigger MigrationRelocation

$task = $vm_viewRelocateVM_Task($specdefaultPriority)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 39

Through ldquoPowerCLIrdquo

VMC SDDC Operations ndash VM Clone

Establish connection with Onprem VC and VMC VC

Source VM to Migraterelocate

Target datastore Resource pool in VMC to migrate the VM to

Destination ESXi host in VMC to migrate the VM to

Scan through source VMs for all ethernet devices and store in $vmNetworkAdapter

VMC VC VMFolder to Clone the VM to

$folder_view = (Get-Datacenter -Server $vmcVCConn -Name $onpremDatacenter | Get-Folder -Server $vmcVCConn -Name

$vmcFoldername)

CloneSpec for VM Clone

$spec = New-Object VMwareVimVirtualMachineCloneSpec

$specPowerOn = $poweron

$specTemplate = $false

$locationSpec = New-Object VMwareVimVirtualMachineRelocateSpec

$locationSpecdatastore = $datastore_viewId

$locationSpechost = $vmhost_viewId

$locationSpecpool = $resource

$locationSpecFolder = $folder_viewIdVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 40

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations ndash VM Clone

Get Service Locator for the destination VMC VC

$locationSpecservice = $service

Assign VM Network in Spec on destination VMC VC

$locationSpecDeviceChange = $dev

$specLocation = $locationSpec

Trigger Clone task

$task = $vm_viewCloneVM_Task($folder_viewId$destvmname$spec)

Monitor the task

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 41

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM MigrationRelocation

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(vmcVCuser)

slNamePassowrdsetPassword(vmcVCpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(vmcVCthumbprint)

Set Relocatespec

VirtualMachineRelocateSpec relocateSpec = new VirtualMachineRelocateSpec()

relocateSpecsetDatastore(datastoreMor)

relocateSpecsetFolder(vmFoldermor)

relocateSpecsetHost(vmcHostMor)

relocateSpecsetPool(resPoolMor)

relocateSpecsetService(locator)

relocateSpecsetFolder(vmfoldermor)

Systemoutprintln(ldquoStarting VM MigrationRelocationrdquo)

ManagedObjectReference taskMOR = vimPortrelocateVMTask(vmMOR

relocateSpec

VirtualMachineMovePriorityDEFAULT_PRIORITY)VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 42

Through ldquovSphere Management SDKrdquo

VMC SDDC Operations ndash VM Clone

Get Source VM Mor and set the network device change through VirtualDeviceConfigSpec[] Set ServiceLocator for VMC VC

ServiceLocatorNamePassword slNamePassowrd = new ServiceLocatorNamePassword()

slNamePassowrdsetUsername(ruser) slNamePassowrdsetPassword(rpassword)

ServiceLocator locator = new ServiceLocator()

locatorsetCredential(slNamePassowrd)

locatorsetUrl(remoteurl)

locatorsetInstanceUuid(destServiceContentgetAbout()getInstanceUuid())

locatorsetSslThumbprint(rthumbprint)

Set Clone Spec and trigger Clone operation

VirtualMachineCloneSpec vmCloneSpec = new VirtualMachineCloneSpec()

vmCloneSpecsetPowerOn(true)

vmCloneSpecsetTemplate(false)

VirtualMachineRelocateSpec cloneRelocateSpec = new VirtualMachineRelocateSpec()

cloneRelocateSpecsetService(locator)

cloneRelocateSpecsetDatastore(datastoreMor)

cloneRelocateSpecsetFolder(vmFoldermor)

cloneRelocateSpecsetHost(vmcHostMor)

cloneRelocateSpecsetPool(resPoolMor)

vmCloneSpecsetLocation(cloneRelocateSpec)

ManagedObjectReference cloneTaskMor =

vimPortcloneVMTask(vmMor vmFoldermor cloneVmName vmCloneSpec)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 43

Installer

VMC SDDC Operations ndash Content Onboarding Assistant

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 44

Automates transfer of vmtx templates ISO images scripts and other files to your cloud SDDC

Transfer content to your SDDC

VMC SDDC Operations ndash Content Onboarding Assistant

java -jar Content-Onboarding-Assistantjar --cfg ltconfig file pathgt

Options Description

--cfg ltarggt Configuration file path

-s--onpremServer ltarggt hostname of the on-prem management node

-i--onpremInfraServer ltarggt hostname of the on-prem infrastructure node (Optional for embedded

configurations)

-u--onpremUsername ltarggt Username to login to the on-prem management node

-l--location ltarggt Location of the files like iso or scripts on the on-prem datastore Should be

in the format datastore-namefolder

--cloudServer ltarggt hostname of the Cloud management node

--cloudInfraServer ltarggt hostname of the Cloud infrastructure node (Optional for embedded

configurations)

--cloudUsername ltarggt Username to login to the Cloud management node

--cloudFolderName ltarggt Folder name on cloud server where the vmtx templates will be onboarded

--cloudRpName ltarggt Resource pool name in cloud server where the vmtx templates will be

onboarded

--cloudNetworkName ltarggt Network name in cloud server to which the vmtx templates must be

associated The network must be a distributed virtual port group

--sessionUpdate ltarggt Time in milliseconds between session update callsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 45

Transfer OVF files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)1

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

[INFO] No vCenter templates found for on-boarding

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 46

Transfer OVF files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

Datastore Files

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVF-1vmdk

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFmf

nfs0-1 dsvmfsvolumes495dd6b5-7b754689Templates

Folderghegdal-win-vmOVFovf

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Importing hegdal-win-vmOVF-1vmdk to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVF-1vmdk

[INFO] Importing hegdal-win-vmOVFmf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFmf

[INFO] Importing hegdal-win-vmOVFovf to Content Library VMware Cloud on AWS Content Onboarding

[INFO] Done hegdal-win-vmOVFovf

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS[INFO] Syncing existing Cloud library Onboarded Content

[INFO] Process completed [INFO] Library sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

47copy2019 VMware Inc

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 48

HCX Overview

ONPREM

Datacenter

VMware Cloud

on AWSVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 49

Through ldquoapiexplorerrdquo

HCX Migration

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 50

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration request

source

endpointId

20190730131308184-3b93fc5d-xxxxx

endpointName

ldquoxxxxxxxxxxtempcom-enterprise

endpointType rdquoVC

resourceId 997e5894-9a26-4f05-xxxxxx

resourceType VC

resourceName xxxxxxxxxxtempcom

destination

endpointId

20190730120717207-9d1bbab0-xxxxx

endpointName HCX Cloud-Manager

endpointType VC

resourceId 4c30cef7-3538-4cbc-xxxxxx

resourceType VC

resourceName

vcentersddc-xxxxxxvmwarevmccom

POST hybridityapimigrationsaction=create

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 51

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Create

POST hybridityapimigrationsaction=create

placement [

containerId resgroup-47

containerName Compute-ResourcePool

containerType resourcePool

containerId datacenter-3

containerName rdquoSDDC-Datacenter

containerType dataCenter

containerId rdquogroup-v42

containerName rdquoWorkloads

containerType rdquofolder

]

networks

retainMac false

targetNetworks [

srcNetworkName hcxWrkload-pg

srcNetworkType

DistributedVirtualPortgroup

srcNetworkValue dvportgroup-27

destNetworkName

L2E_hcx-wrkload-pg-997e5894

destNetworkType NsxtSegment

destNetworkValue

infratier-1scgwsegments

L2E_hcx-wrkload-pg-997e5894

]

schedule

scheduledFailover false

storage

diskProvisionType rdquothin

rdquodatastoreName rdquoWorkloadDatastore

rdquodatastoreId rdquodatastore-48

decisionRules

removeSnapshots true

removeISOs true

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 52

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Start

migrations [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

input

migrationType vMotion

entityDetails

entityId rdquovm-47

entityType string

entityName rdquoOnpremVM-DB

Sample Migration requestPOST hybridityapimigrationsaction=start

Sample Request

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 53

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration - Query

Sample Migration requestPOST hybridityapimigrationsaction=query

SAMPLE REQUEST

filter

migrationId [

c2f2b110-e837-43ab-a0ff-7a20942ad87d

]

entityId [

vm-47

]

migrationType vMotion

RESPONSE

items [

migrationId c2f2b110-e837-43ab-a0ff-7a20942ad87d

state MIGRATING

progressDetails

state DESTINATION_SIDE_CLEANUP

status Switching over the virtual machine

migrationPriority 5

startTime 1565339055300

progressPercentage 98

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 54

New-HCXMigrationThis cmdlet creates an HCX migration request

Through ldquoPowerCLIrdquo

HCX Migration

NAME TYPE DESCRIPTION

DestinationSite HCXSite Site to which you want to migrate the virtual machine

MigrationType MigrationType Type of migration that you want to performVmotion Bulk Cold VR

NetworkMapping HCXNetworkMapping[] Source and destination networks you want to use

SourceSite HCXSite Site from which you want to migrate the virtual machine

TargetDatastore HCXDatastore Datastore on the destination site

VM HCXVM virtual machine to migrate

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 55

HCX Migration

Test-HCXMigrationThis cmdlet validates an HCX migration request that you can use to start a migration process

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Only mandatory parameters are mentioned here rest of lsquooptionalrsquo parameters are skipped here

Start-HCXMigrationThis cmdlet starts the HCX migrations

NAME TYPE DESCRIPTION

Migration HCXMigration[] Specifies the list of migration requests

Through ldquoPowerCLIrdquo (contdhellip)

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 56

Through ldquoPowerCLIrdquo (contdhellip)

HCX Migration

Connect-HCXServer -Server $serverAddress -User $user -Password $passwd

$SourceSite = Get-HCXSite -Source

$DestSite = Get-HCXSite -Destination

$SrcVM = Get-HCXVM -Name Source-Onprem-VM-1

$DestCompute = Get-HCXContainer -Name Compute-ResourcePool -Site $DestSite

$DestDs = Get-HCXDatastore -Name WorkloadDatastore -Site $DestSite

$SrcNw = Get-HCXNetwork -Name HCX-Stretched-Network -Site $SourceSite

$DestNw = Get-HCXNetwork -Name L2E_HCX-Stretched-Networ-0-d9dd6319 -Site $DestSite

$NwMapping = New-HCXNetworkMapping -SourceNetwork $SrcNw -DestinationNetwork $DestNw

$MigrationReqObj = New-HCXMigration -VM $SrcVM -MigrationType Bulk -SourceSite $SourceSite

-DestinationSite $DestSite -TargetComputeContainer $DestCompute

-TargetDatastore $DestDs -NetworkMapping $NwMapping

Test-HCXMigration -Migration $MigrationReqObj

Start-HCXMigration -Migration $MigrationReqObj -Confirm$false

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 57

To Summarize hellip

HLM configuration ndash Cloud amp Cloud Gateway Appliance

HLM configuration APICLI way ndash

bull apiexplorer DCLI PowerCLI vSphere Automation SDK CLI-Installer

VMC SDDC ndash Provisioning operations ndash

bull PowerCLI vSphere Management SDK Content Onboarding Assistant

HCX Migration

bull apiexplorer PowerCLI

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

VMworld 2019 Content Not for publication or distribution

60copy2019 VMware Inc

BACKUP SLIDES

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 61

How to obtain vmware-api-session-id

ghegdal-a01~ ghegdal$ curl -u cloudadminvmclocalVMware123 -X POST --header Content-Type applicationjson --header Accept

applicationjson --header vmware-use-header-authn vmware --header vmware-api-session-id null httpsvcentersddc-

xxxxxvmcvmwarecomrestcomvmwarecissession -k

value2cdaff7f53671141a24678433d534b8e

ghegdal-a01~ ghegdal$

HLM Configuration - Cloud

POST comvmwarecissession

Response Body

value 2cdaff7f53671141a24678433d534b8erdquo

Parameter Value Description Parameter Type Data Type

vmware-use-header-authn vmware Custom header to protect against CSRF attacks in browser based clients

Header string

Session ID

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 62

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Powershell snippet to help extract the SSL Thumbprint of a remote system

httpscodevmwarecomsamples1121powershell-snippet-to-help-extract-the-ssl-thumbprint-of-a-remote-systemh=SSL20Thumbprintcode

SSL Thumbprint

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcsa01tempcomrestvcenterdeploymentinstallinitial-configremote-

pscthumbprintspecaddress=vcsa01tempcom -k

valueD5C5892B21061683828213AB026C6617EA712190

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 63

How to obtain SSL Thumbprint ndash Onprem PSC

HLM Configuration - Cloud

Embedded Node

rootvcsa01tempcom [ ~ ] openssl x509 -in etcvmware-vpxsslruicrt -fingerprint -sha1 -noout

SHA1 Fingerprint=D5C5892B21061683828213AB026C6617EA712190

rootvcsa01tempcom [ ~ ]

SSL Thumbprint

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 64

Through ldquocurlrdquo

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X POST --header Content-Type applicationjson --header Accept applicationjson --header vmware-api-session-

id 2cdaff7f53671141a24678433d534b8ersquo -d

spec

psc_hostname rdquopsc01tempcom

password rdquopscpassword

port 443

ssl_thumbprint D5C5892B21061683828213AB026C6617EA712190

domain_name vspherelocal

admin_groups [

rdquonewadminstemplocal

]

username administratorvspherelocal

httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo

value 2f240651-9f7e-4d0f-a0a4-4c091f79b1fdrdquo

ghegdal-a01~ ghegdal$

Establish HLM

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 65

Validate HLM Link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecom

resthvclinksrsquo ndashk

value[

link2f240651-9f7e-4d0f-a0a4-4c091f79b1fd

display_namevspherelocalrdquo

]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 66

Delete HLM Link

Validate existence of HLM link

Through ldquocurlrdquo (contdhellip)

HLM Configuration - Cloud

ghegdal-a01~ ghegdal$ curl -X DELETE --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinks2f240651-9f7e-4d0f-a0a4-

4c091f79b1fd -k

ghegdal-a01~ ghegdal$

ghegdal-a01~ ghegdal$ curl -X GET --header Accept applicationjson --header vmware-api-session-id

2cdaff7f53671141a24678433d534b8e httpsvcentersddc-xxxxxvmcvmwarecomresthvclinksrsquo ndashk

value[]

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 67

HLM Configuration ndash Cloud Gateway ApplianceTemplate File

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 68

1

Template File (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 69

HLM Configuration ndash Cloud Gateway applianceCommand execution output

ghegdal-a01mac ghegdal$ vcgw-deploy install VC-CGWTemplatejson --accept-eula

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 70

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 71

Command execution output (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 72

Data Object - OvfCreateImportSpecParams(vimOvfManagerCreateImportSpecParams)ndash Parameters for deploying an OVF

Managed Object - OvfManager(vimOvfManager)ndash Service interface to parse and generate OVF descriptors

OvfCreateImportSpecResult CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

propertyMapping KeyValue[] The assignment of values to the properties found in the descriptor If no value is specified for an option the default value from the descriptor is used

NAME TYPE DESCRIPTION

cisp OvfCreateImportSpecParams Additional parameters to the method bundled in an instance of CreateImportSpecParamsVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 73

Managed Object - ResourcePool(vimResourcePool)

ManagedObjectReference to a HttpNfcLease ImportVApp()

CreateImportSpec()ndash Validate the OVF descriptor against the hardware supported by the host system

Through ldquovSphere Management SDKrdquo (contdhellip)

HLM Configuration ndash Cloud Gateway Appliance

NAME TYPE DESCRIPTION

spec ImportSpec An ImportSpec describing what to import

folder P ManagedObjectReferenceto a Folder

The folder to which the entity will be attached

host ManagedObjectReferenceto a HostSystem

The target host on which the entity will run This must specify a host that is a member of the ComputeResource indirectly specified by the pool For a stand-alone host or a cluster with DRS host can be omitted and the system selects a default

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 74

Code snippet for Stage-1 deployment

HLM Configuration ndash Cloud Gateway Appliance

Set template parametersvalue and create importSpecParameter object

ListltKeyValuegt keyValList = new ArrayListltKeyValuegt()

KeyValue rootPwdKeyVal = new KeyValue()

rootPwdKeyValsetKey(guestinfocisappliancerootpasswd)

rootPwdKeyValsetValue(rdquovmware)

keyValListadd(rootPwdKeyVal)

OvfCreateImportSpecParams ovfCreateImportSpecParams = new OvfCreateImportSpecParams()ovfCreateImportSpecParamssetDiskProvisioning(OvfCreateImportSpecParamsDiskProvisioningTypeTHINvalue())

ovfCreateImportSpecParamssetEntityName(Gateway appliance-VM-API)

ovfCreateImportSpecParamssetPropertyMapping(keyValList)

Read OVF Descriptor file

String ovfDescriptor = getOVFDescriptor(tempVMware-vCenter-Cloud-Gateway-68710000-13878539_OVF10)

Get absolute path of OVF file

String localOvfPath = ovfFiles[0]getAbsolutePath()

Create the import spec

OvfCreateImportSpecResult importResult = createImportSpec(ovfManagerMor

ovfDescriptor resPoolMor dataStoreMor ovfCreateImportSpecParams)

Trigger ImportVApp() API

ManagedObjectReference importLeaseMor = importVApp(resPoolMor

importResultgetImportSpec() vmFolderMor hostMor)

Monitor the task progressstate through HttpNfcLease

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 75

VMC SDDC OperationsThrough ldquoapiexplorerrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 76

Create SDDCPOST orgsorgsddcs

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

NAME TYPE DESCRIPTION

org String Organization Identifier Id

sddcConfig AwsSddcConfig SDDC config specification

rdquodeployment_type

name

num_hosts 0

provider

region

sddc_template_id

sddc_type

skip_creating_vxlan false

sso_domain

storage_capacity 0

vpc_cidr

vxlan_subnet

sddcConfig Spec -

account_link_config

delay_account_link false

account_link_sddc_config [

connected_account_id

customer_subnet_ids [ ]

]

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 77

VMC SDDC OperationsThrough ldquoapiexplorerrdquo (contdhellip)

Example Spec -

deployment_type SingleAZ

name ZC-OnpremTeam-SDDC

num_hosts 1

provider ZEROCLOUD

region US_WEST_2

Response Body

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce)

Task (ea8a01be-9741-4762-8f68-c1bf401db8ce) details hellip

user_id rdquoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

user_name ghegdalvmwarecom

created 2019-07-04T071845000423Z

version 1

id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

updated_by_user_name ghegdalvmwarecom

updated 2019-07-04T071845000423Z

status STARTED

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

resource_type sddc

sub_status STARTED

task_type SDDC-PROVISIONrdquo

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 78

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo

comvmwarevmcorgs Interface Sddcs

TYPE METHOD NAME DESCRIPTION

Task create (javalangString org AwsSddcConfig sddcConfig)

Provision an SDDC in target cloud

Task delete (javalangString org javalangString sddc javalangBoolean retainConfiguration javalangString templateName javalangString force)

Delete SDDC

Sddc get (javalangString orgjavalangString sddc)

Get SDDC

javautilListltSddcgt list (javalangString orgjavalangBoolean includeDeleted)

List all the SDDCs of an organization

Sddc patch (javalangString orgjavalangString sddc SddcPatchRequest sddcPatchRequest)

Patch SDDC

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 79

VMC SDDC OperationsThrough ldquovSphere Automation SDKrdquo (contdhellip)

Instantiates ApiClient using a refresh token which can be used for creating stubs

Builder VMCClientBuilder = VmcClientscustom()

VMCClientBuildersetBaseUrl(httpsvmcvmwarecom)

VMCClientBuildersetAuthorizationUrl(httpsconsolecloudvmwarecomcspgatewayamapiauthapi-tokensauthorize)

String refreshToken =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

VMCClientBuildersetRefreshToken(refreshTokentoCharArray())

ApiClient apiCli = VMCClientBuilderbuild()

Obtain client side stub reference for Sddcs

Sddcs sddcsStub = apiClicreateStub(Sddcsclass)

Construct SDDC Config

AwsSddcConfig sddcConfig = new AwsSddcConfig()

sddcConfigsetName(SDDC-Through-AutomationSDK)

sddcConfigsetRegion(US_WEST_2)

sddcConfigsetNumHosts(2)

sddcConfigsetSddcType(SingleAZ)

String orgId = xxxxxxxxxxxxxxxxxxxx can be automatically obtained through Orgsclass

Trigger SDDC Create task on provided org with config as specified through SDDC Config object

Task createSddcTask = sddcsStubcreate(orgId sddcConfig)

Monitor Task reference object to track the progress

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 80

Through ldquoDCLIrdquo

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]y

sddcs namespace

Available Namespaces

Available Commands

create Provision an SDDC in target cloud

delete Delete SDDC

get Get SDDC

list List all the SDDCs of an organization

patch Patch SDDC

ghegdal-a01dcli ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 81

Through ldquoDCLIrdquo (contdhellip)

VMC SDDC Operations

ghegdal-a01dcli ghegdal$ dcli +vmc com vmware vmc orgs sddcs create --help

Refresh Token

Do you want to save refresh token in the credstore (y or n) [y]n

usage com vmware vmc orgs sddcs create [-h] --org ORG

[--account-link-config-delay-account-link ACCOUNT_LINK_CONFIG_DELAY_ACCOUNT_LINK]

[--account-link-sddc-config ACCOUNT_LINK_SDDC_CONFIG]

[--deployment-type DEPLOYMENT_TYPE]

--name NAME

--num-hosts NUM_HOSTS

--provider PROVIDER

--region REGION

[--sddc-template-id SDDC_TEMPLATE_ID]

[--sddc-type SDDC_TYPE]

[--skip-creating-vxlan SKIP_CREATING_VXLAN]

[--sso-domain SSO_DOMAIN]

[--storage-capacity STORAGE_CAPACITY]

[--vpc-cidr VPC_CIDR]

[--vxlan-subnet VXLAN_SUBNET]

ghegdal-a01dcli ghegdal$ 65

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 82

Through ldquoPowerCLIrdquo

VMC SDDC Operations

PS Usersghegdalgt Get-VmcService comvmwarevmcorgssddcs | Get-Member

TypeName VMwareVimAutomationCisCoreImplV1CisServiceBase

Name MemberType Definition

---- ---------- ----------

create CodeMethod comvmwarevmcmodeltask create(string org

comvmwarevmcmodelaws_sddc_config sddc_config)

delete CodeMethod comvmwarevmcmodeltask delete(string org string sddc boolean

retain_configuration string template_name strihellip

get CodeMethod comvmwarevmcmodelsddc get(string org string sddc)

list CodeMethod Listltcomvmwarevmcmodelsddcgt list(string org boolean include_deleted)

patch CodeMethod comvmwarevmcmodelsddc patch(string org string sddc

comvmwarevmcmodelsddc_patch_request sddc_patch_request)

PS Usersghegdalgt

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 83

Through ldquoPowerCLIrdquo (contdhellip)

VMC SDDC Operations

PS Usersghegdalgt Connect-Vmc -RefreshToken xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Server User

------ ----

vmcvmwarecom ghegdal

PS Usersghegdalgt $sddcSvc = Get-VmcService comvmwarevmcorgssddcs

PS Usersghegdalgt $sddcCreateSpec = $sddcSvcHelpcreatesddc_configCreate()

PS Usersghegdalgt $sddcCreateSpecregion = US_WEST_2

PS Usersghegdalgt $sddcCreateSpecName = SDDC-THROUGH-POWERCLI

PS Usersghegdalgt $sddcCreateSpecnum_hosts = 1

PS Usersghegdalgt $sddcCreateSpecProvider = ZEROCLOUD

PS Usersghegdalgt $orgSvc = Get-VmcService -Name comvmwarevmcorgs

PS Usersghegdalgt $org = $orgSvcList()

PS Usersghegdalgt $newSddc = $sddcSvccreate($orgId $sddcCreateSpec)

PS Usersghegdalgt $newSddc | Select-Object resource_idstatustask_typestart_timetask_id

resource_id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

status STARTED

task_type SDDC-PROVISION

start_time 07072019 231816

task_id

PS UsersghegdalgtVMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 84

Transfer VMTX files

VMC SDDC Operations ndash Content Onboarding Assistant

ghegdal-a01~ ghegdal$ java -jar Content-Onboarding-Assistant-15jar --onpremServer vcsa01tempcom --onpremUsername

administratorvspherelocal --cloudServer vcentersddc-xxxxxvmcvmwarecom --cloudUsername cloudadminvmclocal --

cloudFolderName Templates --cloudRpName Compute-ResourcePool --cloudNetworkName VMsPortGroup --location nfs0-

1TemplatesFolder

Please enter onprem vCenter password

Please enter cloud vCenter password

[INFO] Step 1 Checking the connectivity between the client and onprem vCenter and VMware Cloud on AWS

[INFO] Connectivity tests are done

[INFO] Specify how your templates will be on-boarded to VMware Cloud on AWS by selecting one of the options below

[INFO] 1 Templates will appear as OVF templates in Content Library (FAST option)

[INFO] 2 Templates will appear as VMTX templates in vCenter Server inventory (An intermediate conversion to OVF will be performed)

[INFO] Please pick option one or two (12)2

[INFO] Connecting to onprem vCenter vcsa01tempcom

[INFO] Connecting to Cloud Server vcentersddc-xxxxxvmcvmwarecom

[INFO] Step 2 Scanning vCenter inventory to discover Templates (vmtx)

Index vCenter Template Datastore

1 OnpremVC-DataCentervmTempla nfs0-1

tesFolderhegdal-lin-vmTemplate

[INFO] Please select the templates for on-boarding by indexes (Selection format 12-45)

[INFO] Enter q to quit s to skip template on-boarding press Enter to import all templates 1VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 85

Transfer VMTX files (contdhellip)

VMC SDDC Operations ndash Content Onboarding Assistant

[INFO] Step 3 Scanning specified datastore and folder for files

[INFO] Step 4 Creating a published library in your onprem vCenter

[INFO] Found an existing library for on-boarding VMware Cloud on AWS Content Onboarding

[INFO] Publish URL httpsvcsa01tempcom443clsvcsplibxxxxxxxxxxxxxxxxxxxxxxxxxxxlibjson

[INFO] Step 5 Copy selected vCenter templates

[INFO] Importing hegdal-lin-vmTemplate to Content Library VMware Cloud on AWS Content Onboarding - xxxxxxxxx

[INFO] Done hegdal-lin-vmTemplate

[INFO] Syncing library item hegdal-lin-vmTemplate

[INFO] Process completed

[INFO] Deploying template item hegdal-lin-vmTemplate

[INFO] Onboarding template OnpremVC-DataCentervmTemplatesFolderhegdal-lin-vmTemplate as hegdal-lin-vmTemplate

[INFO] Deleting template hegdal-lin-vmTemplate from Content Library

[INFO] Process completed

[INFO] Step 6 Importing all the content from a specified folder into the library

[INFO] Step 7 Creating a subscribed library in the VMware Cloud on AWS

[INFO] Creating new Cloud library Onboarded Content

[INFO] Process completed

[INFO] Subscribed library created now waiting until the sync is done

ghegdal-a01~ ghegdal$

VMworld 2019 Content Not for publication or distribution

copy2019 VMware Inc 86

Migration REQUEST spec

Through ldquoapiexplorerrdquo (contdhellip)

HCX Migration

migrations [

migrationId string

input

migrationType vMotion

entityDetails

entityId string

entityType string

entityName string

source

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

destination

endpointId string

endpointName string

endpointType string

resourceId string

resourceType VC

resourceName string

placement [

containerId string

containerType dataCenter

]

storage

diskProvisionType thin

datastoreId string

storageProfileId string

networks

retainMac true

targetNetworks [

srcNetworkName string

srcNetworkType string

srcNetworkValue string

destNetworkName string

destNetworkType string

destNetworkValue string

]

decisionRules

removeSnapshots false

removeISOs false

forcePowerOffVm false

upgradeHardware false

upgradeVMTools false

schedule

scheduledFailover true

startTime string

endTime string

]

VMworld 2019 Content Not for publication or distribution