Tag Archives: ESXi

vSphere Syslog Collector – Install and Configure

I've always used vi-logger from within the vSphere Management Assistant to deal with my syslogging of our ESXi servers, that is until our last upgrade to vSphere 5.  The vi-logger command is no more within the 5.0 version of the VMA so I began looking from some alternate solutions.  Now I could of went out and used a Kiwi product or Splunk or configured a Linux box to do our syslogging, however I thought i would give the vSphere Syslog Collector that is bundled with the vCenter installation media a shot.  Honestly I don't find syslog to be a real science.  You centralize the log files, not a big deal, but having a solution all from one vendor is kind of nice.  The vSphere Syslog Collector does exactly what it says; it collects the log files from the ESXi hosts, but it also gives you some status information from within a vCenter plugin as well.  As well, it's a pretty easy install and config as you will see below.

First off mount the ISO of the vCenter installer on the server you would like to act as your collector and select 'VMware Syslog Collector' and click 'Install'.  During the install (and in VMware's documentation) it is called the vSphere Syslog Collector, however on the menu it's called the VMware Syslog Collector.  Let's just say VSC for short to cover off both names…

After accepting the EULA and licensing you should be presented with the Destinations screen.  Here we need to do a couple of things; First, select where you want the collector application to be installed and secondly, where the logs that are collected are going to be stored (Repository directory).  Also, we have the option here to chose how large we want the log files to grow as well as the number of rotations to keep.  I left all of these values at their defaults, except for the repository directory as I wanted to place this on some lower level, cheaper storage.

Next we need to chose a setup type.  I chose to go with VMware vCenter Server installation as I wanted to integrate this with my vCenter instance. Otherwise, you can chose the 'Standalone Installation' option.  

After selecting your setup type, if choosing to integrate with vCenter you will need to provide login credentials to your vCenter Server.  For the most part this should be pretty straightforward.

Next up is ports and protocols.  Again, I left all of these at default, however you may wish to change the ports that the syslog collector operate on.

Then it's just matter of specifying how it should be defined on the network and letting it install…

So that's it, the collector is now installed.  One more step, we need to tell the desired hosts where we want to ship their logs to.  This can be done in a few different ways, all accomplishing the same thing, but, to each his own, here are the methods that I'm aware of.

1. The GUI – for the non command line type people.

Select your desired host which you want to syslog.  Go to Configuration->Advanced Settings (under Software)->Syslog->Global.  From here it is as simple as setting the hostname or IP address of your syslog server in the syslog.Global.LogHost option.

***Updated April 2012***

Also, be sure to open up the syslog ports within the firewall built into ESXi itself.  Go to Configuration->Security Profile and click 'Properties' in the Firewall section.  It can be as simple as just checking the box next to syslog, however if you would like to further secure your environment you can click the 'Firewall' button at the bottom and specify which IP address/networks are allowed to connect through these ports.

 

2. The ESXi Command Line space

Using the following two commands you can do the exact same thing as explained in #1.

esxcli system syslog config set –loghost=vCenter01
esxcli system syslog reload
 
Updated – And the firewall commands to open up the correct ports and restrict access to your syslog server.
 
esxcli network firewall ruleset set –ruleset-id=syslog –enabled=true –allowed-all=false
esxcli network firewall ruleset allowedip add –ruleset-id syslog –ip-address 192.168.42.150
 

3. Host Profiles 

For those with larger installations, you can certainly set the syslog information in a host profile and remediate that against your hosts.  Those setting are located within the profile under the 'Advanced Configuration Option and the same 'Syslog.Global.logHost' option.  *** NOTE*** Until you actually create a host profile from a host that has already had this advanced option setup you will not see this option'.

Updated 

As well, don't forget to set the firewall options for your syslog server in the host profile under the Firewall Configuration -> Ruleset Configuration ->syslog – Ruleset section.

4. PowerCLI

Things begin to get a little fuzzy here.  If you try to run the get and set VMHostSyslogServer cmdlets on ESXi 5 you will receive an error stating that the host isn't supported for those cmdlets, however, they still work, they still setup the syslog server.  The proper way to do this through powershell is using the get and set VMHostAdvancedConfiguration cmdlets examples below.  And once again, I found even this to be a bit quirky in the sense that I couldn't get the set-VMHostAdvancedConfiguration to just accept a -Name and -Value for the setup, but had to use the -NameValue pairing instead.  Also I'm sure someone that knows powershell (not me πŸ™‚ ) can rock this out on one line, but for now, this is what I got.

$sysloginfo = get-VMHostAdvancedConfiguration -Name "syslog.Global.logHost" -VMhost "IP of host that is already setup"
Set-VMHostAdvancedConfiguration -VMHost "IP of host you want to setup" -NameValue $sysloginfo

Updated

As for enabling the syslog in the firewall that can be achieved with the following command

Get-VMHostFirewallException -VMhost hostname -name syslog | Set-VMHostFirewallException -Enabled $true

But when it comes to setting the allowed IP I cannot for the life of me find a way to do this…I'll update later if I do, or if you do, please let me know in the comments. πŸ™‚

So there you have it!  A fully functional instance of the vSphere Syslog Collector.  As always comments, questions, concerns, rants – put'em in the comments πŸ™‚

Skewed Usage Reports in VCops 5 – No problem!

A couple of years ago I downloaded and installed a trial of CapacityIQ.  It wasn't necessarily the capacity planning for the future capabilities that I was looking for, but more for the under/over sized VM reporting that it included.  Honestly, I didn't get a lot of time to evaluate it and all I really did was run a few reports and determine that we were heavily oversizing our VMs.  Although I found it useful, I couldn't justify a recommendation to gain budget for just the functionality that CapacityIQ provided.

Fast forward to last year.  I now find myself participating in a beta for VCops 1.0. I was extremely excited about this product the first time I seen it at our local Toronto VMUG.  Ever since then I've been using VCops on almost a daily basis to monitor and keep track of events and changes within our environment.  

And now here we are today with the recent release of VCops 5.  This release, now including CapacityIQ reporting and metrics has taken me back in time to those days I was evaluating CapacityIQ by itself.  And so I find myself once again looking at those under/over sized VM reports (with a little more time and focus this time around) and kind of scratching my head a bit.  A lot of the recommendations it was making around over provisioning vCPU's were correct, however I do have some VMs containing 2 vCPU's that it was recommending to drop to 1.  Now I know these VMs need 2 vCPU's as we have ran them with a single vCPU before and the performance just wasn't there.  So why is it recommending 2?  Well, by default VCops collects usage data of the VMs 7 days a week, 24 hours a day, so when you think about, in this case, these VMs basically do nothing at all during the night and on weekends, but still, there usage data for those off times was being used in the overall calculations, thus, bringing the total average down.  Thankfully there is an option to change this, follow the steps below to do so…

Log into VCops and click the 'Configuration' link in the top right hand side of the screen.  From there you will be presented with all the configurable options for VCops.  Under Planning & Reports click the 'Usage Calculation' link.  By default 'All hours on all days' will be selected, meaning VMs usage data is being used 24/7.  To change this, simply select 'Specific Hours and Days' (as shown below) and select  your desired days and hours…easy!.

 

 

There you have it!  Your VMs usage outside of the hours and days that you define here will now be excluded in your report calculations.  Keep in mind that this is a global setting and will apply to all VMs.  There isn't a way to do this on a per-VM basis that I can find, but would probably be beneficial in some cases.  These settings are not only useful when trying to exclude idle time, but you can also use them to exclude times when they might be busier than normal (A backup or maintenance window)  As always, any comments, questions, concerns, suggestions are more than welcome in the comment box below.

Installing offline bundles in ESXi 5

So I ran into a situation where I needed to get the HP CIM providers onto ESXi 5 in order to gain more visibility into the hardware that was running my ESXi 5 install.  This is a relatively easy task but I thought I would throw the process I used up here anyways in the case that it might help others.  This should apply to other vendors who package their CIM providers as well however for this case I will use the HP Offline Bundle for ESXi as an example.

First off, there are a couple of different ways you can do this.  Using the vSphere CLI or utilizing vSphere Update Manager.  I initially used the CLI method as I only had one host to do, but for these purposes I will explain both ways.  The Update Manager process will most certainly  help if you need to deploy these packages to more than one host.  Either way, you end up with the same results.

So to start obtain the HP ESXi Offline Bundle from HP's website.  Simply find your model of server and it should be listed in the Drivers and Software section under VMware vSphere 5.

Using the CLI

First off you will need to copy the bundle from HP locally onto the ESXi server.  There are a few ways to do this.  You can utilize a program such as WinSCP to connect and transfer the file (you will need to enable SSH on the host) or you could simply upload this to a datastore that the host has access to using the Datastore Browser.  Either or, just get it on the host.

Once it's on the host it's a matter of using Putty to ssh into your host or connecting directly to the DCUI and launching the ESXi Shell and running the following command…

esxcli software vib install -d path_to_bundle.zip

If you are using a remote CLI installation then you need to add a few options to provide the server and credentials as follows

esxcli -s SERVERNAME -u root -p Password software vib install -d path_to_bundle.zip

Once this command executes it should delve into the zip file and install the packages that are applicable to your host.  Once completed you will need to reboot your host.

Using VMware vSphere Update Manager

Using Update Manager takes a little longer to setup but will save you time in the long run if you need to apply a package or patch on a large scale.  The process to getting the bundles on your hosts is two-fold.  First we need to update the patch and create a baseline and then simply attach that baseline, scan, and remediate our host just as we always have for the standard ESXi patches.

So first off we need to be in the Administration View of Update Manager.  This can be accessed by either clicking the 'Update manager' icon under the Solutions and Appliances section of the Home screen or by selecting 'Admin View' while on the Update Manager tab.  Once in Admin View we have a couple of tasks to perform; we need to upload our new patch and then create a baseline containing it.

Navigate to the Patch Repository tab and click 'Import Patches' in the top right corner.  The remainder of this process is quite simple.  Browse to the zip file containing the patches and upload the file.  Once uploaded you should see your patch in the list (it will be bolded).

Now we need to navigate to the Baselines and Groups tab to create our baseline.  Right-click in some white space on the Baselines and Groups tab and select 'New Baseline'.  Give your baseline a name and a description and select 'Host Patch' as the Baseline Type.  On the next screen we are going to want to select 'Fixed' as our Patch Option as this baseline is only going to contain one patch and it is never going to change.  Now we should be on the step where we need to select our patches to add to the baseline.  Find your newly uploaded patch and click the down arrow to add it to the baseline.  Once completed click 'Finish'.

So now that we have a baseline created containing our patch that we want installed, the process of getting it on to the hosts should be quite familiar if you are using Update Manager in your environment.  Simply attach your new baseline to the host, Scan it, and Remediate.

Scott Lowe’s Mastering VMware vSphere 5 – A Review

Throughout the holidays I had a little downtime and what better way to fill it but with some new learning.  I've had a copy of Scott Lowe's Mastering VMware vSphere 5 laying around for a few weeks and with my intents to start ramping up my VCP 5 studies I thought I would would dive right into it.

Now, I've never had the opportunity to read Scotts precursor 'Mastering VMware vSphere 4' bur from the reviews that I have read it was a smashing success.  I can honestly say that Mastering VMware vSphere 5 is the same.  A whopping 768 pages covers everything vSphere 5 has to offer and is laid out in such a fashion that it is understandable to the newbie to virtualization, yet still dives technically into subjects to provide that level of interest to an expert.  By that I mean Scott not only covers off the basics of virtualization, the basics of vSphere technology and the initial setup of common components, but he takes you deeper into the products by explaining many advanced features and how to configure them (using not only the vSphere Client but the vMA command line as well).  To top it off he does this in a fashion that is understandable and applicable to me as a vSphere Admin (If you have ever seen any of Scotts' presentations you will know what I mean).

