Search for:

Available article translations:

How to place containers on partition different from /vz

  • Parallels Operations Automation 5.4
  • Parallels Cloud Server
  • Parallels Virtuozzo Containers for Linux
  • Parallels Server


This article describes ways to change containers private area location in Parallels Virtuozzo Containers for Linux. It might be needed in various cases:

  1. While deploying PVCfL or PSBM the server has only local middle-capacity HDD and later it needs to host containers and VMs on SAN or external storage
  2. A particular container needs to be placed on a separate HDD
  3. Containers have to be moved to a bigger HDD attached to the server

This article presents two different ways to achieve the goal:

  1. Place several particular containers on a separate partition
  2. Move all containers to the other location

Particular container(s)

To move a particular container to a location, different from /vz follow these steps:

  1. Copy container files to the desired location

    [18:22:06][~]# mkdir /vz2
    [18:22:27][~]# mkdir /vz2/private
    [18:22:40][~]# mkdir /vz2/root
    [18:22:43][~]# rsync -au /vz/private/3147 /vz2/private/
    [18:23:18][~]# ls -la /vz2/private/
    total 12
    drwxr-xr-x 3 root root 4096 Feb  6 18:23 .
    drwxr-xr-x 4 root root 4096 Feb  6 18:22 ..
    drwxr-xr-x 7 root root 4096 Feb  6 17:02 3147
  2. Make sure that ve.conf points to correct private and root area location

    [18:24:19][~]# cd /etc/vz/conf/
    [18:24:21][/etc/vz/conf]# rm 3147.conf
    [18:24:31][/etc/vz/conf]# ln -s /vz2/private/3147/ve.conf 3147.conf
    [18:25:28][/etc/vz/conf]# vim /vz2/private/3147/ve.conf
    [18:27:11][/etc/vz/conf]# grep -E "ROOT|PRIVATE" /vz2/private/3147/ve.conf
  3. Verify the container can be started

    [18:28:02][/etc/vz/conf]# vzctl start 3147
    Starting the Container ...
    Container is unmounted
    Container is mounted
    Setting permissions 20002 dev 0x7d00
    Adding offline management to Container(1): 8443 4643
    Adding IP addresses:
    Starting the Container ...

All containers

To move all containers to a different HDD follow these steps:

  1. Stop service vz to ensure the copied data consistency

    [root@pvclin40 ~]# service vz stop
    Shutting down Container 1
    Turn off offline management for Container 123:             [  OK  ]
    Turn off offline management for Container 123456:          [  OK  ]
    Stopping Virtuozzo:                                        [  OK  ]
    [root@pvclin40 ~]#
  2. Copy all the data from /vz partition to the new storage

    [root@pvclin40 ~]# mkdir /vz2
    [root@pvclin40 ~]# mount /dev/sdb3 /vz2
    [root@pvclin40 ~]# rsync -auv /vz/ /vz2
    building file list ... done
    wrote 3282238799 bytes  read 1596884 bytes  11876440.08 bytes/sec
    total size is 3275211083  speedup is 1.00
  3. Remount the storage as /vz

    [root@pvclin40 ~]# umount /vz
    [root@pvclin40 ~]# umount /vz2
    [root@pvclin40 ~]# mount /dev/sdb3 /vz
  4. Start service vz

    [root@pvclin40 ~]# service vz start
    Starting Virtuozzo:                                        [  OK  ]
    Loading Virtuozzo license:                                 [  OK  ]
    Set vzprivrange:                                           [  OK  ]
    Configuring Virtuozzo accounting:                          [  OK  ]
    Starting Container: 1 123 123456
    Container 1 started:                                       [  OK  ]
    Container 123 started:                                     [  OK  ]
    Container 123456 started:                                  [  OK  ]
    Setup offline management for Container 123:                [  OK  ]
    Setup offline management for Container 123456:             [  OK  ]

Search words:

private area

move vz

move private

move /vz

ca05eaf5b843fbd53589c90d7228a6df 909d99074e442b52ce54cc7b31cf065d 2897d76d56d2010f4e3a28f864d69223 64cafed7cc15bceb3b240d8c2f92dce3 caea8340e2d186a540518d08602aa065 eb0ea3b827d18de2329b6477e24c1d59 bf1c3a170005eae151f49ba2720abde9 32767b020da91159b5a6d6a3ddea0d2b c65eaff5333f2b87eda32041b8ac987f

Was this article helpful?
Tell us how we may improve it.
Yes No
Desktop Virtualization
- Parallels Desktop 8 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification