![EL 7.2 无法使用 open-vm-tools 9.10 运行自定义](https://linux22.com/image/686867/EL%207.2%20%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%20open-vm-tools%209.10%20%E8%BF%90%E8%A1%8C%E8%87%AA%E5%AE%9A%E4%B9%89.png)
有人成功使用 EL(RHEL 或 CentOS)7.2 客户机运行客户机定制吗?
系统是VMware vCloud Director 5.6.5和VMware ESXi 5.5。
v7.2 附带 open-vm-tools 9.10.2,它应该包含所有必要的 VMware Tools 等效版本。
我尝试将 /etc/redhat-release 设置为 7.0 字符串。我安装了 perl。我没有尝试降级到较旧的 open-vm-tools + vmware-deployPkg,因为我想继续使用 7.2 软件包。
以下是一些输出...
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@localhost ~]# which perl
/usr/bin/perl
[root@localhost ~]# vmware-toolbox-cmd -v
9.10.2.48224 (build-2822639)
[root@localhost ~]# cat /var/log/vmware-imc/toolsDeployPkg.log
## Starting deploy pkg operation
Deploying /tmp/vmware-root/709d2d0c/cust93117962197543457.cab
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/709d2d0c/cust93117962197543457.cab.
Transitioning from state (null) to state INPROGRESS.
ENTER STATE INPROGRESS
Reading cabinet file /tmp/vmware-root/709d2d0c/cust93117962197543457.cab.
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/709d2d0c/cust93117962197543457.cab
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/709d2d0c/cust93117962197543457.cab.
Transitioning from state (null) to state INPROGRESS.
ENTER STATE INPROGRESS
Reading cabinet file /tmp/vmware-root/709d2d0c/cust93117962197543457.cab.
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.
No nics to enable.
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
[root@localhost ~]#
答案1
我进一步查看了图像,发现两个 perl 可执行文件都是 0 kb。我不知道这是怎么发生的,但我愿意将此归咎于几次失败的测试和重启。
供将来参考,以及对于想要完全控制 ISO 软件包的人来说,这应该可以让您开始运行。这还将创建一个工作模板,而无需 Internet (yum) 访问...
# Run minimal install
# Reboot
# Re-insert installation ISO
mkdir -p /media/cdrom
mount /dev/cdrom /media/cdrom
cd /media/cdrom/Packages
# Install perl and all dependencies
rpm -Uvh perl-5.16.3-286.el7.x86_64.rpm perl-Carp-1.26-244.el7.noarch.rpm perl-Encode-2.51-7.el7.x86_64.rpm perl-Exporter-5.68-3.el7.noarch.rpm perl-File-Path-2.09-2.el7.noarch.rpm perl-File-Temp-0.23.01-3.el7.noarch.rpm perl-Filter-1.49-3.el7.x86_64.rpm perl-Getopt-Long-2.40-2.el7.noarch.rpm perl-HTTP-Tiny-0.033-3.el7.noarch.rpm perl-PathTools-3.40-5.el7.x86_64.rpm perl-Pod-Escapes-1.04-286.el7.noarch.rpm perl-Pod-Perldoc-3.20-4.el7.noarch.rpm perl-Pod-Simple-3.28-4.el7.noarch.rpm perl-Pod-Usage-1.63-3.el7.noarch.rpm perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm perl-Socket-2.010-3.el7.x86_64.rpm perl-Storable-2.45-3.el7.x86_64.rpm perl-Text-ParseWords-3.29-4.el7.noarch.rpm perl-Time-HiRes-1.9725-3.el7.x86_64.rpm perl-Time-Local-1.2300-2.el7.noarch.rpm perl-constant-1.27-2.el7.noarch.rpm perl-libs-5.16.3-286.el7.x86_64.rpm perl-macros-5.16.3-286.el7.x86_64.rpm perl-parent-0.225-244.el7.noarch.rpm perl-podlators-2.5.1-3.el7.noarch.rpm perl-threads-1.87-4.el7.x86_64.rpm perl-threads-shared-1.43-6.el7.x86_64.rpm
# Install open-vm-tools and dependencies
rpm -Uvh open-vm-tools-9.10.2-4.el7.x86_64.rpm libdnet-1.12-13.1.el7.x86_64.rpm libicu-50.1.2-15.el7.x86_64.rpm libmspack-0.5-0.4.alpha.el7.x86_64.rpm net-tools-2.0-0.17.20131004git.el7.x86_64.rpm
cd
umount /media/cdrom
# vmtoolsd is enabled, but you can start it to verify that vCloud picks it up
systemctl start vmtoolsd
# stop the VM
# customize via vCloud - I changed hostname and did a simple configuration script
# that echos to a file to make sure things are working
# vApps > Virtual Machines > Power On and Force Recustomization
# log in and verify updated hostname, new file that was echoed, and possibly
# new IP if you were set to DHCP