Mastering VMware vSphere 5 covers everything you need to know to install, configure and manage a solid vSphere 5 environment covering off every aspect of the journey.  The chapter layout says it all…

  • Introducing VMware vSphere 5
  • Securing VMware vSphere
  • Planning and Installing VMware ESXi
  • Creating and Managing Virtual Machines
  • Installing and Configuring vCenter Server
  • Using Templates and vApps
  • Installing and Configuring vSphere Update Manager
  • Managing Resource Allocation
  • Creating and Configuring Virtual Networks
  • Balancing Resource Utilization
  • Creating and Configuring Storage Devices
  • Monitoring VMware vSphere Performance
  • Ensuring High Availability and Business Continuity
  • Automating VMware vSphere

For anyone looking to achieve VCP 5 status (like myself), each and every chapter contains a section at the end titled 'The Bottom Line'.  The Bottom Line contains key takeaways from the chapter and then asks you questions under a Master It heading.  To me this is a huge selling point of this book as it triggers you to think back on what you have just read, answer questions, and apply it to certain scenarios that you are presented with.  A great way to help you retain and apply knowledge!

Honestly I sat and read this book from cover to cover which I rarely do with technical books.  But that's not to say that it isn't referencable in any way.  In the few short days I've had it on my desk at work it is already peppered with post-it notes, bookmarks, and torn pieces of paper with chicken scratch and design ideas scribbled all over. This book provided me with a great resource to help with the install/upgrade and management of my vSphere environment and an excellent piece of study material to help complement all of the documentation on the VCP 5 exam blueprint, and a great technical overview of some of the functions of vSphere that I haven't had the chance to explore myself.  So, if you are looking for any or all of those things I would most certainly recommend picking up a copy of Scott Lowe's Mastering VMware vSphere 5.  The book is available directly from the publisher both in e-pub format as well as paperback.  You can also find it on iTunes, Barne's and Noble, and Amazon.  Also Scott has a fantastic blog where you can read more of his words, and don't forget to follow him on Twitter.

