Editing Creating a CentOS 5.0 Template
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 15: | Line 15: | ||
#: /sys/* | #: /sys/* | ||
#: /usr/src/* | #: /usr/src/* | ||
− | ## Now, tar the OS file up by typing: '''tar | + | ## Now, tar the OS file up by typing: '''tar –czvf /tmp/centos-5.0-<ARCH>-<DISTRO>-image.tar.gz –X /tmp/exclude /''' where <'''ARCH'''> represents the system architecture ('''i386''' or |
#: '''x86_64''') and <'''DISTRO'''> represents the distribution (default, minimal, etc.). | #: '''x86_64''') and <'''DISTRO'''> represents the distribution (default, minimal, etc.). | ||
## Now transfer the file over to the OpenVZ server into '''/vz/template/cache''' folder. | ## Now transfer the file over to the OpenVZ server into '''/vz/template/cache''' folder. | ||
Line 64: | Line 64: | ||
#: mknod dev/ptmx c 5 2 | #: mknod dev/ptmx c 5 2 | ||
#: mkdir dev/pts | #: mkdir dev/pts | ||
− | #: /sbin/MAKEDEV –d/vz/private/50/dev ttyp ptyp | + | #: /sbin/MAKEDEV –d /vz/private/50/dev ttyp ptyp |
#: mknod dev/null c 1 3 | #: mknod dev/null c 1 3 | ||
#: mknod -m 644 dev/random c 1 8 | #: mknod -m 644 dev/random c 1 8 | ||
Line 75: | Line 75: | ||
#: blacklist net-pf-10 | #: blacklist net-pf-10 | ||
# Disable any physical NICs by modifying the '''etc/sysconfig/network-scripts/ifcfg-ethX''' files (where '''X''' is the interface number starting from '''0''') and setting '''ONBOOT''' to '''no'''. | # Disable any physical NICs by modifying the '''etc/sysconfig/network-scripts/ifcfg-ethX''' files (where '''X''' is the interface number starting from '''0''') and setting '''ONBOOT''' to '''no'''. | ||
− | |||
− | |||
# Now you’re ready to start the template. Type '''vzctl start 50''' and wait for it to start. | # Now you’re ready to start the template. Type '''vzctl start 50''' and wait for it to start. | ||
# You can install additional packages into the container by typing '''vzyum 50 install <package>''' at the prompt where <'''package'''> represents the name of the software package you wish to install. | # You can install additional packages into the container by typing '''vzyum 50 install <package>''' at the prompt where <'''package'''> represents the name of the software package you wish to install. |