A virtual service listens for traffic to an IP address, processes client requests, and directs valid requests to a member of the load balancer server pool.

A virtual service is a combination of an IP address and a port that uses a single network protocol. The virtual service is advertised to outside networks and is listening for client requests. When a client connects to the virtual service, the load balancer directs the request to a member of the load balancer server pool that you configured.

To secure SSL termination for a virtual service, you can use a certificate from the certificate library. For more information, see Import Certificates to the Certificates Library Using Your VMware Cloud Director Service Provider Admin Portal.

Starting with VMware Cloud Director 10.4, when you create a virtual service, you can provide it either with an IPv4 address, or with an IPv6 address, or with both.

Virtual services can share the same virtual IP address if you configure them to use different ports.

Prerequisites

Procedure

  1. From the primary left navigation panel, select Resources, and from the page top navigation bar, select Cloud Resources.
  2. From the secondary left panel, select Edge Gateways.
  3. Click the NSX edge gateway on which you want to create a virtual service.
  4. Under Load Balancer, click Virtual Services, and then click Add.
  5. Enter a meaningful name and, optionally, a description, for the virtual service.
  6. To activate the virtual service upon creation, toggle on the Enabled option.
  7. To activate client IP address preservation, toggle on the Preserve Client IP option.
  8. Select a service engine group for the virtual service.
  9. Select a load balancer pool for the virtual service.
    If you activated client IP address preservation, you can only select a group pool member.
  10. Enter a virtual IP address for the virtual service.

    If you didn't activate client IP address preservation, you can add either an IPv4 address, an IPv6 address, or both.

    If you activated client IP address preservation, you can enter only an IPv4 address.

  11. Select the virtual service type.
    Option Description
    HTTP The virtual service listens for non-secure layer 7 HTTP requests.

    When you select this service type, it autopopulates the service port text box to 80, which you can replace with another valid port number.

    HTTPS The virtual service listens for secure layer 7 HTTPS requests.

    When you select this service type, it autopopulates the service port text box to port 443, which you can replace with another valid port number. Select an SSL certificate to be used for SSL termination.

    L4 The virtual service listens for layer 4 requests.

    When you select this service type, it autopopulates the service port text box to 80, which you can replace with another valid port number.

    L4 TLS The virtual service listens for secure layer 4 TLS requests.

    When you select this service type, it autopopulates the service port text box to TCP port 443, which you can replace with another valid port number. Select an SSL certificate to be used for SSL termination.

  12. Click Save.