Veeam v6 Distributed Architecture – Proxies, Repositories and Bears! OH MY!

With the release of Veeam Backup and Replication v6 came a completely redesigned distributed architecture.  This architecture, coupled with many other enhancements to v6 (listed here) work together to help you achieve faster transfer speeds, more concurrent jobs, and removes the load off of your Veeam Backup server.

I decided to run a few tests just to see if in fact they are faster!  Now I only replicated local, as well, I only ran one concurrent job, and I only included one VM so make note that I'm not using this technology to its' full potential, but none the less, I did still see an improvement.

So I fired up an 80 GB VM and first ran replication the way I would normally have in v5.  That is replicated directly to an ESXi host.  

So as you can see it took roughly 59 minutes to complete the first full replication of the VM.  Also it specifies the bottleneck as being my target, in this case, the host that I'm replicating to.  So, I created a Windows 2008 VM on the target ESXi host and added that VM to Veeam as a Backup Proxy.  I created a new replication job targeting the same VM, duplicated all of the settings from the first job but this time specifying my newly created VM as the Target Proxy.  Re-ran the job with the following results…

and voila.  This time my full replication only took roughly 45 minutes!  I know you may be thinking that's only 14 minutes faster, but it's also just 1 VM.  Take that 14 minutes and multiply it by 50 VMs or 100 VMs and you end up with a nice little time saver!  As well, you can see now that my target is no longer by bottleneck.  This inspired me to go one step further.  I created another VM and set this one up as a Backup Proxy as well.  Again, duplicated the job, this time setting my new proxy as the Source Proxy and leaving the Target Proxy as the one I created in the last step.  Once again I did a full replication of the VM…

