Linux > Virtualization

How to clone a VPS in Virtuozzo

(1/1)

vinayakk:
Cloning refers to a process of creating an exact copy (or multiple copies) of a Virtuozzo Container on the same Hardware Node. The new Container will have its own private area and root directories but the rest of the configuration parameters will be exactly the same. This means that even the parameters that should be unique for each individual Container (IP addresses, hostname, name) will be copied unchanged. You don’t have an option to specify new values during the cloning operation. Instead, you will have to clone the Container first and then update the configuration of the new Container(s) in a separate procedure.

In Virtuozzo-based systems, you can use the vzmlocal utility to copy a Container within the given Hardware Node.


--- Code: ---# vzmlocal -C 4466:4465

Moving/copying CT#4466 -> CT#4465, [], [] …
Check disk space
Tracker started
Syncing private area ‘/vz/private/4466′->’/vz/private/4465′
done
OfflineManagement CT#4466 …
done
Stopping CT#4466 …

Message from syslogd@vzhost0** at Mar 22 04:17:31 …
ack finished successfully
done
Syncing tracked files from ‘/vz/private/4466/fs’ to ‘/vz/private/4465/fs’
done
Copying/modifying config scripts of CT#4466 …
OfflineManagement CT#4466 …
done
Starting CT#4466 …
vzctl : Hostname of the Container set: server.renjith.com
done
ExecAction CT#4465 …
done
Successfully completed
--- End code ---

Check the cloned VPS list


--- Code: ---#vzlist -a
--- End code ---

You can optionally specify custom private area and root directories for the new Container. To define custom private area and root paths for Container 4465, you can execute the following command:


--- Code: ---# vzmlocal -C 4466:4465:/vz/private/dir_4465/:/vz/root/ct4465
--- End code ---

Additional parameters can be used as per requirement :

-s, –fast-sid : allows to speed up cloning process
-d, –destroy-source : destroys the source container after making a clone
-l, –skiplock : allows to clone the locked containers

 :)

Navigation

[0] Message Index

Go to full version