OpenVZ Forum


Home » General » Support » Duplicating working VPS with tar/cp
Duplicating working VPS with tar/cp [message #29627] Sat, 19 April 2008 00:34 Go to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Hello Everyone,

I've had good luck with OpenVZ for my lab environment but I have a question on creating new VEs from existing ones. Specifically, say I have /vz/private/100 that has various levels of customization, etc. I realize that the proper way to do customizations is via modifying the VZ OS template and it's post-install script but that can be very time consuming.

As an experiment, I tared up /vz/private/100 and put it into /vz/private/101 with maintaining all the various permissions, etc. I then modified the various VZ and VPS config files and the new 101 VPS comes up fine.

What are the drawbacks to adding new VEs this way? As I understand it, the hardlinking isn't maintained so is this just a matter of disk use for the VE's files? Is there a way to get my cake and eat it too?
Re: Duplicating working VPS with tar/cp [message #29628 is a reply to message #29627] Sat, 19 April 2008 02:41 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
It may now answer your question directly, but I use vzdump for that,http://download.openvz.org/contrib/utils/vzdump/. Very flexible, works very well.

Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: Duplicating working VPS with tar/cp [message #29638 is a reply to message #29628] Sat, 19 April 2008 14:23 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Vzdump, that's good to know though I'm still curious on the negatives (if any) on this approach. I know that with OpenVZ, 10s let alone 100s of VEs can literally take up little to no disk space due to how it utilizes file system hard links. I assume that the tar/cp/vzdump approach looses this efficiency. Correct? Is there any thing else that I would loose when using vzdump vs. "vzctl create"?

--David
Re: Duplicating working VPS with tar/cp [message #29647 is a reply to message #29638] Sun, 20 April 2008 16:08 Go to previous message
swindmill is currently offline  swindmill
Messages: 57
Registered: April 2007
Member
I think you are confusing virtuozzo's filesystem and openvz's.

OpenVZ doesn't do any optimization of disk space between VEs. Only hard links that exist in a distro for one purpose or another save space, and that is only within a single VE.
Previous Topic: openvz hangs on boot on fujitsu-siemens blade rack unit (solved!)
Next Topic: X inside a VE
Goto Forum:
  


Current Time: Tue May 14 09:25:49 GMT 2024

Total time taken to generate the page: 0.01438 seconds