OK!  Now we're talkin!  Coming in now at just under 26 minutes we have shaved off 33 minutes and cut our replication time more than half!   This to me is a huge advantage, especially if you are doing any sort of replication across a WAN.  Again, these are just my tests so you may not get the same results.  But for the most part this is what I have been seeing with my replication jobs in v6 so far.  So if you aren't using any of the new distributed architecture components included in Veeam v6 I would probably read up on them and get them into your environment.  Veeam has done a great job with this release and this is just one of many new features and enhancements that they have included.  On another side note, subsequent incremental replication jobs on this VM are taking a whopping 4 minutes and processing at a rate of 300 MB/s or so.  WOW!

Again as always, any comments or question or corrections don't hesitate to post in the areas below…

How to get rid of your View Composer Linked Clone Replica VM (Without VMware View)

As I've been Storage vMotioning all of my VMs off of my datastores in order to upgrade them to VMFS 5 I cam across a situation where there was one VM that I just couldn't move.  I couldn't remove it from inventory, I couldn't delete it from disk, in fact, I couldn't even see it when I was in 'VMs and Templates' view.  It was almost as if the VM was marked as read only and after a little digging I realized that was exactly the case.

The VM created was actually a replica or clone of a parent virtual machine used for a small VMware View proof of concept that we carried out a a few months ago.  What happens during the provisioning process of a linked clone pool of desktops in VMware View is that a complete copy of the Parent VM and its' associated snapshots are copied into a protected VM.  The proteced VM is then used to scale environments and save disk space.  It was this protected VM was item that I needed to remove or delete in order to format my datastore as VMFS 5.  Obviously in a perfect world it would make sense to remove all of these disks through the View Manager by removing your desktops and desktop pools.  I say in a perfect world because for some reason those pools and desktops no longer existed in my View Manager.  Another option is to 'un-protect' this VM by using the sviconfig on the View Composer.  There's a blog post on the VMware View Blog which outlines the command line parameters to use it.  Again, in a perfect world one would still have a View Composer instance, that which I did not.

So, as a last ditch effort these are the steps I used to remove the replica disk.  

1. Connect directly to the ESXi host and remove the replica

I know I know, you shouldn't perform actions directly on a host if it is connected to a vCenter instance, but I really had no choice on this one.  Find out which host the replica is registered to and connect directly to it (either with the vSphere Client or vMA)  and remove it from inventory.  You should see it disappear from the host, however it will show up as orphaned in vCenter.

2. Maintenance Mode, Disconnect and Remove.

It seems extreme but this is what I had to do.  Drop your host into Maintenance Mode.  When that's complete, disconnect it from the vCenter Server, and when that's completed right click on your host and 'Remove' it from the vCenter instance.

3. Add the host back to your cluster.

In the 'Hosts and Clusters' inventory view, right click on your cluster and select 'Add Host'.  You will have to provide the connection information to the host that you just removed in order to get it reconnected to your vCenter instance.

Voila, the replica VM is gone for good!  It seems a little extreme to go to these lengths to get rid of one VM but its' the only sequence of events that I could process to get rid of it!  As always, concerns, question, comments, suggestions are welcome in the comments below!

Access to VM Console without the vSphere Client

