Previous page

Next page

Locate page in Contents

Print this page

Creating Containers with the New Layout

To start creating Containers with the Container-in-an-image-file layout after upgrade, you need to complete these tasks:

  • Upgrade the /vz partition to use the ext4 file system, if it is formatted with another file system (e.g., with ext3).
  • Cache the OS templates you plan to base your Containers on.

Converting the /vz partition

To upgrade the /vz partition to ext4, complete the following tasks:

  1. Stop the vz and parallels-server services:

    # service vz stop

    # service parallels-server stop

  2. Unmount the /vz partition:

    # umount /vz

  3. Convert the file system:

    # tune2fs -O extents,uninit_bg,dir_index /dev/DEVICE_NAME

    # e2fsck -fDC0 /dev/DEVICE_NAME

    where DEVICE_NAME is the name of the device the /vz partition is mounted on. The latter command will display a message that it has found some errors and needs to fix them. Press Y to agree and continue with the conversion process.

  4. Change the current mount options in /etc/fstab:
    1. Mount the /vz partition on the device it was previously mounted on:

      # mount /dev/DEVICE_NAME /vz

    2. Check the current entry for the /vz partition:

      # grep "/vz" /etc/fstab

      /dev/DEVICE_NAME /vz ext3 defaults,noatime 1 2

    3. Edit the /etc/fstab file by replacing ext3 with ext4.
  5. Start the vz and parallels-server services:

    # service vz start

    # service parallels-server start

Creating a Container with the new layout

In Virtuozzo 6, an OS template is cached automatically when you create the first Container based on this template. Before creating the Container, however, you need to make sure that

  • You have an active Internet connection to access the official repository storing software packages for the OS template the Container will be based on. Or
  • You have configured a local repository for the OS template.

After that, you can use the prlctl create command to create your first Container. For example, you can execute the following command to create a new Container, assign the name of ct101 to it, and base it on the Centos 6 OS template:

# prlctl create ct101 --ostemplate centos-6-x86 --vmtype ct

This command first creates the cache for the centos-6-x86 OS template and then makes the ct101 Container on the basis of the cached template.