Article ID: 124207, created on Jan 16, 2015, last review on Jun 17, 2016

  • Applies to:
  • Virtuozzo 6.0


In a very large Virtuozzo environments you may want to export templates via NFS to other nodes to avoid multiple cache updates when an EZ template update is being performed.


It works only with ploop-based templates. Verify that you are using ploop:

# grep "VEFSTYPE" /etc/sysconfig/vz


  1. Select one Virtuozzo 6.0 node which should be used to export templates, install NFS components on it

    # yum install rpcbind nfs-utils nfs-utils-lib
  2. Enable NFS-related services

    # chkconfig rpcbind on
    # chkconfig nfslock on
    # chkconfig nfs on
  3. Start services

    # service rpcbind start
    Starting rpcbind:                                          [  OK  ]
    # service nfslock start
    Starting NFS statd:                                        [  OK  ]
    # service nfs start
    Starting NFS services:                                     [  OK  ]
    Starting NFS mountd:                                       [  OK  ]
    Starting NFS daemon:                                       [  OK  ]
    Starting RPC idmapd:                                       [  OK  ]
  4. Export /vz/template directory

    Edit file /etc/exports to export the directory via NFS. Add following record:

    /vz/template <IP>/<SUBNET>(rw,sync,no_subtree_check)

    Note!: Replace <IP> and <SUBNET> with corresponding network settings (e.g. and

  5. Run following command to export the share

    # exportfs -a
  6. Modify permissions to allow NFS clients to write into this directory

    # chown -R nfsnobody:nfsnobody /vz/template

Now you can mount the NFS share on any other Virtuozzo node and cache template on any node. The template caching utility (vzpkg) is NFS-aware and will lock the template during caching operation which would prevent any conflicts.

Additional information

121721 - OS template cache creation fails if /vz is mounted on NFS

Search Words

nfs template share

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF