
vShield API Programming Guide
36 VMware, Inc.
YoumustspecifythehostIDofthetargetESXhosttoinstallallservices.
See“ESXHostPreparationandUninstallationSchema”onpage 108.
Example 3-1. Install a vShield App and vShield Endpoint on an ESX host
Request
POST https://<vsm-ip>/api/1.0/vshield/<host-id>
RequestBody
<VshieldConfiguration>
<VszInstallParams>
<DatastoreId>datastore-5035</DatastoreId>
<ManagementPortSwitchId>network-4485</ManagementPortSwitchId>
<MgmtInterface>
<IpAddress>10.112.196.245</IpAddress>
<NetworkMask>255.255.252.0</NetworkMask>
<DefaultGw>10.112.199.253</DefaultGw>
</MgmtInterface>
</VszInstallParams>
<EpsecInstallParams>true</EpsecInstallParams>
<InstallAction>install</InstallAction>
</VshieldConfiguration>
ESXhostpreparationrequiresthefollowingelements:
DatastoreId:VCMOIDofthedatastoreonwhichthevShieldAppservicevirtualmachinefileswillbe
stored.
ManagementPortSwitchId:VCMOIDoftheportgroupthatwillhostthemanagementportofthe
vShieldApp.
MgmtInterface
IpAddress:IPaddresstobeassignedtothemanagementportofthevShieldApp.ThisIPaddress
mustbeabletocommunicatewiththevShieldManager.
NetworkMask:SubnetmaskassociatedwiththeIPaddressassignedtothemanagementinterfaceof
thevShieldApp.
DefaultGw:IPaddressofthedefaultgateway.
Afterinstallationofallcomponentsiscomplete,dothefollowing:
vShieldApp:Atthispoint,vShieldAppinstallationiscomplete.EachvShieldAppinheritsglobal
firewallrulessetinthevShieldManager.Thedefaultfirewallrulesetallowsalltraffictopass.Youmust
configureblockingrulestoexplicitlyblocktraffic.ToconfigureAppFirewallrules,see“Configuring
FirewallRules
forvCenter”onpage 60.
vShieldEndpoint:Tocompleteinstallation,see“vShieldEndpointManagement”onpage 81.
YoucaninstallasingleservicebyidentifyingonlythatserviceinthePOSTbody.InExample 3‐2,onlyvShield
Appisinstalled,asidentifiedbyinclusionoftheVszInstallParamselementonly.
Example 3-2. Install a vShield App only
Request:
POST https://<vsm-ip>/api/1.0/vshield/<host-id>/vsz
RequestBody:
CAUTIONDonotinstallvShieldApp(orvShieldZones)ontheESXhostwherevCenterServerisrunning,
otherwisevShieldAppcouldinterferewithvSpheremanagementtraffic.
Commentaires sur ces manuels