Проблемы настраивая RHEL7 VM, развернутый из шаблона на VMware

В соответствии с матрицей настройки VMware VM, я проверяю это на 2-м Обновлении vSphere 5.5. Я создаю шаблон с RHEL 7.1 DVD и указываю на анаконду на запущение, которое похоже на это:

#version=RHEL7
# Ref: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html

# System authorization information
auth --enableshadow --passalgo=sha512

# Installation
cdrom
text
poweroff

# Run the Setup Agent on first boot
firstboot --disable
ignoredisk --only-use=sda

# Localization
keyboard --vckeymap=us --xlayouts='us'
lang en_US.UTF-8
timezone America/New_York --isUtc

# Network information
network  --bootproto=static --ip=192.168.3.10 --netmask=255.255.255.0 --gateway=192.168.3.1 --nameserver=192.168.3.1 --hostname=rhel-template.example.com

# Root password
rootpw --iscrypted $6$SNIP

# Storage
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
clearpart --all --initlabel --drives=sda
part /boot --fstype="xfs" --ondisk=sda --size=286
part pv.1378 --fstype="lvmpv" --ondisk=sda --size=16093
volgroup vg_example --pesize=4096 pv.1378
logvol /home  --fstype="xfs" --size=2860 --name=lv_home --vgname=vg_example
logvol /  --fstype="xfs" --size=5600 --name=lv_root --vgname=vg_example
logvol /var  --fstype="xfs" --size=3814 --name=lv_var --vgname=vg_example
logvol swap  --fstype="swap" --size=3814 --name=lv_swap --vgname=vg_example

# VMware OSP
# Ref: http://kb.vmware.com/kb/2075048
repo --name="vmware-osp" --baseurl="http://packages.vmware.com/packages/rhel7/x86_64/"

# Install packages
%packages
@core
open-vm-tools
open-vm-tools-deploypkg
net-tools
%end

%post --log=/root/ks-post.log

# So we could see what is happening
exec < /dev/tty3 > /dev/tty3
chvt 3

#Set some variables
export RHEL_MAJ_VER=$(uname -r | grep -Po '(?<=el).*(?=\.)')
export RHEL_ARCH=$(uname -a | grep "x86_64" > /dev/null && echo 64 || echo 32)

# Install satellite RPM
rpm -i http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm

# Register
subscription-manager register --org="example" --activationkey="rhel${RHEL_MAJ_VER}-${RHEL_ARCH}bit"

# Puppet install
yum update -y
yum install -t -y -e 0 puppet
chkconfig --level 345 puppet on

# Configure puppet
cat > /etc/puppet/puppet.conf <<EOF
[main]
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl
    pluginsync = true

[agent]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    server = satellite.example.com
    report = true
    runinterval = 60
EOF

# RHSM cleanup
subscription-manager unregister
subscription-manager clean

# Truncate logs
>| /var/log/audit/audit.log
>| /var/log/wtmp
>| /var/log/lastlog

# Clean out udev (device naming)
rm -f /etc/udev/rules.d/70*

# Clear out networking
sed -i'' '/^\(HWADDR\|UUID\|IPADDR\|GATEWAY\|NETMASK\|DNS\)/d' /etc/sysconfig/network-scripts/ifcfg-eth* || true
sed -i'' '/^\(HWADDR\|UUID\|IPADDR\|GATEWAY\|NETMASK\|DNS\)/d' /etc/sysconfig/network-scripts/ifcfg-ens* || true

%end

После того, как RHEL7 VM создается, я преобразовываю его в шаблон и развертываю VM, базирующийся от него. Однако ни одна из настройки не берет:

  • Сетевая конфигурация не применяется
  • Изменение имени хоста не применяется

Это что deployPkg журналы похожи:

[root@rhel-template ~]# cat /var/log/vmware-imc/toolsDeployPkg.log
## Starting deploy pkg operation
Deploying /tmp/vmware-root/49b2eefe/imc93D2.tmp
Initializing deployment module.

Cleaning old state file from tmp directory.

EXIT STATE INPROGRESS

Setting deploy error: Error removing lock /tmp/.vmware-deploy.INPROGRESS (No such file or directory)

EXIT STATE Done

