Virtually Prepared

…leaving your physical world virtually behind

Browsing Posts tagged vCenter

A recent request came through to assist with the post build procedures of a large ESX and vCenter rollout. One task was to remove the manual effort to create and assign the Roles and Permissions within vCenter.

After sifting through my pile of scripts I took to the web and headed straight for Alan Renouf’s website http://www.virtu-al.net/ . As you would expect there was an example originally instigated from a community discussion, the exact page is here, http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/

I extracted the code but couldn’t actually get it going due a syntax error message which I didn’t understand (I admit I’m a novice at scripting). Not wanting to be beaten I took to the web again and posted within the VMware PowerCLI forum, original post here http://communities.vmware.com/thread/280803?tstart=15 . Another scripting guru leapt to save the day, Luc Dekens (his website http://www.lucd.info/ is packed full of useful information too).

Luc’s explanation (in the forum thread) and minor amendment brought the script to life.

I take no credit for the work here but I find the scripts incredibly useful.

Files can be downloaded here: EXPORT  IMPORT

(Updated) - Menu selection

Here’s an additional import script that displays a list of options to allow for imports in a multi-vCenter mixed environment.

Import Options

Import Options

File can be downloaded here IMPORT2

While troubleshooting this little gem…

ESXi 4.1 vCenter agent reaches 90% then fails

ESXi 4.1 vCenter agent reaches 90% then fails

(The KB article referred to isn’t a fix to this exact issue and I’m still investigating)

…I stumbled upon an interesting entry in the BASH script /opt/vmware/VMware-vxpa-uninstall.sh

vCenter 4.5 reference

This entry can be seen in /opt/vmware/VMware-vxpa-uninstall.sh

vCenter 4.5 eh?

When, where, soon? Oooh.

I decided to rebuild my test lab earlier this week and couldn’t lay my hands on the latest ESX 3.5 Update 3 CD so instead used my ESX3.5 Update 1 disk. I built a couple of hosts, created a VM for vCenter (2.5.4) then proceeded to try and manage the hosts with vCenter. I couldn’t add a host, the error reported “Network copy failed for file”. What the devil is this message referring too?

Google came to the rescue as per this articlehttp://communities.vmware.com/thread/126900. I searched a little more and found this link helpful http://vmware-land.com/Vmware_Tips.html#ESX6 . I copied the files and still no joy. A little more digging and it transpired the vmxnet driver in vCenter 2.5.4 doesn’t communicate correctly with ESX 3.5 Update 1.

Crackers.

I un-installed the VMTools and rebooted. No change and still reported the error message. In the meantime I had downloaded Update 3 so thought I’d be better off doing a fresh install of the hosts after all, it only takes a few minutes. I re-installed the VMTools into the vCenter VM before trashing the ESX hosts.

After the hosts were rebuilt I powered on the vCenter VM and received service error failures so used the Add / Remove programs ‘Modify’ option. This fixed vCenter so I merrily added the hosts. Hold on, where’s the Update Manager plug-in? Oh dear, back to Add / Remove programs for the Update Manager component. Back in to vCenter, hold on where’s the Converter plug-in? Back to Add/ Remove programs…

Lesson learned don’t remove VMTools from a vCenter VM it’s more harmful than you first think.