How can I grant access to the console of a VM to an end user without requiring them to install the vSphere client? How do I grant one of our vendors or partners access to the console of a VM without allowing them to see all of our guests?. I see questions like these pop up on the VMTN forums over and over again and I always answer it the same. Generate a VMware Remote Console URL! Or I guess a Virtual Machine Shortcut would be the official wording for it. Basically a Virtual Machine Shortcut is simply a URL that you can generate through vCenter Web Access which would allow anyone(with authentication of course) to connect to the console of a VM using only a supported browser. Now I say supported browser due to the fact that a plug-in needs to be installed in order to view the VM console. Currently supported browsers include only Microsoft Internet Explorer and Mozilla Firefox.  I'm not even sure of the versions that are required as I can't seem to find any documentation around the plug-in itself.  The end user will also need to have valid permissions set up within vCenter on the targeted VM. As long as the end user meets those two requirements then actually generating the URL is pretty simple and straightforward.  And here's how…

Login to the vCenter Web Access by pointing your browser to https://ip-of-your-vcenter-server/ and select the 'Log In To Web Access' link in the top right hand corner.

From here, after you are logged in you will have to navigate on the left hand side through your datacenters and folders until you locate and select the VM you would like to grant access to.  Once the VM is selected you should see the 'Generate Virtual Machine Shortcut' option under the commands section on the summary tab.

Once the Generate shortcut link is clicked you will be presented with the actual URL and a few options.  Here is where you can do things like hide the event log of the selected virtual machine, as well as limit the view to that Virtual Machine only, and obscure the URL that it generates as well to make it harder to guess.

Simply send this URL to your end user and once they have entered this address into a browser they should be good to go and you should be happy that your work is done.  All they need to do is copy/paste that URL into either IE or Firefox and they should be presented with the console of the VM.

What I'm not sure of, and might be a good idea to have, is the ability to have these URLs expire or time-out.  I don't think you would want them just hanging around forever. πŸ™‚

Veeam v6 – What’s New

So, Veeam one of the industry leaders in virtualization backup and data protection seem to be getting closer to the release of there anticipated version 6 of the Veeam Backup and Replication.  They've released the official What's New document outlining a slew of enhancements and new functionality that will be included with the version 6 of their flagship Backup and Replication product.  It's nothing new, as Veeam have been promoting the functionality of v6 with a series of webinars and sessions in the last few months, but its still nice to have all of these enhancements all combined together in one document.

Needless to say one of the biggest features of Veeam v6 is the Multi-Hypervisor support.  As of version 6 Veeam will now support both VMware and Microsoft Hyper-V all from the same interface.  Since I'm not a Hyper-V user I'll leave it to you to read up on the supported functionality yourself, but I'll touch on a few other of my favorite features below…Keep in mind, I've yet to use to use or see the product, so my opinions are purely based upon what I have seen in the webinars or read, so the final product could differ from what I think it will be like…
 
Scalability – Veeam has completely redesigned their backup architecture in v6.  With that they have the addition of backup proxy servers which offload the backup and replication traffic to the proxy server instead of the actual backup target.  This will allow for the use of a load balancing algorithm that splits the load amongst proxy servers, and in turn, allows for more concurrent jobs to run and faster backup speeds.  In terms of replication, the on-site backup proxy server can now send data directly to the target backup proxy server, completely bypassing the Veeam server itself.
 
1-Click Happiness – Veeam has simplified a lot of their processes by creating a bunch of 1-click functionality.  Veeam has added 1 click events to their Instant Level File Recovery, Failover, Failback, VM Restore, and Automated Upgrades.  Perhaps the most useful '1-click' event will be with the Instant Level File Recovery.  Prior to v6 I found this to be a monotonous task involving many steps and approvals to restore a file to a VM.  It will be nice to be able to do this with 1 click.
 
Backup Targets – Along with the Linux Backup Target, you can now set a Windows box as your backup target.
 
Traffic Throttling – In essence this allows you to do just that…throttle the Veeam Backup traffic.  This can be done via time based or day based as well.  This way we can guarantee what bandwidth will be used for Veeam traffic, and guarantee that we are not interfering with other traffic that might be flowing across a WAN link.
 
Wan Optimizations – There has been a lot of work done with WAN optimization, it appears in quite a few of the enhancements on the What's New document.  Essentially they have improved and optimized the protocol used to transfer data across a wan, allowed for multiple TCP/IP connections per job, and with the addition of the the traffic throttling, proxy architecture and windows targets you have no excuse to not get your data off-site.
 
Parallel Backup and Replication – An individual VM can now be processed by both a backup job and a replication job at the same time.  This eliminates the need to put your replication jobs on hold in order to satisfy a backup window. πŸ™‚
 
Replica Termination – In v5 and below, when a job was terminated, it would leave your latest restore point unusable until the next time the job ran.  In v6, this will roll back immediately, always leaving your latest restore point in a good state and able to power on.
 
1-click permanent Failover – This is something that was manual in previous versions which I documented here.  Now this all can be done with one click, to permanently failover to your replica.
 
