Managing Containers

XenServer includes the following features to enhance deployments of Docker Containers on XenServer:

  • Support for CoreOS Linux VMs and configuring Cloud Config Drives
  • Container Management for CoreOS, Debian 8, Ubuntu 14.04, and RHEL/CentOS/Oracle Linux 7
  • Container Management for Windows Server Containers on Windows Server 2016

CoreOS is a minimalist Linux distribution which has become popular for hosting Docker™ applications. CoreOS Cloud Config Drive allows the customization of various operating system configuration options. When Container Management is enabled on a VM, XenServer becomes aware of any Docker containers running in the VM.

You should install the Container Management Supplemental Pack available from the XenServer Download page to enable XenServer to:

  • query the VMs to interact with Cloud Config Drives
  • discover the application containers running on each VM and display these within XenCenter’s Infrastructure view

XenCenter enables interaction with the containers and allows users to perform container lifecycle operations, access the container console, view logs, and provides other performance monitoring and diagnostic capabilities. However, you must meet the requirements documented in the Network Requirement section to manage containers using XenCenter.

Network Requirements

For Container Management to work, managed VMs must be reachable from XenServer Control Domain (dom0). Depending on the guest operating system, the networking topology and firewalls must allow outbound SSH (TCP port 22) or Docker TLS (TCP port 2376) connections from dom0 (XenServer Management Interface) to container-managed VMs (the VM network).

Important: For detailed information about container management network requirements and security, refer to Container management.

To manage Docker containers using XenCenter (for CoreOS VMs)

  1. Install or upgrade your host to XenServer 7.0 or higher.
  2. Install the XenCenter build shipped with XenServer 7.0 or higher.
  3. Install the Container Management Supplemental pack.
  4. Create a CoreOS VM and include a config drive for the VM. For more information about config drive, see Cloud-Config Parameters.
  5. Enable container management for the VM. You can update this setting on the VM’s Properties tab. For more information, see Change VM Properties.

If you wish to use Ubuntu 14.04, Debian 8, RHEL/CentOS/Oracle Linux 7, Windows Server 2016 VMs to manage Docker containers, you should first enable container management using the CLI. Once the container management is enabled on these VMs, you can use XenCenter to perform lifecycle operations such as start, stop, pause, and resume the containers.

For information about configuring Ubuntu 14.04, Debian 8, RHEL/CentOS/Oracle Linux 7, Windows Server 2016 VMs for container management, refer to Container management.

To access Docker container console and logs

For Linux VMs, XenCenter enables customers to access the container console and view logs in order to manage and monitor applications running on Docker containers. To access the container console and logs:

  1. Select the container on the Resources pane.
  2. On the Container General Properties section, click View Console to view the container console. To see the console logs, click View Log.

    This opens an SSH client on the machine running XenCenter.

  3. When prompted, log into the SSH client using the VM username and password.

    Note: Customers can automate the authentication process by configuring their public/private SSH keys. See the section Automating the authentication process for details.

Automating the authentication process (optional)

When accessing the container console and logs, customers are required to enter the login credentials of the VM to authenticate SSH connections. However, customers can automate the authentication process to avoid entering the credentials manually. Follow the instructions below to configure the automatic authentication process:

  1. Generate a public/private key pair.
  2. Add the public SSH key to the user directory on the VM running the container.

    For example, for containers running on a CoreOS VM, the public key should be added to the Cloud-Config Parameters section on the VM’s General tab in XenCenter. See Cloud-Config Parameters for details. For Ubuntu 14.04, RHEL/CentOS/Oracle Linux 7, and Debian 8, the public key should be manually added to ~/.ssh/authorized_keys .

  3. Add the private SSH key to the %userprofile% directory on the machine running XenCenter and rename the key as ContainerManagement.ppk .

Managing Containers

In this article