Monthly Archives: November 2011
Open the floodgates and let the masses through. Today, after being alerted by the twitterverse I noticed that version 6 of Veeams' flagship product Backup and Replication was available for download. (well, for those lucky enough to fight off the traffic and get it)! This long awaited release is exciting for me for a couple of reasons. Firstly, i get to see all of those new features that have been promoted for the last few months through their featured webinars and Anton's' Whats New' document (you can find a summary of my favorites here). And secondly, we now have the support for VMwares' vSphere 5 meaning i have a slew of upgrades to perform over the next little while. (Veeam, vSphere, vCenter, View, Powercli, VMA). Needless to say it is all work that i enjoy doing so it should be a fun xmas for me! That doesn't sound too much like a stereotypical geek does it?
So, off to the races! Head on over to the downloads section of Veeam.com and get your copy. I'm sure there will be some sort of spectacular launch message soon to follow :), not to mention blog posts of all of the community members upgrade experiences.
Last week I published an article based around moving your Veeam Backup & Replication Database to a new server. In that article I used a backup and restore method to move the Veeam DB somewhere else. Well, the feedback I received from that article was mostly based around how to setup a scheduled job to backup the Veeam database, so, without further ado, here's how I would recommend doing so.
Connect to your Veeam DB server
First off, we need to initiate a connection to the SQL Server hosting your Veeam DB. Honestly, it's probably easier just to RDP or console in to the SQL Server hosting the database and then connect to it. In my examples below I will be using SQL Server Management Studio to do so. Just a note, if you are running the default installation of Veeam with SQL Server Express, you can connect to the server using 'SERVERNAME\VEEAM' as your server name and use Windows Authentication. Otherwise, just connect to your SQL instance as you normally would.
Create the Maintenance Plan
This is a pretty easy step. Once you are connected just create a new maintenance plan by expanding Management -> Maintenance Plans. Right click on Maintenance Plans and select New Maintenance Plan. You could also select to go through the wizard, but again, for this example I chose to create it from scratch.
Create the Backup Database and Maintenance Cleanup tasks
You should now be in what is called Design Mode of the maintenance plan. In the bottom left hand corner of your screen you should see all of the Design Tasks that we are able to just click and drag over to our Design Surface in the centre. Here is where we need to setup our first task which is to do the actual backups of our databases. Simply select the Backup Database task and drag it over into our Design Surface. Do the same with the Maintenance Cleanup task as well.
Configure the Backup Database Task
Ok, we are now getting into the meat of this job. Double click the Backup Database task that we just moved over. Here is where we will setup all of our parameters evolving around our backups. First off we need to select our connection. In most cases this can just be left at 'Local Server Connection', however depending on how you are setup you may need to enter in the actual hostname or IP of the server. Leave the backup type set to Full. Under the database(s) section is where you can select which databases you would like to backup with this job. You can just select the Veeam DB if you want, but I chose to select 'All Databases'. Back up to – Select your target, usually disk nowadays. I left the expiration of the backup sets at the default, which is to not expire. Check the create a backup for every database, and in this example I've also checked the subdirectory for each database as well. I just find this to be a bit more polished when browsing through the backups 🙂 You can use whatever you want for the backup extension, but the standard for SQL is 'bak'. Select a location to store the backups, click 'OK' and your done.
Configure the Maintenance Cleanup Task
This step can be skipped if you want but you will have to watch your free space. In this step we will set the job to 'clean up after itself' by deleting backups that are a certain number of days or weeks old. Again setup your connection the same as you did in the previous step. You will also want to select to 'Delete Backup Files' Select 'Search folder and delete files based on an extension' and setup the folder the same as above. Select to include first-level subfolders. Enter in our file extension the same as above (bak). Select your desired retention policy under the 'File Age' section. I usually chose somewhere along the lines of a couple of weeks depending on the importance as well as the free space on the backup targets. After all this is setup click 'OK' to save your cleanup task.
Connect the two tasks together
Here's an easy one for you. If you single click on the Backup Database Task you will see a green arrow appear underneath it. Simply drag that arrow over to the Maintenance Cleanup Task. You could also take the vice versa action on this one. You could have the single click the Cleanup Task and drag arrow to the Backup Task. Either way, whichever one task runs first you should end up with the same results.
Schedule the plan
Click the schedule button in the Maintenance Plan toolbar. In the job schedule dialog that opens select the required times and frequency that you wish to run this job and click 'OK' to save the schedule. The schedules are very flexible and allow for virtually every scheduling combination that you can think of.
This is all the modification that we need to do so just save your maintenance plan by going to File -> Save Selected Item or by right-clicking the tab at the top and selecting 'Save'.
Check the Agent and Test.
If you now have a look under the your SQL Agent by going to SQL Server Agent -> Jobs you should see that a new agent job has been created with a name similar to that of your maintenance plan. You can right click on this job and select properties. You should see your schedule as well as the SSIS call to run your maintenance plan. If you would like to test your backup job now, simply right click your job and select 'Start Job At Step'. This should popup a dialog showing you the status of the job. Once completed you should see some backups in the target backup locations you inputted earlier.
So there you have it! DR for your DR Solution.
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. 🙂
As you are probably are aware, in the beginning there are few VMs. People start out by virtualizing their low flyers, web servers, etc.. As time goes on there is something called VM sprawl which occurs. Suddenly there are many many VMs being spun up for no real reason at all. Tier 1 apps make there way into your vCenter, and things begin to grow exponentially. The problem with this, is that sometimes you have solutions installed from the beginning which were initially setup in the 'small' environment you had in the beginning. As is the case with my Veeam installation. When I first installed it, I just used the SQL express option that came with it. Now, since the environment has grown, and the stakes are higher when failures occur, I have the need to move this database from its' default SQL express to a full blown version of SQL that is managed by all of our monitoring and backup tools. Below is just how I did that…
First off, you will need to get your hands on a copy of SQL Server Management Studio. We will need this in order to perform the backups of the SQL express databases that Veeam has created. You can find 2005 here and 2008 here.
After you have installed this on your Veeam server just follow the steps below to move your database. Oh, and be sure to stop and / or disable any running jobs or jobs that may run while you are performing these actions. It's probably best to just disable all of them until you are done.
Stop Veeam Services
We will need to stop (and I disabled) all of the Veeam Services. Don't worry, when we get to re-installing the Veeam applications later the services will be re-enabled again. The reason for this is that we do not want any data flowing into our database as we are backing it up and moving it. You will need to stop the following services; Veeam Backup Enterprise Manager, Veeam Backup Service, Veeam Indexing Service, and the Veeam vPower NFS Service as shown below
Backup your VeeamBackup database
Once the services are stopped it's time to get going on backing up our Veeam databases. Veeam has 2 databases that it uses; VeeamBackup and VeeamBackupReporting. We will need to back both of these up in order to restore on our new SQL server. So, fire up SQL Server Management Studio and find the VeeamBackup database and follow the following
- the VeeamBackup database and select Tasks->Backup
- Make note of the location near the bottom where its' going to save the backup
- 'OK' and browse to the targeted location and copy the backup to your new SQL server.
You will need to repeat the bulleted points above for the VeeamBackupReporting database as well.
Restore on your new SQL server as the same name
Now that we have the backups on the new SQL Server we will need to restore them. The following is how I did
- Databases and Select Restore
- in the 'To Database' field we will want to type the name of our target database. I would just use the same name as it was before – 'VeeamBackup'
- Here we need to select 'From Device' and then 'Add' our backup file that we have just copied
- we have added our file, be sure to check the checkbox under the Restore heading.
- Check out the settings on the Options tab. Here is where you will want to check to be sure that the mdf and ldf files will restore to the locations that you want them to.
- When your happy, click 'OK'
Again, we need to repeat this for the VeeamBackupReporting database as well.
Depending on how had Veeam setup before, this may or may not need to be done, or it may need to be done in a different way. Essentially the user that you are going to run the Veeam installation as will need to have db_owner rights to both of these databases. So if you installed Veeam as a local user account previously, you might want to think about creating and using a domain account this time around, as now we have two servers that we need to authenticate on. However you decide, you will need to grant that user dbo rights as follows…
- Under Security->Logins, right click and select New Login. Browse to the windows user account that you want to use.
- In the 'User Mapping' section, select both VeeamBackup and VeeamBackupReporting and ensure that the db_owner role membership is checked off.
- Also in that section, assign the Default Schema for both of those databases to dbo.
Remove and Re-Install Veeam
There may be other ways to 're-point' Veeam to the new database server (registry hacks), but for all intensive purposes it takes literally less than 5 minutes to install Veeam so i found this the easiest route. Go into control panel and remove both Veeam Backup and Replication and the Veeam Enterprise Manager. Once done, re-install both of these applications. When prompted for your database location enter your desired information to point to the new SQL Server. You should be prompted that a Veeam server is already connected to the database, when asked this just select 'Yes' to connect this (the new installation) server to the database instead.
And it's that easy! You know have a more expandable database and the ability to utilize more RAM and CPU.
Just a note, I cannot guarantee that this will work for you…it worked great for my environment! If in doubt, open up a support call with Veeam and have them give you a hand or directions to do so… Also, if you are looking for a way to automate a backup of your Veeam Database, check out this post.
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.
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….
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.