Editing Creating a Red Hat Template with mach
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
Using the "mach" program you can easily create a minimal template for virtually any Red Hat OS. The following example creates a template for Centos 5.2 i386. | Using the "mach" program you can easily create a minimal template for virtually any Red Hat OS. The following example creates a template for Centos 5.2 i386. | ||
Line 11: | Line 7: | ||
#: mach setup base | #: mach setup base | ||
# Setup any additional packages you want in the chroot | # Setup any additional packages you want in the chroot | ||
− | #: mach yum install yum vim-minimal passwd ssh-clients openssh-server | + | #: mach yum install yum |
+ | edit /etc/mach/conf to use the centos i386 extras template | ||
+ | run mach setup base | ||
+ | mach yum install yum vim-minimal passwd ssh-clients openssh-server | ||
# Run the script below in the chroot directory (/var/lib/mach/roots/template-name) | # Run the script below in the chroot directory (/var/lib/mach/roots/template-name) | ||
# Package the template into /vz/template/cache | # Package the template into /vz/template/cache | ||
Line 18: | Line 17: | ||
# At this point I create a "template" VE and do any other additional configuration inside the running VE, verify that it works, etc. Then I repackage it again. | # At this point I create a "template" VE and do any other additional configuration inside the running VE, verify that it works, etc. Then I repackage it again. | ||
− | + | ''Script to turn mach chroot into vz template:'' | |
Run these commands from /var/lib/mach/root/template. Replace the ROOT_PWD_HASH with your root password hash with your own hash if you want to set the password for the template. (otherwise, you can vzctl enter VEID and change the password). | Run these commands from /var/lib/mach/root/template. Replace the ROOT_PWD_HASH with your root password hash with your own hash if you want to set the password for the template. (otherwise, you can vzctl enter VEID and change the password). |