Linux VMtools installation failed.

|
  • 210
  • 7

Issue Description

User feedback that vmtools installation failed and prompts permission denied.
The VM is running on CentOS 7.

Error/Warning Information

First, we got a permission denied on line 42 and line 47.
After solving issue above, we encountered another issue where the script failed at:
cp: can't create '/usr/bin/busybox': Read-only files system.
Install update module failed!

Handling Process

1. Perform sh -x on the install script to learn more.
sh -x install.sh
2. During the installation, the script will transfer files into /var/VMOptimizationTools/ partition and execute scripts from there. We suspect /var partition does not have execute permission.
3.Enter command 'mount | grep noexec' and found that /var is 'noexec' type. It is now confirmed that /var partition does not have execute permission.
4. We need to remount /var as executable.
Command: sudo mount -o remound,exec /var
5. Next, we faced the second issue during execute the install script.
6. Check on /etc/fstab file and we learned that /usr partition is read-only. So we use VI to edit this file and modify /usr as read-write (rw) and reboot the VM.
7. Proceed to install vmtools normally.

Root Cause

This VM has /var partition with noexec option and /usr as read-only.
VMtools installation require to execute script on /var partiton and write files on /usr.

Solution

Remount as noexec and change /usr from read-only to read-write.
Can revert changes after installing vmtools.

Suggestions

1. In this scenario, /var reverts to noexec after rebooting. So we changed /usr to read-write and then after rebooting, remount /var as exec.
Faisal Posted 24 Jun 2021 17:06
  
Thank you very much for the information ...
Faisal Posted 24 Jun 2021 17:07
  
Nice article ...
Faisal Posted 24 Jun 2021 17:07
  
Great info ...
Faisal Posted 24 Jun 2021 17:07
  
Very informative ...
Faisal Posted 24 Jun 2021 17:08
  
Nice guidance ...
Raza Islam Lv3Posted 18 Jul 2022 20:47
  
Thank you very much for the information.
Raza Islam Lv3Posted 25 Jul 2022 16:19
  
Nice guidance.

I want to write a case
Doc ID: 4647
Author: Sangfor_Siva
Updated: 2021-06-10 08:01
Version: