
vShield API Programming Guide
30 VMware, Inc.
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>
Example:
POST /api/1.0/vshield/host-5450 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Pragma: no-cache
Host: 10.112.196.244
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 489
<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 54.
vShieldEndpoint:Tocompleteinstallation,see“vShieldEndpointManagement(old)”onpage 87.
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
Example:
POST /api/1.0/vshield/host-5126 HTTP/1.1
Content-type: application/xml; charset=UTF-8
Authorization: Basic YWRtaW46ZGVmYXVsdA==
Cache-Control: no-cache
Comentarios a estos manuales