[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ezjail] p2v script?
On Fri, 13 Jan 2012, Harold Paulson wrote:
Is anyone aware of a physical to virtual (p2v) script for ezjail? It
wouldn't have to be comprehensive so long as copies apps, data and
config without walloping anything.
I assume the intended consollidation happens between servers of identical
architecture and the same OS version?
Note, that systems usually "grow" over time, older libraries in the
base system that your applications are being linked against may not be
there in a basejail installed later, some tools like perl modify files
usually not accessible to jails, you manually have to touch your make.conf
to get ports running or set the perl-soft-link.
All this is doable, i.e. manually providing links in the basejail that
point from libz.so.3 -> libz.so and so. I have no automated tool for that.
Now the nice part: you can use the ezjail-admin restore feature to import
a foreign system into your ezjail world. I have added a small script to
the ezjail-CVS-Repository to aid you in selecting the appropriate parts
from your "physical" server.
Just enter a directory with enough space to hold everything BUT:
bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/libdata
usr/libexec usr/sbin usr/src usr/share usr/lib32 usr/ports dev proc
and run the script. You shold end up with an archive in the form
which is not exactly an appropriate ezjail-archive, because all the
properties are missing (i.e. the hostname, IP address, root directory
etc.) but it contains everything needed to restore it inside an ezjail,
which is mountpoint for the basejail plus softlink for all the shared
On the jail server side you type:
ezjail-admin create -a ./jacki-201201050337.12.tar.gz jacki 127.0.0.1
and the rest should work automatically. You can even install it into
images, but of course you can not use it with flavours.
I have tested the archiving-part, I hope the restore-part still works and
would like to see some feedback.
- p2v script?
- From: Harold Paulson <haroldp AT sierraweb DOT com>