CentOS 7 Refusing VMware vSphere Guest OS Customizations

So I just spent two hours of my life trying to get my CentOS 7 VM template to deploy correctly with a vSphere customization specification. No matter what I did it would customize the VM, then uncustomize it, essentially leaving me with the template again. I finally asked our oracle and savior, Google, and two amazing things occurred.

First, I found the answer. About three weeks ago a fellow named Jeff Burns asked this same question on Server Fault, then answered his own question five minutes later (this is often what happens to me immediately upon filing a support case). He built on something I’d seen in /var/log/vmware-imc/toolsDeployPkg.log, where the VMware Tools couldn’t figure out what the OS is and then would abort. In short, you need to make /etc/redhat-release say:

Red Hat Enterprise Linux Server release 7.0 (Maipo)

Indeed, it works, though I’m guessing someone at VMware will fix this and we’ll have to decide which string we stick with. 🙂

Second, as part of his question Jeff linked to my post about Preparing Linux Template VMs. Thank you Jeff! That’s really cool. In fact, I’ve just updated that post with new thoughts on cleaning up those VM templates so they’re as small as possible, based on my ongoing experiences. Go check it out.

9 thoughts on “CentOS 7 Refusing VMware vSphere Guest OS Customizations”

  1. Hi Bob, thanks for the post. Do you feel that it is better to use VMware Tools instead of open-vm-tools (as packaged by the Linux distribution)? I only recently discovered open-vm-tools. It looks fine for me. Any views on it?

  2. That’s awesome, generally when researching something, and finally done someone else asking the question, I run into DenverCoder9 and have to keep searching. (Reference: xkcd.com/979/ )

  3. I didn’t have any luck in customizing a CentOS 7 VM with this setting. What I see in /var/log/vmware-imc/toolsDeployPkg.log is:

    – the customization script tries to read the OS name from /etc/issue
    – then displays a warning “Unknown Red Hat Linux Distribution distribution flavour”
    – fails to properly parse NIC name from the output of “ifconfig -a” and
    – tries to customize properties of a non-present NIC called “ether” instead of “ens…”

    I have tried changing the first line of /etc/issue from “\S” (PRETTY_NAME from /etc/os-release) to “Red Hat Enterprise Linux Server release 7.0 (Maipo)” but the end result was the same (at least the script stopped complaining and “Detected distribution flavour: Red Hat Enterprise Linux”).

    Also, what do you configure as Guest OS in VM configuration? When I select “RHEL 7” or “CentOS 4/5/6”, I get the message that customization of Linux VMs with LVM isn’t supported, so I’m forced to stick with “RHEL 6 (64-bit)” as the guest OS. I’m running vSphere 5.5U1 with latest VMware’s VMware Tools here.

  4. The release file change worked for me. Now I can get deployments from my templates running the standard VMware tools for my template(s) both with and without an encrypted /opt. The “Guest OS” is set to “CentOS 4/5/6/7 (64bit)”. You do need net-tools installed to run the official vmware tools bits.

Comments are closed.