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.
Comments on this entry are closed.
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?
I have a post for today on this very topic. The Open VM Tools don’t support guest customization (a major, major failing), so if you need to have a working VM as a the result of a deployment process then I’d stay with the legacy VMware Tools.
Because the legacy Tools are so difficult to manage updates for (auto-updating just doesn’t work right) I’m going to explore deploying with the legacy Tools then auto-installing open-vm-tools afterwards.
To bring some light onto this: you don’t need to have the legacy tools installed, just the open-vm-tools-deploypkg package.
You can read a bit more about this over at http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2075048.
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/ )
I’m just laughing — I *HATE* that! :) I was figuring this was one of those cases, CentOS/RHEL 7 being fairly new. I owe that Jeff Burns guy a beer.
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.
You need net-tools installed as well. That might be part of the issue.
I set the Guest OS type to RHEL 7. I can customize just fine with LVM…
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.