Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Create a Virtual Server

The remote create-virtual-server command enables you to create the named virtual server.

Before You Begin

A virtual server must specify an existing HTTP listener. Because the virtual server cannot specify an HTTP listener that is already being used by another virtual server, create at least one HTTP listener before creating a new virtual server.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Create a virtual server by using the create-virtual-server(1) command.

  3. To apply your changes, restart Enterprise Server.

    1. Stop Enterprise Server.

      For instructions, see To Stop a Domain (or Server).

    2. Start Enterprise Server.

      For instructions, see To Start a Domain (or Server).


Example 8–6 Creating a Virtual Server

The following example command creates a virtual server named sampleServer for hosts pigeon and localhost:


asadmin create-virtual-server --hosts pigeon,localhost sampleServer

Information similar to the following is displayed:


Command create-virtual-server executed successfully.

See Also

To see the full syntax and options of the command, type asadmin create-virutal-server --help at the command line.