Restore Files & AD Objects From NetApp & Veeam v8

With the release of Veeam Backup & Replication v8 we can restore directly from NetApp Snapshots. Whether it’s an entire VM, individual files, or just some objects in Active Directory, you can do it all from the Veeam console. For a guide on installing and configuring Veeam v8 with NetApp storage, click here

We’ll be testing the restore of individual files and some Active Directory objects for this blog post. In this scenario we have a couple Domain Controllers (2008 R2) and a couple of member servers with some files that we’ll delete. We also have an OU with a couple users, a member server, and a group.

Each of these VMs sit on either of these two volumes, Win_2008 and Win_2012. If you click on “Storage Infrastructure” in the Veeam Backup and Replication console, then expand your NetApp storage you’ll see a list of all the volumes available and their snapshots.
veeamrest120114-part1

1. I’ve taken a snapshot in NetApp System Manager of these volumes. To list these snaps, refresh the volume by right-clicking on the volume and choosing “Rescan volume” or right click on the storage array and choose “Rescan Storage” (Since we have 2 volumes to refresh, we’ll rescan storage.
veeamrest120114-step1
2. A new window will popup showing the progress
veeamrest120114-step2
3. Once completed, we now see the new snapshot I created called “Pre-delete”
veeamrest120114-step3
4.I’m going to delete a file from the server “Lab2008” (on the Win_2008 datastore) and “Lab2012” (on the Win_2012 datastore) that are sitting on my desktop.
veeamrest120114-step4a
veeamrest120114-step4b
5. And let’s also delete the OU “Delete Test” which contains a couple test users, a group they are apart of and the VM “Lab2008”
veeamrest120114-step5
6. Now that those files and OU\objects have been delete, let’s go back to the Veeam console and see what we can recover. We’ll start with the files for the “Lab2012” VM.
7. Expanding “Win_2012” datastore in “Storage Infrastructure” view, click on the name of the snapshot I created earlier and we see the “Lab2012” VM
veeamrest120114-step7
8. We right-click on “Lab2012”, hover over “Restore guest files” and then choose “Microsoft Windows”
veeamrest120114-step8
9. Under the “File Level Restore” screen, click “Customize” in the bottom right corner
veeamrest120114-step9
10. As long as you’re restoring to a vCenter/Host that’s already been added to Veeam, choose the host, resource pool (if any) and folder. Click “OK” then click “Next”
veeamrest120114-step10
11. Enter a reason for the restore and click “Next”
veeamrest120114-step11
12. Click “Finish”
veeamrest120114-step12
13. The restore session will open and mount the snapshot/VM to the chosen host
veeamrest120114-step13
14. In vCenter, we see these 2 tasks of creating a datastore and registering the virtual machine.
veeamrest120114-step14
15. On the host, we see a new powered off VM with the name of “Lab2012” followed by a GUID.
veeamrest120114-step15
16. Back at the Veeam console, the Backup Browser window appears and we can browse to the location of the deleted file
veeamrest120114-step16
17. From here, we can copy the file to our local machine or restore it directly to the Virtual Machine. Right click on the file and choose “Restore” then “Overwrite”
veeamrest120114-step17
18. We’ll pick “Use the following account” and choose my Lab Domain credentials and click “OK”
veeamrest120114-step18
19. The restore process will start and you’ll see this output if you click “Show Details”
veeamrest120114-step19
20. Logging back in to “Lab2012” we can see the file has been restored
veeamrest120114-step20
21. Close the “Restoring files” window in the Veeam console and the “Backup Browser” window. After they’re closed, the VM will be unregistered on the host and the datastore will be unmounted.
22. I’m doing a restore from “Lab2008” but this time I will just copy the file to my local computer instead of restoring to the guest VM. After browsing the datastore snapshots and choosing “Restore Guest Files”, we’ll browse the directory structure, locate the file, right-click and choose “Copy To”
veeamrest120114-step22
23. A window will pop up to choose the folder location on your machine and whether to preserve permissions and ownership. Then click “OK”
veeamrest120114-step23
24. Now in the root of the C: drive we have the “Lab2008-txt” file
veeamrest120114-step24
25. Let’s look at the “Lab2008” VM now. It was in that OU we deleted and after rebooting it and trying to login we receive the message “The security database on the server does not have a computer account for this workstation trust relationship”. We can fix that.
veeamrest120114-step25
26. Back in the Veeam console and the “Pre-delete” snapshot for the “Win_2008” datastore, we’ll locate the “Lab-DC01” VM. Right click on the VM, hover over “Restore application items” and then click “Microsoft Active Directory objects”
veeamrest120114-step26
27. Our host settings are saved from the last restore we did, so click “Next”
veeamrest120114-step27
28. Enter a restore reason and click “Next”
veeamrest120114-step28
29. Review the summary and click “Finish”
veeamrest120114-step29
30. The Veeam Explorer for Microsoft Active Directory window will appear
veeamrest120114-step30
31. Then the VM will be mounted in vCenter
veeamrest120114-step31
32. Once the Veeam Explorer window for AD opens, you’ll be able to browse your Domain object. We’ll expand the “LabOU” object where we see “Delete Test” with the same 2 test users, “Lab2008” server and the group those users belong to.
veeamrest120114-step32
33. Right click the “Delete Test” OU and choose “Restore container to LabDC.local”
veeamrest120114-step33
34. Enter the credentials for the account with access to add objects to the domain and click “OK”
veeamrest120114-step34
35. You’ll see the progress of the restore and then the summary of how many objects were restored
veeamrest120114-step35

(In order for this to work your Veeam server will need network access to the live domain controller)

36. If we refresh the screen for Active Directory Users and Computers on “Lab-DC01” we’ll see the OU is back with all of it’s objects
veeamrest120114-step36
37. In the properties for the users, we can see that group membership was retained. The group “Email Group” is located in another OU and that membership was restored as well
veeamrest120114-step37
38. And now when we try to login to “Lab2008” with domain credentials it works with no issues.

 

How fast can this restore happen? From the time I opened the Veeam console until the time the OU reported as being restored took 3 minutes and 34 seconds. In an emergency where someone accidentally deletes an entire OU, a user account, a server, or anything else, they can all be restored in under 5 minutes time without the need to reset any passwords and everything will work without anyone ever noticing. Veeam is awesome and just keeps getting better and better.

Deploy NetApp OnCommand Balance 4.2

OnCommand Balance is a virtual appliance deployed within vCenter that allows you to monitor the health of your VMware environment at the Virtual Machine, vCenter and Storage level. Having a single place that displays end-to-end performance allows you to spend less time troubleshooting performance issues and trying to correlate data and address potential issues in your environment.

I’ve been using OnCommand Balance (formerly OnCommand Insight Balance) for a few years now and it has saved countless hours finding issues in the environment. We’ve had historical data available to look at growth and performance trends, as well as increased demand on individual servers after code releases/updates. Having access to the information within the VMs (such as drive space filling up) also makes this an invaluable tool.

The following documentation will take you through the deployment process of the Virtual Appliance and initial setup. You will go through adding your vCenter hosts, storage controllers, creating saved credentials, connecting to Active Directory for authentication and provision a Windows proxy service for monitoring Windows Servers.

Prerequisites:
1. A user account with appropriate permissions to vCenter for OnCommand Balance to use
2. A domain account with permissions to access all monitored Windows machines (preferrably a Domain Admin account)
3. A separate Windows Server/VM that will be used as the Proxy service to monitor Windows machines
a. Must have latest version of Java 6 installed and User Account Control disabled
4. Username/password for the NetApps that will be monitored

Steps:
1. Download the latest version of OnCommand Balance (4.2) for this writing from the NetApp website
balance101414-step1
2. Connect to the vSphere web interface, click on “vCenter”, “Hosts and Clusters”, expand the Datacenter, and click on the Cluster/Host that will host OnCommand Balance. Right click and choose “Deploy OVF Template”
balance101414-step2
3. Click “Local file” and then “Browse”
balance101414-step3
4. Locate the OnCommand Balance OVA and click “Open” then click “Next”
balance101414-step4
5. Review the details of the OVF then click “Next”
balance101414-step5
6. Accept the EULA then click “Next”
balance101414-step6
7. Give the appliance a name and choose the folder location of the appliance (if any) and click “Next”
balance101414-step7
8. Set the virtual disk format (I prefer Thin since one of the drives is 220GB) and choose the datastore. Click “Next”
balance101414-step8
9. Choose the appropriate network and then click “Next”
balance101414-step9
10. Review the settings then click “Finish”
balance101414-step10
11. After deployment completes, locate the appliance, right click and choose “Power On”
balance101414-step11
12. Open the console of the VM (Right-click and choose “Open Console”) where you’ll see this countdown to install VMware tools prior to configuring the Balance virtual appliance (If you miss your chance to do this at this point, I was unable to install VMware tools at all on the appliance)
balance101414-step12
13. Right-click on the VM, go to “All vCenter Actions”, then “Guest OS” and then click “Install VMware Tools”
balance101414-step13
14. After the VMware tools dialog box is displayed, click “Mount”
balance101414-step14
15. The Balance virtual appliance should recognize VMware tools ISO has been mounted and proceed with the installation
balance101414-step15
16. After VMware tools install completes, press “y” then enter to configure static Network connection for the management interface
balance101414-step16
17. Enter the following information:

a. Host name
b. Host IP address
c. Netmask
d. Gateway
e. Primary DNS address
f. Secondary DNS address
g. Search domains
balance101414-step17g

18. Review the settings and then press “y” and enter if everything is correct
balance101414-step18
19. Default OnCommand Balance console login is netapp/netapp. Login to the console
balance101414-step19
20. After a few minutes (5-10) the web service will be up and running. Connect to the https://IPofAppliance/bp to begin configuration
21. Enter the name of your organization and click “Continue”
balance101414-step21
22. Choose if you want to participate in AutoSupport and click “Submit”
balance101414-step22
23. Enter the time zone, NTP Server address, the address of the primary Balance admin (preferably a distribution group), and the SMTP server address. Click “Continue” (You can choose to change the password at this time)
balance101414-step23
24. Sit around and wait a couple minutes…
balance101414-step24
25. A blank screen may appear during this time, but eventually should take you to the OnCommand Balance login page. Login with the default credentials of admin/password or whatever password was set in step 23.
balance101414-step25
26. Click the link for “Configure you storage arrays & appliances”
balance101414-step26
27. Choose the type of storage (NetApp FAS in this case), enter the management address for one of the nodes, Enter the name of the filer, enter the credentials (root in my case) and enter a nickname of these credentials as they can be modified later on during password changes. Click “Save”
balance101414-step27
28. Even though DNS is configured correctly, I usually receive this error about the other filer of this HA system not being resolvable. Click “Enter IP address instead” and then enter the IP of the other filer and click “Resolve”
balance101414-step28
29. Click the “Refresh” link on the right side of the page a few times until “Discovery Collection” status changes to “OK”
balance101414-step29
30. Click the “Add storage system” button to add additional storage arrays (Including the HA partners). Click on “Dashboard” then choose “Configure your vCenter Server”
balance101414-step30
31. Enter the FQDN/IP Address of the vCenter server. Click “Add new” next to Credentials to add the credentials for the vCenter server
balance101414-step31
32. Enter the username, password, and nickname for these credentials. Click “Next”
balance101414-step32
33. Choose what you want monitored (though I can’t imagine why you’d choose not to monitor everything) and click “Save”
balance101414-step33
34. Click the “refresh” link until “Discovery Collection” status changes to “OK”
balance101414-step34
35. Click “Add vCenter Server” button to add any additional vCenter servers. Otherwise, hover over “Discovery” and choose “Credentials”
balance101414-step35
36. To monitor the OS’s of your VMs and physical servers, you can add those credentials on this page. I’ll add domain admin credentials for monitoring my Windows domain VMs. Click “Add credentials” button
balance101414-step36
37. Choose the login method, login name (domain\username), password, nickname for the credentials, and a description. Click “Save”
balance101414-step37
38. Once added they will appear on this screen
balance101414-step38
39. Hover over “Discovery” and choose “Proxies”
balance101414-step39
40. A proxy is required to monitor the guest OS status of Windows VMs and Physical servers. This proxy runs on a windows server. Once you’ve determined (or built) the appropriate server for the proxy, enter it’s FQDN or IP address and click “Continue”. Much like the picture below says, UAC MUST be disabled. You’ll beat your head against the wall for hours trying to figure out why it fails without that.
balance101414-step40
41. Download and install the latest 32-bit Java 6 runtime on this proxy server. Then navigate to the link listed on that proxy VM to begin the installation
balance101414-step41
42. Once the Balance Proxy Installer screen appears, click “Next”
balance101414-step42
43. Locate the folder path for the 32-bit java install and click “Next”
balance101414-step43
44. Enter an admin account for the service to be run under. Check the box for “Start service immediately after install” and click “Next”
balance101414-step44
45. Select any additional components you might need for other vendors and click “Next”
balance101414-step45
46. Review the information and click “Install”
balance101414-step46
47. Click “Finish”
balance101414-step47
48. Back at the Balance web interface, click “Validate proxy setup” and if successful, click “Continue”
balance101414-step48a
balance101414-step48b
49. Hover over “Discovery” and click on “Servers”
balance101414-step49
50. Click the link on the right side for “Unmonitored Servers”
balance101414-step50
51. Click the link next the vCenter server for “# guests are not being monitored”
balance101414-step51
52. Check the box next to the VMs you wish to monitor, choose your Credentials from the dropdown box in the center and click “Monitor guest(s)”
balance101414-step52
53. Hover over “Admin” and choose “Configuration”
balance101414-step53
54. Click “Email”. In here you can set authentication for your SMTP server, choose the “From” address for Balance emails. Click “Enable alerts” and then check all the boxes for Critical, Warning, and all categories (I prefer as many alerts as I can get). Click “Update”
balance101414-step54
55. Click on “Active Directory” and click the check box for “Enable Active Directory”
balance101414-step55
56. Enter the IP/hostname of your AD server, enter the Distinguished name of the account used to search Active Directory, and enter the password for that account. Click “Test”
balance101414-step56
57. Once successful, enter the Distinguished Name of the of the OU for the user/group that will have access to login. Enter the Distinguished name of the Group that will be able to login. Enter “sAMAccount” for the search attribute. Click “Update”
balance101414-step57
58. Hover over “Admin” and click “Users”
balance101414-step58
59. Click “Add User”
balance101414-step59
60. Change “Authentication” to “Active Directory”. Enter the username and click “Lookup”. If successfully, configured, it should populate the e-mail address. Choose the appropriate user type (Admin or User) and click “Save”
balance101414-step60

You’re all setup and ready to let OnCommand Balance start collecting data in your environment. You start to receive some information within about 30 minutes, but after 3-5 days you start to get a better understanding of what is going on in your environment and have more useful metrics.

Veeam 7.0 Install on Windows 2012

Veeam Backup & Replication is one of my favorite piece of software I get to work with. I’ve been working with B&R since 2010 (v5) and it has always been easy to install, easy to configure, and quick to start taking backups and protecting my environment. And that is just the software, the company itself is even better. Their support forums are full of employees and users that are knowledgeable and quick to help. The best way to describe Veeam is a company that is on your side as an Administrator. They listen to their community, their users, their customers and are developing solutions that make our jobs easier.

The following guide walks you through installing SQL Express, Veeam, connecting to vCenter 5.5 and configuring deduplication for a secondary drive on Windows Server 2012 R2. I have a preference for installing all software to a secondary drive instead of the OS (C:\) drive so this documentation shows how to install each component to that secondary drive in the event you have the same preference as me.

Veeam’s site contains best practices regarding backup types, sizing of your Veeam server, deduplication recommendations, and everything else that goes into the planning of your Veeam Backup & Replication deployment. This guide is more just to show how to configure the components and an example of what I’m seeing for deduplication rates.

 

Prerequisites:
1. Windows Server 2012 R2 patched, joined to domain, with 2 additional drives (one for Veeam to be installed on and the other for backup data)
2. A user or group defined for Veeam administrators (required when doing a standalone SQL Express install in order to use Veeam, the service account used to run veeam must be a member of this group or added as a SQL Administrator in step 8)
3. A domain user account with admin rights to the vCenter server
4. Mount the Veeam B&R ISO
5. Turn off User Account Control (SQL Express install will fail without this)

Install:
1. Open “This PC”, located the Veeam disc, right click and choose “Open”
veeam7061614-step1
2. Browse to “Redistr\x64”, locate and double-click on “SQLEXPR_x64_ENU.exe”
veeam7061614-step2
3. Once the “SQL Server Installation Center” windows appears, click on “New installation or add features to an existing installation”
veeam7061614-step3
4. Accept the license terms and click “Next”
veeam7061614-step4
5. After Setup Support Files are loaded the SQL Server 2008 R2 Setup window will appear. Choose the features you’ll need (just Database Engine Services usually), change the Directories to the secondary drive (D:\ for this writing) and click “Next”
veeam7061614-step5
6. Enter the name of the instance and change the root directory to the secondary drive and click “Next”
veeam7061614-step6
7. You can run the SQL database engine as Network Service, but I prefer running as a named service account. Enter the domain\username, password, and click “Next”
veeam7061614-step7
8. Choose “Mixed Mode” for authentication type. Enter the “sa” password and immediately save it somewhere.
veeam7061614-step8

  • a. For “SQL Server administrators”, only users/groups added here will be able to open and run Veeam. Add all users that will need to access Veeam or create a group.
    veeam7061614-step8a
  • b. Click “Data Directories” tab and ensure all the directories are pointing to the secondary drive and click “Next” (For organization I prefer to create folders for each file, but it isn’t necessary)
    veeam7061614-step8b

9. Choose if you want to send error reports to Microsoft and click “Next”
veeam7061614-step9

  • a. Install will now begin to run

10. Once Installation completes, click “Close”
veeam7061614-step10
11. Navigate back to the root of the disc drive then locate and run “Setup.exe”
veeam7061614-step11
12. Click on install for “Veeam Backup & Replication”
veeam7061614-step12
13. Click “Next” through the initial setup screen
veeam7061614-step13
14. Read and accept the license agreement and click “Next”
veeam7061614-step14
15. If you have a license key add it now, otherwise click “Next”
veeam7061614-step15
16. Choose the program features to install. Click “Browse” button to change the installation to the secondary drive (you will have to make a new Folder name “Veeam” followed by “Backup and Replication” inside of it). Click “OK” then click “Next”
veeam7061614-step16
veeam7061614-step16-2
17. If any of the components that are required show a status of “Failed”, click the “Install” button
veeam7061614-step17

  • a. Once the installation completes the status will change to “Passed” then click “Next”
    veeam7061614-step17a

18. Enter the domain\username and password of the account Veeam will use to access vCenter and click “Next”
veeam7061614-step18

  • a. This user should be a local administrator on the server running Veeam or you’ll receive this message
    veeam7061614-step18a

19. Choose “Use existing instance of SQL Server”, select the Server\Instance and then enter a name for the Veeam database. Click “Next”
veeam7061614-step19

  • a. If the domain\veeam account isn’t in the Veeam Admins group, you will receive the following error that the user account “lacks CREATE ANY DATABASE permission”
    veeam7061614-step19a

20. Note the ports for Backup service and Catalog service and click “Next”
veeam7061614-step20
21. Change the “vPower NFS” directory to the secondary drive by clicking “Browse”, then navigate to the D:\Program Files\Veeam\Backup and Replication” then create a new folder inside named “NfsDatastore” and click “OK”.
veeam7061614-step21

  • a. For Guest file system catalog, click Browse and create a new folder named “VBRCatalog” under the D:\ drive. Click OK then “Next”
    veeam7061614-step21a1
    veeam7061614-step21a2

22. Review the configuration and then click “Install”
veeam7061614-step22
23. Once installation completes, click “Finish”
veeam7061614-step23
24. Now that Veeam is installed, let’s upgrade it to the latest patch. On Veeam’s website, download the latest patch for the version you’re running (Patch 4 for this writing) and copy it out to the server running Veeam.
25. Run the executable for this patch
veeam7061614-step25
26. Click “Next” through the first screen of the patch wizard
veeam7061614-step26
27. Click “Install” to begin the installation
veeam7061614-step27
28. Once the patch is installed, click “Finish”
veeam7061614-step28
29. Now that Veeam is installed and fully patched, locate Veeam Backup & Replication and open
veeam7061614-step29
30. You will receive a message about components that need to be updated (vPower NFS, Transports, Installer, etc). Click the check box next to the server and click “Next”
veeam7061614-step30
31. Click “Finish” once the components have been updated
veeam7061614-step31
32. Click the menu button and then click on “Options”
veeam7061614-step32
33. Click the check box for “Enable e-mail notification” and then enter your SMTP server, from email and to email. Click “OK”
veeam7061614-step33
34. Click on “Virtual Machines” towards the lower-left of the window and click “Add Server”
veeam7061614-step34
35. Click on your Server type (VMware vSphere for this writing)
veeam7061614-step35
36. Enter the name or IP of the vCenter server and click “Next”
veeam7061614-step36
37. For credentials, click “Add” then enter the domain\username and password for the Veeam account used to connect to vCenter. Click “OK” then click “Next”
veeam7061614-step37
38. Once the server has been added, click “Finish”
39. By default, the folder all VM backups are stored in is “C:\backup”. To change this before you create any backup jobs is to click on “Backup Infrastructure” towards the lower left of the window then click on “Backup Repositories”
veeam7061614-step39
40. Click the “Add Repository” button towards the top-left
veeam7061614-step40
41. Name your Backup Repository and click “Next”
veeam7061614-step41
42. Choose the type of repository (Microsoft Windows server) and click “Next”
veeam7061614-step42
43. Click the “Populate” button then select the backup drive and click “Next”
veeam7061614-step43
44. Enter the folder name (I took the default of D:\Backups) and click the populate button to see the capacity and free space of the drive. Limit the max concurrent tasks and/or data ingestion rate and click “Next”
veeam7061614-step44
45. Ensure vPower NFS is enabled and click “Next”
veeam7061614-step45
46. Review the settings and click “Next”
veeam7061614-step46
47. Once it completes, click “Finish”
veeam7061614-step47
48. Once the new repository appears, click the Menu button in the top-left corner and then click “Configuration Backup”
veeam7061614-step48
49. Change the Backup repository to the newly created repository and click “OK”
veeam7061614-step49
50. Right click on the “Default Backup Repository” and click “Remove” and click “Yes” to confirm delete
veeam7061614-step50
51. Now that a new repository is created, we need to enable deduplication on that folder. Open Server Manager, click on “Manage” then choose “Add Roles and Features”
veeam7061614-step51
52. Click “Next” through the “Before you begin” screen
53. Choose “Role-based or feature-based installation” and click “Next”
veeam7061614-step53
54. Choose “Select a server from the server pool” and select the current server then click “Next”
veeam7061614-step54
55. Expand “File and Storage Services”, then “File and iSCSI Services” and then check the box next to “Data Deduplication” and click “Next”
veeam7061614-step55
56. Click “Next” through “Features”
57. Click “Install”
veeam7061614-step57
58. Once installation is complete, click “Close”
59. Back in “Server Manager”, click on “File and Storage Services”
veeam7061614-step59
60. Click on “Volumes”, right-click the drive that we’ll be enabling dedupe for and choose “Configure Data Deduplication”
veeam7061614-step60
61. Set data deduplication from “Disabled” to “General purpose file server”, change “Deduplicate files older than (in days)” to 0.
veeam7061614-step61

  • a. To exclude folders from being deduped on that disk, click the “Add” button, expand the “Z:\” drive, and select each folder to prevent deduplication. In our setup, only backups are going to the Z:\ drive so we’ll skip this
  • b. Click “Set Deduplication Schedule” and then check the box for “Enable throughput optimization”. You will set the schedule for when dedupe runs. This should run when your backups are NOT running. My backups run OUTSIDE business hours, so dedupe should run DURING business hours. Click “OK” when finished and “OK” again
    veeam7061614-step61b

Now that Veeam is setup and connected to vCenter and we have a backup repository created with dedupe enabled, let’s take a look and see what kind of savings we get when we take our backups. One thing to note is that you won’t see much dedupe savings on a single backup file, but on a long backup chain and multiple backup jobs is where the real savings starts to come into play.

I have configured backups of 2 of my Exchange 2013 servers to run every 6 hours and keep 28 restore points (7 days). This backup job is set to “Reverse incremental” and Veeam is performing inline dedupe, compression set to “Optimal” and optimized for “Local target”. My first full backup was 36.3GB. Over the next 3 days, I have taken 12 more backups for a total of 75.1GB.
veeam7061614-veeam1

After dedupe ran over the last 3 days, we see the size as 75.1GB, but Size on disk is only 10.5GB
veeam7061614-veeam2

This is where it gets a little interesting though. In powershell, running the command “Get-DedupStatus” only shows a savings of 14GB. I’m not sure which one is accurate, but even a savings of just 14GB in one backup job is an improvement. Since Windows Server 2012 deduplication runs across all files on a volume, you will see increased savings for every new backup file that’s created for every job that writes to that backup repository.
veeam7061614-veeam3

Align Virtual Machine Disks with NetApp’s MBR Tools

In most environments I’ve been in, disk alignment is something no one knew about or no one cared about. There are still plenty of Windows Server 2003 VMs out in the wild and I’m sure few people realize the impact these misaligned disks have on their storage arrays. There are a few different ways to fix this issue (which are listed in the link above) as well as using VMware Converter which has the option to optimize the partition layout during conversion. For this post we’ll focus on using NetApp’s MBR Tools and mbralign.

This documentation assumes you have the NetApp Virtual Storage Console (VSC) plugin connected to your vCenter instance. If you have an active NetApp account you can download it directly from the NetApp website.

1. Login to the vSphere client
2. Click the Home button in the top-left corner
step2
3. Click on “NetApp” under Solutions and Applications
step3
4. Click on the “Tools” link on the left side under “Monitoring and Host Configuration”
step4
5. Click the “Download” button for your version of ESX(i) and the location on your system to save it to
step5
6. Enable SSH on the ESXi host that currently hosts the VM to be aligned

a. Under “Configuration” tab for the host, click on “Security Profile” under the “Software” section. Click on “Properties” towards the top right corner. Scroll to “SSH” and click on “Options” then click “Start”

7. Click on “Storage” under “Configuration” for that ESXi host and locate a datastore (an NFS volume for this documentation) to upload the MBR Tools to.

a. Right click and choose browse datastore. Then Click the Upload button and upload the .TGZ
step7a

8. Open your SSH client (Putty) and connect to the ESXi host
9. Type the following commands

a. cd /vmfs/volumes
b. ls
step9b
c. Locate the datastore you uploaded the “mbrtools_esxi.tgz” to (ISO_Templates for this writing) and change directory to that datastore
d. cd ISO_Templates

10. Run the following command (Note the directory will show the ID of the volume, not the name of the volume)

a. tar xvzf mbrtools_esxi.tgz
step10a

11. Run the following command replacing the ID of the datastore with the ID of the datastore you’re using

a. cp -r /vmfs/volumes/26ee88d8-9323fd52/opt/ontap /opt/ontap

12. Change directory to the datastore hosting the VM that needs alignment

a. Cd /vmfs/volumes
b. Ls
c. Cd /vmfs/volumes/volumename
d. Ls (to find the folder name)
e. Cd VM_FolderName
step12e

13. Locate the VMName-flat.vmdk file and run the following command

a. /opt/ontap/mbrscan Test-Alignment-flat.vmdk (You should see “aligned:No” at the end)
step13a

14. Before running the alignment, verify these items FIRST!

a. THERE IS AT LEAST AS MUCH SPACE FREE IN THE DATASTORE AS THE SIZE OF THE DISK
i. If the disk is 50GB, there needs to be 50GB free
b. THERE CAN BE NO SNAPSHOTS OF THE VM IN VCENTER (Delete any snapshots that exist first)
c. THE VM MUST BE POWERED OFF PRIOR TO RUNNING THIS.

15. After all that has been verified, run the following command replacing the VM disk name

a. /opt/ontap/mbralign Test-Alignment-flat.vmdk
b. Press “y” to confirm there are no snapshots

16. Run the mbrscan command from step 13 to verify that disk is aligned
step16
17. Power on the VM and login. You will likely receive a message about installing new devices and system settings changes. Click Yes to reboot the VM.
18. Once you have verified functionality for the VM, remove the mbralign backup files created in the datastore with the following command

a. “rm *-mbralign-backup”
step18a

 

The time for alignment varies based on the size of the disk. This process is fairly straightforward and quick to run. When you have a VM with multiple disks or just a lot of VMs to complete it is often times faster to use VMware Converter.