On Tue, Oct 04, 2016 at 02:36:53PM +0000, MUCHOWSKI, Piotr (EXT - PL) wrote:
Good afternoon Richard,
Just one question about "--scrub" option. Can the "scrub mode" be
enabled globally (not just for single FILE after this option)?
Preferably for all sysprep items where some files are deleted. For
example logfiles rh-subscription-manager rhn-systemid and so on.
No, it doesn't work this way. You have to scrub individual files.
Note this uses the 'scrub(1)' command.
And finally, is any requirement the CentOS/RedHat images must be
processed by virt-sysprep running on CentOS host and not on Ubuntu
(which has different kernel). Because what I observed, these tools
get the host kernel from /boot directory. I didn't found how to
provide arbitrary kernel file or use the kernel built in processed
image.
You can use a different kernel by setting SUPERMIN_* environment
variables:
http://libguestfs.org/supermin.1.html#USING-A-CUSTOM-KERNEL-AND-KERNEL-MO...
http://libguestfs.org/guestfs-faq.1.html#how-can-i-compile-and-install-li...
In theory you could extract the kernel from the disk image using
'virt-get-kernel'. It doesn't currently let you extract the modules
from the same disk image [that would be a nice feature], but you could
do that with a trivial bit of guestfish scripting.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org