Setting deploy error: Error removing lock /tmp/.vmware-deploy.Done (No such file or directory)

EXIT STATE ERRORED

Setting deploy error: Error removing lock /tmp/.vmware-deploy.ERRORED (No such file or directory)

Setting deploy error: Success.

Deploying cabinet file /tmp/vmware-root/49b2eefe/imc93D2.tmp.

Transitioning from state (null) to state INPROGRESS.

ENTER STATE INPROGRESS

Reading cabinet file /tmp/vmware-root/49b2eefe/imc93D2.tmp.

Creating directory /tmp
Creating directory /tmp/.vmware
Creating directory /tmp/.vmware/linux
Creating directory /tmp/.vmware/linux/deploy
Extracting package files.

Launching deployment /usr/bin/perl -I/tmp/.vmware/linux/deploy/scripts /tmp/.vmware/linux/deploy/scripts/Customize.pl /tmp/.vmware/linux/deploy/cust.cfg.

Command to exec : /usr/bin/perl

sizeof ProcessInternal is 56

## Starting deploy pkg operation
Deploying /tmp/vmware-root/49b2eefe/imc93D2.tmp
Initializing deployment module.

Cleaning old state file from tmp directory.

EXIT STATE INPROGRESS

Setting deploy error: Error removing lock /tmp/.vmware-deploy.INPROGRESS (No such file or directory)

EXIT STATE Done

Setting deploy error: Error removing lock /tmp/.vmware-deploy.Done (No such file or directory)

EXIT STATE ERRORED

Setting deploy error: Error removing lock /tmp/.vmware-deploy.ERRORED (No such file or directory)

Setting deploy error: Success.

Deploying cabinet file /tmp/vmware-root/49b2eefe/imc93D2.tmp.

Transitioning from state (null) to state INPROGRESS.

ENTER STATE INPROGRESS

Reading cabinet file /tmp/vmware-root/49b2eefe/imc93D2.tmp.

Creating directory /tmp
Creating directory /tmp/.vmware
Creating directory /tmp/.vmware/linux
Creating directory /tmp/.vmware/linux/deploy
Extracting package files.

Launching deployment /usr/bin/perl -I/tmp/.vmware/linux/deploy/scripts /tmp/.vmware/linux/deploy/scripts/Customize.pl /tmp/.vmware/linux/deploy/cust.cfg.

Command to exec : /usr/bin/perl

sizeof ProcessInternal is 56

Returning, pending output from stdout
Returning, pending output from stderr
Process exited normally after 0 seconds, returned 127
No more output from stdout
No more output from stderr
Customization command output:

Customization process returned with error.

Deployment result = 127

Setting generic error status in vmx.

Transitioning from state INPROGRESS to state ERRORED.

ENTER STATE ERRORED

EXIT STATE INPROGRESS

Setting deploy error: Deployment failed. The forked off process returned error code.

Deployment failed. The forked off process returned error code.

Wait before set enable-nics stats in vmx.

Trying to connect network interfaces, attempt 1
Got VMX response 'queryNicsSupported'
Got VMX response 'disconnected'
Got VMX response 'connected'
The network interfaces are connected on 1 second
Launching cleanup.

Command to exec : /bin/rm

sizeof ProcessInternal is 56

Returning, pending output from stdout
Returning, pending output from stderr
Process exited normally after 0 seconds, returned 0
No more output from stdout
No more output from stderr
Customization command output:

Deploy error: Deployment failed. The forked off process returned error code.

Package deploy failed in DeployPkg_DeployPackageFromFile
## Closing log

Что я пропускаю здесь? Если бы существует что-либо еще, что помогло бы выяснению первопричины, запросите это с помощью комментария.

7
задан 28 May 2015 в 18:52
1 ответ

Avèk èd nan admin VMware nou an, nou te kapab konnen ke script la personnalisation obligatwa pèrl . Sa a pa enstale ak gwoup pake RHEL7 a @core .

Pou rezime, ou bezwen pake RHEL7 sa yo pou fè travay personnalisation:

  • open-vm-tools
  • open-vm- tools-deploypkg
  • net-tools
  • pèrl

Espere ke sa ede lòt moun.

9
ответ дан 2 December 2019 в 23:32

Теги

Похожие вопросы