Sign In with your
Trend Micro Account
Need Help?
Need More Help?

Create a technical support case if you need further support.

Removing VFILE entries from the VMX file using a script

    • Updated:
    • 11 Sep 2015
    • Product/Version:
    • Deep Security 8.0
    • Deep Security 9.0
    • Deep Security 9.5
    • Deep Security 9.6
    • Platform:
    • VMware ESX 4.1
    • VMware ESX 5.0
Summary
When a VFILE entry remains on the VMX file, a virtual machine (VM) may not boot up properly. The VFILE entry can be removed manually but if there is a large number of VMs affected, manual removal will take time.
To implement the task quickly, a script can be created to delete these entries on multiple machines
Details
Public
To create the script:
  1. Login to ESX shell
  2. Create a script file
    Example: vfile.sh
  3. Copy the content below:

    --------
    vmlist=`hostname`.vmlist
    grep -i vmx /etc/vmware/hostd/vmInventory.xml | sed 's///g' | sed 's/<\/vmxCfgPath>//g'
    for i in `cat $vmlist`
    do
    echo " "
    echo Filename:$i
    echo Backing up VMX...
    cp $i $i.bak
    echo Backup complete...
    echo Current Parameter:
    grep -i vfile $i
    echo Updating VMX...
    sed -i '/VFILE/d' $i
    echo Update done...
    echo Does the parameter exist still?:
    grep -i vfile $i
    done
    --------
  4. Execute the scipt
    Example:
    #./vfile.sh
Before running the script, ensure that:
  • There should no space on the VM name
  • The VM has to be powered off
  • VM should be registered on the host
  • Need to run at each host level
Premium
Internal
Rating:
Category:
Configure; Troubleshoot; Deploy; Install; Upgrade
Solution Id:
1095676
Feedback
Did this article help you?

Thank you for your feedback!

To help us improve the quality of this article, please leave your email here so we can clarify further your feedback, if neccessary:
We will not send you spam or share your email address.

*This form is automated system. General questions, technical, sales, and product-related issues submitted through this form will not be answered.

If you need additional help, you may try to contact the support team. Contact Support


To help us improve the quality of this article, please leave your email here so we can clarify further your feedback, if neccessary:
We will not send you spam or share your email address.

*This form is automated system. General questions, technical, sales, and product-related issues submitted through this form will not be answered.


Need More Help?

Create a technical support case if you need further support.