Defining a virtual server

Create a persistent definition of a virtual server configuration.

Procedure

Define a virtual server to libvirt using the virsh define command (see define):
# virsh define <domain-configuration-XML-filename>
<domain-configuration-XML-filename>
is the path and file name of the domain configuration-XML file.

Results

libvirt creates a persistent virtual server definition and a libvirt-internal configuration. The name of the virtual server is the unique name specified in the domain configuration-XML file. The virtual server is in the state shut off with reason unknown.

What to do next

To verify your definition, you may:
  1. Browse all defined virtual servers (see Browsing virtual servers) by issuing:
    # virsh list --all
    Virtual servers that are defined but not yet started are listed with state shut off.
  2. Display the current libvirt-internal configuration as described in Displaying the current libvirt-internal configuration.
  3. Start the virtual server as described in Starting a virtual server.
  4. Check your connection to the virtual server via the configured console as described in Connecting to the console of a virtual server.