• No results found

Installing NSX Edge Services Gateway The NSX Edge installation API copies the NSX Edge OVF from the Edge Manager to the specified datastore 

In document NSX API Guide. NSX for vsphere EN (Page 140-142)

and deploys an NSXd Edge on the given datacenter. After the NSX Edge is installed, the virtual machine 

powers on and initializes according to the given network configuration. If an appliance is added, it is deployed 

with the specified configuration.

Installing an NSX Edge instance adds a virtual machine to the vCenter Server inventory, You must specify an 

IP address for the management interface, and you may name the NSX Edge instance.

The configuration you specify when you install an NSX Edge is stored in the database. If an appliance is added, 

the configuration is applied to it and it is deployed.

N

OTE

   Do not use hidden/system resource pool IDs as they are not supported on the UI.

Example 8-1. Install Services Gateway

Request

POST https://<nsxmgr-ip>/api/4.0/edges/

Request Body

<edge>

<datacenterMoid>datacenter-2</datacenterMoid>

<name>org1-edge</name> <!-- optional. Default is vShield-<edgeId>. Used as a vm name on VC appended by "-<haIndex>" --> <description>Description for the edge gateway</description> <!-- optional -->

<tenant>org1</tenant> <!-- optional. Will be used in syslog messages -->

<fqdn>org1edge1</fqdn> <!-- optional. Default is vShield-<edgeId>. Used to set hostanme on the vm. Appended by "-<haIndex>" --> <vseLogLevel>info</vseLogLevel> <!-- optional. Default is info. Other possible values are EMERGENCY, ALERT, CRITICAL,

ERROR, WARNING, NOTICE, DEBUG --> <enableAesni>false</enableAesni> <!-- optional. Default is true --> <enableFips>true</enableFips> <!-- optional. Default is false -->

<appliances> <!-- maximum 2 appliances can be configured. Until one appliance is configured, none of the configured features configured will serve the network -->

<applianceSize>compact</applianceSize> <!-- optional. Default is compact. Other possible values are large|xlarge|quadlarge --> <enableCoreDump>true</enableCoreDump> <!-- optional. default is false. Enabling core-dump will deploy an extra disk for

core-dump files, which will consume 1GB for COMPACT, LARGE, and QUADLARGE, and 8G for XLARGE Edge.--> <appliance> <resourcePoolId>resgroup-53</resourcePoolId> <datastoreId>datastore-29</datastoreId> <hostId>host-28</hostId> <!-- optional --> <vmFolderId>group-v38</vmFolderId> <!-- optional --> <customField> <!-- optional --> <key>system.service.vmware.vsla.main01</key> <value>string</value> </customField> <cpuReservation> <!-- optional --> <limit>2399</limit> <reservation>500</reservation> <shares>500</shares> </cpuReservation> <memoryReservation> <!-- optional --> <limit>5000</limit> <reservation>500</reservation> <shares>20480</shares> </memoryReservation> </appliance> </appliances>

<vnics> <!-- mamimum 10 interfaces index:0-9 can be configured. Until one connected vnic is configured, none of the configured features will serve the network -->

<vnic>

<index>0</index>

<name>internal0</name> <!-- optional. System has default Names. format vNic0 ... vNic7 --> <type>internal</type> <!-- optional. Default is internal. Other possible value is "uplink" -->

<portgroupId>dvportgroup-114</portgroupId> <!-- Possible values here are portgroupIds or virtualWire-id. portgroupId needs to be defined if isConnected=true -->

Chapter 8 NSX Edge Services Gateway Installation, Upgrade, and Management

<addressGroups>

<addressGroup> <!-- Vnic can be configured to have more than one addressGroup/subnets --> <primaryAddress>192.168.3.1</primaryAddress> <!-- This is mandatory for an addressGroup -->

<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc --> <ipAddress>192.168.3.2</ipAddress>

<ipAddress>192.168.3.3</ipAddress> <!-- Optional. This way multiple IP Addresses can be assigned to a vnic/interface --> </secondaryAddresses>