Active Rollbacks – The restore points of a replica are now stored as native VMware Snapshots, leaving you with the ability to revert to a previous point in time without using the Veeam Backup and Replication server.
 
Improved Seeding – You can now use previous VMs located at your target site, or backups at your target site as the seed for your replica job, allowing you to start replication in an incremental fashion, rather than waiting for the first big initial seed of your VM.
 
Re-IP – one of the biggest and coolest enhancements in my book.  The ability to automatically re-ip your VMs at a DR site to align with your networks there.  Very cool.
 
Cluster Targets – Hey, we can now replicate to a cluster as well as a host.  Basically, if your replica target is a cluster and you lose a specific host, your replica job can continue to run as it's pointing to a cluster…
 
VM Migration – I'm not to sure what this is, as it seems to be new to v6.  In essence, it looks very similar to Storage vMotion in the way it will copy a running VM, and then copy just deltas that have changed during the first initial copy.  This could be very beneficial to those SMB's or ROBO offices that do not have Storage vMotion licensed.
 
VM Restores – There have been a number of enhancements in the line of restores.  Again, more 1 click options, the ability to restore multiple VMs at once, more options around the use of attaching the restores to Networks, as well as the Unique VM identifier will now remain unchanged when restoring the VM overtop of itself.
 
NTFS Permission Preservation – The permissions and ownership of files and folders restored to a Windows server can now be preserved during the restore πŸ™‚
 
UI Enhancements – The real-time stats window will now show more counters.  The job reports will now show the amount of changed data as well as compression and de-duplication ratios.
 
VM Ordering – You can now specify the order in which the VMs will be processed.  This is a small but nice thing to have.
 
Multi-User access – Multiple users can now access the Veeam server through RDP.  Before, if you left the Veeam application running, you would have to kill the old process before you could get into the application.
 
Again, I want to stress that I haven't tested or seen any of these enhancements and I hope I got them all correct.  Be sure to comment if I got anything wrong…
 
IMO, Veeam continues to release quality software that is incredibly intuitive and easy to use.  The ability to take the complex tasks of performing all of these functions and wrapping them up into '1 clicks' surely is amazing, and Veeam is doing a great job at doing so…  The functionality that v5 of Backup and Replication brought to the table was truly amazing, and i didn't know how they were going to top it with v6, but according to this document and what I have seen so far, it appears they have done so…  Good Work and Can't Wait!

The number of virtual devices exceeds the maximum for a given controller!!

Yes, that's the error I was presented with this morning after attempting to clone a new VM from a template. The number of virtual devices exceeds the maximum for a given controller!!

It's such a great error message, so explanatory. immediately I went to look at the number of drives in the VM, thinking maybe it has too many virtual disks or is attached to some other virtual disk or something, however, it only had 2….so, once again I turn to my pre-vmware support techniques (Google).

So, results pointed me to this KB article. Easy enough fix right, don't edit the hardware while cloning. which after some digging was exactly what had been done. Well…problem solved right?  Not really…

I looked at a few of the other google results, which all pointed to converting the template back to a vm, and selecting the correct network. I thought I would do this, as some of our templates still had the old default 'VM Network' attached to them, and since then we have added some different VLAN networks, which were our new default vm networks. So, hey, lets just do it anyways, templates were probably in dire need of some updating anyway.

So, convert to VM, right click -> Edit Settings…. Lets have a look….

or not!!!!

PropertyCollector.RetrieveContents for object "propertyCollector" on vCenter Server blah blah blah….of course….that's what's wrong with it…

So….what to do now…a few more google searches and the old remove/add trick and I'm back in business…

Basically, right click the VM -> Remove from Inventory. Then, browse the datastore that the VM lives on, right click on the .vmx file and 'Add to Inventory' and I was back in business….

I could once again edit the settings of that VM. By the time I got around to this however, I was tired…and couldn't remember what I was looking for in the first place…right, the networks…Nope! They were fine…However after completing all these steps I was able to do a successful clone.

Migrating vCenter to a new server

Maybe its during the upgrade from vSphere 4.0 to 4.1 and you require the 64 bit hardware. Maybe you need to upgrade to take advantages of a newer OS and you just don't trust the next next done that Microsoft provides you. Maybe its the fact that you currently have a physical vCenter and you want to take advantage of VMware High Availability and Distributed Resource Scheduler. Or maybe its the complete opposite and you are currently virtualized and you have your reasons to be physical. Whatever your reasons may be, there will more than likely be a time where you as a VI admin will want or have to migrate your vCenter to a new server. In my case, it was option number 4.

