OpenVZ Forum


Home » General » Support » Possible to export/import VE?
Re: Possible to export/import VE? [message #41221 is a reply to message #41216] Tue, 14 December 2010 13:01 Go to previous message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

via pm

---8<...
Hi!

I can't send an answer on the post, so I send you a pm, cause it's important for me to have the answer.

You say that it's possible, but how you do it? I have try to tar.gz directly the ve in the /var/lib/vz/private/101 for example, but I didn't work!

Have you an solution?

Thanks a lot!
---8<...

1)
you should "backup" the container via tar (--numeric-owner ... -z), send the copy to anybody to modify this container
as name of this ct tar file: use should use:

linuxdistibution-version-architecture-shortname_of_use.tar.g z

e.g.
debian-6.0-amd64-minimal-prestable.tar.gz

2)
use file 1) as a pre-template, cp file to /var/lib/vz/template/cache

# create new ct and start it
e.g.
% vzctl create <unused_ctid> create --ostemplate debian-6.0-amd64-minimal-prestable

# set some need for your networkin
% vzctl set <unused_ctid>

# enter it
% vzctl enter <unused_ctid>
and modify this ct for any needs

after done stop it, pack it and save this to /var/lib/vz/template/cache and you can use it a ct template

for advanced users, only!
Createing templates without an OpenVZ host:

unpack a template .tar.gz to a new directory and chroot to this "containertree".
For Debian and Derivates:
- move /sbin/start-stop-daemon to /sbin/start-stop-daemon.orig
- create a fake /sbin/start-stop-daemon file
- deploy any packages to your pre-template
- remove fake and move orig file
- leave chroot env
- pack it and use it as a template

Bye,
Thorsten
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: custom actions after "vzctl start"
Next Topic: VZDump across network via SSH?
Goto Forum:
  


Current Time: Wed Jul 17 09:18:01 GMT 2024

Total time taken to generate the page: 0.02850 seconds