Sunday, June 22, 2014

vCAC 6.x with Linux Catalog Items

Starting fresh to customize some Linux guest VMs with vCAC 6.0.1, I found that there was no simple authoritative source for doing so, at least according to several colleague queries and Googling so my apologies if I missed something obvious.  This also gives me my first chance to make a potentially [unsupported] recommendation.

I am working specifically with RHEL 6.4, CentOS 6.4, and Ubuntu 12.04 so of course using other Linux distros or versions, YMMV.  For each of those specific versions, I created a generic VM and mostly followed the defaults, installing the basic server packages and nothing else.  Feel free to customize your software and repos according to what you want in your baseline.  At the least, make sure you have Perl installed so that you can install VMware Tools and a "Core" or "Minimal" install does not even include Perl.  These were also created using static IPs.

After booting into the guest OS, install VMware Tools and I stick to the defaults here as well for each of the Linux distros and there shouldn't be much if any variance in the install options.  At this point, since we're prepping for vCAC, you most likely will benefit from including the gugent agent on your baseline.  The gugent allows callbacks to an agent service running on the deployed guest for additional configuration and customization.  However, this will vary depending on your Linux distro since some are supported, like CentOS, Redhat, and SuSE, but not Ubuntu.  Check
http://www.vmware.com/pdf/vcloud-automation-center-60-support-matrix.pdf, page 9, for details.

An excellent guide for installing the vCAC linux customization agent, and recommended blog to follow is here:
http://www.vmtocloud.com/how-to-create-a-vcac-6-linux-guest-agent-template/

If you are allowed to use DHCP, then that's pretty much it.  You can stop there and create individual blueprints in vCAC matching to each template.  However, for static IPs this is a little more unintuitive.  For Redhat and CentOS, you can follow these template prep guidelines:
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Evaluation_Guide/Evaluation_Guide-Create_RHEL_Template.html

Just leave out the first step:

# touch /.unconfigured

and follow steps 2-5 unless you want the user to have to work through network configuration dialogs every time a new VM is provisioned.  After deleting the HWADDR entry and if you have multiple eth# devices present, I have seen those sometimes getting reordered after reboot so be cautious if you are multihoming your linux VMs or have multiple private networks.  For step 4, I've been told you can also just delete the file:

rm /etc/udev/rules.d/70-persistent-net.rules

and this file will be automatically recreated after reboot anyway so haven't experienced any issues with that approach either.

Now right-click on the VM and, annoyingly enough, "Convert to Virtual Machine" isn't one of the obvious options.  You'll find it if you go to "All vCenter Actions"->"Convert to Virtual Machine".  Now I created a Linux customization spec with the following options:



Just use the virtual machine name and refer to your vCAC machine prefixes.  Incidentally, did you know that even though vCAC 6.x is stated to be multi-tenant, the prefixes are shared across tenants?
You're using UTC right?

Feel free to set to manual if you want, but the vCAC provisioning should override this to whatever static IP is available from your Network Profile.
Of course, make sure your DNS and Search Path reflect your environment.
Now when you create your blueprint, you can use this custom spec across your templates for CentOS, Redhat and Ubuntu right?




Redhat works, Ubuntu also works (though without a gugent for additional customization), but what about CentOS?  I would get an error deploying the CentOS template similar to the below, which was issued when just cloning direct from the vSphere Web Client:



 OK, so what may be unsupported is the workaround.  By setting the CentOS VM option to Redhat, this allows everything to proceed as normal and vCAC will deploy using the customization specification without griping.






Pretty straightforward once it's all in one place, hopefully:-)

Additional links:
http://www.vmware.com/pdf/vcloud-automation-center-60-support-matrix.pdf
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.0/html/Evaluation_Guide/Evaluation_Guide-Create_RHEL_Template.html
 http://www.vmtocloud.com/how-to-create-a-vcac-6-linux-guest-agent-template/

No comments:

Post a Comment