We had been running a virtualized vCenter ever since our upgrade to vSphere 4, however with the addition of the Distributed Virtual Switch, along with more and more third party applications depending on vCenter, coupled with a failure that left me unable to assign a vm to a network I just thought it was time to move our vCenter Server outside of the cluster that it was controlling. The decision to go physical was purely an overkill, but i wanted to have my vCenter completely disconnected from the san fabrics and interconnects that are currently the interworkings of our i/o flowing in and out of our hosts. I had read about the recommendation of management clusters, but the costs of building that would for sure outweigh the advantages of having it virtualized. Also, this will give us a central spot to house our PowerCli scripts and also run our UPS shutdown scripts from. So, physical it is, and here is my plan to get there. It wouldnt have been much of a concern but i wanted to have a solution where the dvSwitches would continue to function, and where i wouldnt need to go and touch every host afterwards. So, assigning this new physical vCenter the same name and same IP was a key step. Since i wanted to ensure a smooth transition i ran this one through the lab first using these steps. So here is what i had. vCenter1 (the current active vCenter) and vCenter2 (the new vCenter).

1. Get everything that you need (vCenter installation, 64 bit sql native client, sysprep files, etc). If vCenter1 is virtualized be sure to take note on which host its running on as you will need to disable or disconnect its network later on.
2. When you are ready to go stop the vCenter service on vCenter1.
3. Now we need to disconnect or disable the network on vCenter1.
4. Delete the current computer account for vCenter1 from active directory. I assume you could also just rename it, i just chose to delete the account.
5. Now lets move over to vCenter2 and do a few things. Rename this machine to vCentre1 and also give it the same ip as vCenter1. This should ensure that we don't have to ssh into each host after the upgrade and touch the hosts file.
6. Now just complete the installation of vCenter on vCenter2 which is the now vCenter1. (Confused yet?). Note – when asked about the database be sure to select to use the existing db, otherwise you can kiss all your hard work goodbye.

Thats all, you should be able to connect to your new vCenter instance using the same name or IP as you always have. You may have to reconnect your hosts however, as a new password for the vpxuser would have been generated with the new install and the hosts and vCenter will be out of sync. Thats as simple as right clicking your host, selecting connect and providing root credentials though. There you have it, a brand new vCenter! While your at it you might as well defragment your vCenter Server database as well to give it that snappy new feeling again. Also, there is a KB article which takes you through some of the steps above here. As always if you notice anything that I'm lacking or if I'm performing actions that will cause the market to crash please comment and let me know.

The Resource Pool Priority Pie Paradox – Part 3 – The Powershell Code

Part 2 – The 4:1 Formula
Part 3 – Powershell Scripts

So in parts 1 and 2 of this series I explained (hopefully) what the resource pool priority pie paradox is and how to punch some key numbers into a formula and figure out what exactly you could set for custom shares on a production and test resource pool in order to come out with that 4:1 ratio.  In this part I'll show you how you can get those numbers from your own environment using the VMware PowerCli without having to do the math yourself.

Just a note, for the script to work you must only have two resource pools, which you assign to variables at the beginning of the script.  Along with the resource pools you need to assign your vCenter server name as well as the cluster name.  You may also need to pump in your credentials if you aren't running this from a trusted client.

Anyways, the script is below, feel free to modify as you please.  If you see a spot where I could be more efficient or if I'm doing anything completely crazy let me know…  You can also download it here if you don't feel much like copying and pasting..:)

#################################################################################
# ResourcePoolPie

#
# This script will poll look at VMs residing in a production and a test resource
# pool and determine how to best set the custom share value in order to maintian
# a 4:1 Production:Test ratio.  Note, you must be setup in a Production and Test
# Environment inside of one cluster.  Its kind of unique to my environment and
# may not apply to everyone elses, but feel free to change and modify what you
# need in order to make it work for you.
#
# The following variables will need to be assigned
#
#   $vcenterserver = ip address of vcenter
#   $clustername = name of cluster containing resource pools
#   $prodname = name of production resource pool
#   $testname = name of test resource pool
#
# Created By: Mike Preston, 2011
#
#
#################################################################################

Add-PSSnapin VMware.VimAutomation.Core
# Assign appropriate values to following variables.
$vcenterserver = ""
$clustername = ""
$prodname = ""
$testname = ""
# establish connection to vcenter server
$connection = Connect-VIServer $vcenterserver
# get cluster information
$clus = get-Cluster -Name $clustername | get-view
# get resource pool information
$prodpool = Get-ResourcePool -Location $clustername -Name $prodname
$testpool = Get-ResourcePool -Location $clustername -Name $testname
# get a list of vms in production and test
$prodvms = get-vm -Location $prodpool | where { $_.PowerState -eq "PoweredOn" }
$testvms = get-vm -Location $testpool | where { $_.PowerState -eq "PoweredOn" }
# initialize counters to zero
$totalprodcpu = 0
$totaltestcpu = 0
$totalprodmem = 0
$totaltestmem = 0
# loop through production pool and total cpu/memory
foreach ($vm in $prodvms)
{
    $totalprodcpu = $totalprodcpu + $vm.NumCPU
    $totalprodmem = $totalprodmem + $vm.MemoryMB
}
# loop through test pool and total cpu/memory
foreach ($vm in $testvms)
{
    $totaltestcpu = $totaltestcpu + $vm.NumCPU
    $totaltestmem = $totaltestmem + $vm.MemoryMB
}
# Begin CPU calculations
Write-Host "CPU Configuration"
Write-Host "=========================================================="
write-host "Production Pool contains" $prodvms.count "Powered On VMs containing" $totalprodcpu "cpus"
write-host "Test Pool contains" $testvms.count "Powered On VMs containing" $totaltestcpu "cpus"
write-host "Cluster has" $clus.summary.effectivecpu "MHZ to hand out"
#populate variables for formula a(4w-3x) = nx

 