<subnetMask>255.255.255.0</subnetMask> <!-- either subnetMask or subnetPrefixLength should be provided. If both then subnetprefixLength is ignored -->

</addressGroup>

<addressGroup> <!-- Vnic can be configured to have more than one addressGroup/subnets --> <primaryAddress>192.168.4.1</primaryAddress> <!-- This is mandatory for an addressGroup -->

<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc --> <ipAddress>192.168.4.2</ipAddress>

<ipAddress>192.168.4.3</ipAddress> <!-- Optional. This way multiple IP Addresses can be assigned to a vnic/interface --> </secondaryAddresses>

<subnetPrefixLength>24</subnetPrefixLength> </addressGroup>

<addressGroup> <!-- ipv6 addressGroup -->

<primaryAddress>ffff::1</primaryAddress> <!-- This is mandatory for an addressGroup -->

<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc --> <ipAddress>ffff::2</ipAddress>

</secondaryAddresses>

<subnetPrefixLength>64</subnetPrefixLength> <!-- prefixLength valid values 1-128 --> </addressGroup>

</addressGroups>

<macAddress> <!-- optional. When not specified, macAddresses will be managed by VC --> <edgeVmHaIndex>0</edgeVmHaIndex>

<value>00:50:56:01:03:23</value> <!-- optional. User must ensure that macAddresses provided are unique withing the given layer 2 domain. --> </macAddress> <fenceParameter> <!-- optional --> <key>ethernet0.filter1.param1</key> <value>1</value> </fenceParameter>

<mtu>1500</mtu> <!-- optional. Default is 1500 -->

<enableProxyArp>false</enableProxyArp> <!-- optional. Default is false --> <enableSendRedirects>true</enableSendRedirects> <!-- optional. Default is true --> <isConnected>true</isConnected> <!-- optional. Default is false -->

<inShapingPolicy> <!-- optional --> <averageBandwidth>200000000</averageBandwidth> <peakBandwidth>200000000</peakBandwidth> <burstSize>0</burstSize> <enabled>true</enabled> <inherited>false</inherited> </inShapingPolicy> <outShapingPolicy> <!-- optional --> <averageBandwidth>400000000</averageBandwidth> <peakBandwidth>400000000</peakBandwidth> <burstSize>0</burstSize> <enabled>true</enabled> <inherited>false</inherited> </outShapingPolicy> </vnic> </vnics>

<cliSettings> <!-- optional. Default user/pass is admin/default, and remoteAccess is false (i.e. disabled) --> <userName>test</userName> <!-- When you change the userName, you are overwriting the current userName. -->

<password>test123!</password> <!-- The password should be atleast 12 characters long, must be a mix of alphabets, digits and special characters. Must contain at-least 1 uppercase, 1 lowercase, 1 special character and 1 digit. In addition, a character cannot be repeated 3 or more times consectively

.

-->

<remoteAccess>false</remoteAccess> <!-- remote Access specifies whether cli console access over ssh must be enabled. Relevant firewall rules to allow traffic on port 22 must be opened by user/client. Please note: it is advisable to restrict ssh access to Edge cli to only a limited ip addresses - so firewall rules must be opened cautiously. -->

</cliSettings>

<autoConfiguration> <!-- optional -->

<enabled>true</enabled> <!-- Optional. Default:true. If set to false, user should add the nat,firewall,routing config to control plane work for LB, VPN, etc -->

</autoConfiguration>

<dnsClient> <!-- optional. if the primary/secondary are specified and the DNS service not, the primary/secondary will to used as the default of the DNS service. -->

<primaryDns>10.117.0.1</primaryDns> <secondaryDns>10.117.0.2</secondaryDns> <domainName>vmware.com</domainName> <domainName>foo.com</domainName> </dnsClient>

<queryDaemon> <!-- optional. defined for the sake of communication between SLB VM and edge vm for GSLB feature. --> <enabled>true</enabled> <!-- default to false-->

<port>5666</port> <!-- default to 5666 --> </queryDaemon>

</edge>

In document NSX API Guide. NSX for vsphere EN (Page 140-142)

Related documents