如果我需要从模板部署红帽7,我想采取建议的步骤,使我的“黄金形象”干净。它应该引导到第一引导提示符并引导用户完成典型的步骤。
在红帽5/6,我在提供的文件之后由供应商。但是,我无法找到Red 7的对应项,具体来说,touch /.unconfigured不会触发第一个引导设置。
9.3.1.将用于部署的封装为一个模板摘要在将一个变成一个模板之前对它进行概括(密封)。这样可以防止从模板部署的虚拟机之间的冲突。程序9.6.将Linux虚拟机登录封入到虚拟机。通过将以下命令作为root运行,将系统标记为重新配置:
# touch /.unconfigured# rm -rf /etc/ssh/ssh_host_*HOSTNAME=localhost.localdomain中设置/etc/sysconfig/network# rm -rf /etc/udev/rules.d/70-*/etc/sysconfig/network-scripts/ifcfg-eth*。/var/log中的所有日志,并从/root构建日志。# poweroff编辑:步骤1和步骤7可以通过最后运行sys-unconfig来组合。或者,看看libguestfs-tools-c中的virt-sysprep,它做的更多。
[user@hostname ~]$ virt-sysprep --list-operations
abrt-data * Remove the crash data generated by ABRT
bash-history * Remove the bash history in the guest
blkid-tab * Remove blkid tab in the guest
ca-certificates Remove CA certificates in the guest
crash-data * Remove the crash data generated by kexec-tools
cron-spool * Remove user at-jobs and cron-jobs
delete * Delete specified files or directories
dhcp-client-state * Remove DHCP client leases
dhcp-server-state * Remove DHCP server leases
dovecot-data * Remove Dovecot (mail server) data
firewall-rules Remove the firewall rules
firstboot * Add scripts to run once at next boot
flag-reconfiguration Flag the system for reconfiguration
hostname * Change the hostname of the guest
kerberos-data Remove Kerberos data in the guest
logfiles * Remove many log files from the guest
lvm-uuids * Change LVM2 PV and VG UUIDs
machine-id * Remove the local machine ID
mail-spool * Remove email from the local mail spool directory
net-hostname * Remove HOSTNAME in network interface configuration
net-hwaddr * Remove HWADDR (hard-coded MAC address) configuration
pacct-log * Remove the process accounting log files
package-manager-cache * Remove package manager cache
pam-data * Remove the PAM data in the guest
password * Set root or user password
puppet-data-log * Remove the data and log files of puppet
random-seed * Generate random seed for guest
rhn-systemid * Remove the RHN system ID
rpm-db * Remove host-specific RPM database files
samba-db-log * Remove the database and log files of Samba
script * Run arbitrary scripts against the guest
smolt-uuid * Remove the Smolt hardware UUID
ssh-hostkeys * Remove the SSH host keys in the guest
ssh-userdir * Remove ".ssh" directories in the guest
sssd-db-log * Remove the database and log files of sssd
tmp-files * Remove temporary files
udev-persistent-net * Remove udev persistent net rules
user-account Remove the user accounts in the guest
utmp * Remove the utmp file
yum-uuid * Remove the yum UUID发布于 2014-09-08 02:40:33
我们认为最初的设置实际上有三个部分。前两项是:
这两种方法现在都是通过systemd启用的;一旦完成,它们就会禁用自己。
因此,您需要做的就是删除在第一个初始安装过程中创建的任何本地用户(S),并重新启用这些服务:
systemctl enable initial-setup-graphical.service
systemctl enable firstboot-graphical.service
> /etc/sysconfig/firstboot然后重新启动。
我不完全确定第三部分,它要求您使用您的语言并创建用户帐户或将机器加入到域。这至少会继续下去,直到您真正完成向导。(所以不要那么做。)
清理主机键和任何特定于硬件的配置仍然是个好主意。(Mac地址在udev规则和接口配置文件中。)
https://serverfault.com/questions/626889
复制相似问题