$a = $totalprodcpu
$w = $clus.summary.effectivecpu
$n = $totalprodcpu + $totaltestcpu
Write-Host ""
# lets solve x πŸ™‚
Write-Host "Lets plug these numbers into our formula and solve x (Production Share)"
Write-Host "a = total number in production, w = total resources, n = total number in prod and test"
Write-Host "——————————–"
Write-Host "a(4w-3x) = nx) "
Write-Host "$a(4($w) – 3(x)) = $n(x)) "
# lets get some tmp vars initialized
$tmp1 = 4 * $w
Write-Host "$a($tmp1 – 3x) = $n(x)"
$tmp2 = $a * $tmp1
$tmp3 = 3 * $a
Write-Host "$tmp2 – $tmp3(x) = $n(x)"
$tmp4 = $n + $tmp3
Write-Host "$tmp4(x) = $tmp2"
$prodpoolresources = $tmp2 / $tmp4
Write-Host "x = $prodpoolresources"
Write-Host "——————————–"
$prodpoolresources = [Math]::Round($prodpoolresources,0)
$testpoolresources = $w – $prodpoolresources
$prodsharepercpu = $prodpoolresources / $totalprodcpu
$prodsharepercpu = [Math]::Round($prodsharepercpu,0)
$testsharepercpu = $testpoolresources / $totaltestcpu
$testsharepercpu = [Math]::Round($testsharepercpu,0)
# Display recommendations
Write-Host "Recommended Share setting for production $prodpoolresources Mhz split between" $prodvms.count "Vms with" $totalprodcpu "cpus resulting in" $prodsharepercpu "Mhz per cpu"
Write-Host "Recommended Share setting for test $testpoolresources Mhz split between" $testvms.count "Vms with" $totaltestcpu "cpus resulting in" $testsharepercpu "mhz per cpu"
# Begin calculating Memory
Write-Host "=========================================================="
Write-Host "Memory Configuration"
Write-Host "=========================================================="
write-host "Production Pool contains" $prodvms.count "Powered On VMs containing" $totalprodmem "MB of Memory"
write-host "Test Pool contains" $testvms.count "Powered On VMs containing" $totaltestmem "MB of Memory"
write-host "Cluster has" $clus.summary.effectivememory "MB of memory to hand out"
#populate variables for formula a(4w-3x) = nx
$a = $totalprodmem
$w = $clus.summary.effectivememory
$n = $totalprodmem + $totaltestmem
Write-Host ""
# lets solve x πŸ™‚
Write-Host "Lets plug these numbers into our formula and solve x (Production Share)"
Write-Host "——————————–"
Write-Host "a(4w-3x) = nx) "
Write-Host "$a(4($w) – 3(x)) = $n(x)) "
# lets get some tmp vars initialized
$tmp1 = 4 * $w
Write-Host "$a($tmp1 – 3x) = $n(x)"
$tmp2 = $a * $tmp1
$tmp3 = 3 * $a
Write-Host "$tmp2 – $tmp3(x) = $n(x)"
$tmp4 = $n + $tmp3
Write-Host "$tmp4(x) = $tmp2"
$prodpoolresources = $tmp2 / $tmp4
Write-Host "x = $prodpoolresources"
Write-Host "——————————–"
$prodpoolresources = [Math]::Round($prodpoolresources,0)
$testpoolresources = $w – $prodpoolresources
$prodsharepermb = $prodpoolresources / $totalprodmem
$testsharepermb = $testpoolresources / $totaltestmem
# Output results
Write-Host "Recommended Share setting for production $prodpoolresources MB split between" $prodvms.count "Vms with" $totalprodmem " MB of RAM resulting in $prodsharepermb shares per MB"
Write-Host "Recommended Share setting for test $testpoolresources MB split between" $testvms.count "Vms with" $totaltestmem " MB of RAM resulting $testsharepermb shares per MB"
Write-Host "=========================================================="

 

 

Part 2 – The 4:1 Formula
Part 3 – Powershell Scripts