Unable to Install Hyper-V on VMware VM

Setting up a test environment recently I ran into a bit of an issue installing the Hyper-V role on a Server 2012R2 VM that I have running in my home VMware test environment.  When I would attempt it, I received the following error:

After doing a little Googling I came across this article.  It explains the long way of doing things, but in the comments was a much quicker and easier way which I tested and proved to work.

Start by shutting down your VM and selecting the Edit Settings option.  When the window appears select the VM Options near the top, expand the Advanced section, and select the “Edit Configuration…” option next to Configuration Parameters.

Another windows will pop up and you will need to select the “Add parameter” option on the top left.  Add the following two parameters:

Key = hvh.enable       Value = TRUE

Key = hypervisor.cpuid.v0        Value = FALSE

Save all of your changes, start your VM back up, and install the Hyper-V role.

Configuring Barracuda Backup Agent to use Microsoft VDI to Perform Incremental SQL Backups

As I may have mentioned, my company is currently testing out a Barracuda Backup Appliance and I have been going through the ropes of getting everything operating the way it needs to be for our environment.  One issue I came across along the way was that my SQL machines were not having their transaction logs truncated when I ran a “Microsoft SQL” backup.  Come to find out that the Barracuda Backup Agent is by default configured to use Microsoft VSS, which has it make Full and Differential backups rather than Full and Incremental backups created when using Microsoft VDI.  For a good explanation of the difference between backups, read this MSDN explanation.  The following is a good definition of Microsoft VDI provided in the comments here:

“SQL Server provides an API called Virtual Backup Device Interface (VDI) that enables independent software vendors to integrate SQL Server into their products for providing support for backup and restore operations. These APIs are engineered to provide maximum reliability and performance, and support the full range of SQL Server backup and restore functionality, including the full range of hot and snapshot backup capabilities.”

Mind you the differential is perfectly fine if all of your databases are in Simple recovery mode.  If your databases are in Full recovery mode, incremental backups are the way to go from what I understand.  This is also Barracuda’s recommendation (found here).  So, to fix this issue we have to manually change the configuration file for the Barracuda Backup Agent on the SQL server itself (Barracuda KB Article).

Start by stopping the Barracuda Backup Agent service.  Then navigate to C:\Program Files\Barracuda\Barracuda Backup Agent\config and edit the config.ini file.  Under the configuration section add the following (add a configuration section if it is not present):

[configuration]

vssSqlVersion=20

Save and close the file and go back to services and start the Barracuda Backup Agent service.  Now go to your Cloud Control and navigate to your backup schedule.  Under “Items to Backup” expand your SQL server and you should now see Microsoft SQL Server and Microsoft SQL options.  Clear the Microsoft SQL option and select the Microsoft SQL Server and save your settings.  You should now be good to go!  The Microsoft SQL option will remove itself from the Items to Backup options moving forward as seen below.

Microsoft SQL: Query Last Time Transaction Log was Truncated

Use the following Query:

It will output the following (where the backup_finish_date column is the last time the logs have been truncated):

Source

VMware ‘VssSyncStart’ operation failed: IDispatch error #8462 (0x8004230e)

At work I am currently doing a trial run with Barracuda’s Backup Appliance.  I got it racked and configured (with quite a bit of annoyance since you have to call their support to bond NICs) and kicked off the initial full backup and received the following “Unable to quiesce disk” errors.

Since I was already working with Barracuda’s engineer on the LACP and some upload throttles, I asked his opinion on the matter.  Long story short he pretty much told me to investigate VMware and I’ll probably find the issue, and that I did.  When I tried to manually take a snapshot selecting the “Quiesce guest file system (Needs VMware Tools installed)” I received the following error:

The guest OS has reported an error during quiescing. The error code was: 5 The error message was: ‘VssSyncStart’ operation failed: IDispatch error #8462 (0x8004230e) 

Digging through the VMware forums I found that my issue was with the Volume Shadow Copy Services Support part of VMware Tools.  I uninstalled VMware Tools and re-installed, but instead of selecting a complete installation I selected Custom and did not install the Volume Shadow Copy Services Support.

Once that completed installing and I restarted the effected machines, the issue was resolved!

Create a Bootable USB for Dell Server Firmware Upgrades

I ran into an issue recently where I needed to upgrade some firmware on a Dell Server that I was unable to install an OS on, the circumstances surrounding that issue being a story for another time.  I did this by utilizing the Dell Repository Manager.

After downloading and installing the software, open the Data Center Version which contains all of the server models.  Start by Syncing the Database.  There should be a prompt on the top right of the application or select the option on the welcome page.

After that is complete, we need to create a new Repository for the model of server that we have.  Select the Create a New Repository option on the welcome page and give it a name (and description if you so desire).  Select the Dell Online Catalog as your base repository and hit next.  Select next keeping the defaults for the Select Brand page and then select the Linux (32-bit and 64-bit) option on the Select DUP Format page and select next.

Select your server model(s) from the list on the Select Models page and select next.  Select next on the Optional Components page and then select finish.  It will build the repository and give you the following message.

Select close and finish and it should open the repository for you.  If not select the My Repositories tab, check your new repository and select open.  Now select your components tab.  Find the firmware you wish to update (if you hover over a package you will get a description) and select all of the ones you need.  You can then select the Copy To option at the top.  This will give you a prompt where you should select the bottom option (Create a NEW Bundle in the same repository and add component(s) into it).

On the Name and version screen, be sure to select the Linux 32-bit and 64-bit option.  Then fill out all the other information appropriately as prompted and select finish.

Now that we have a bundle, we can make that into an ISO.  We’re getting close to the finish line!  Select the bundle and select Create Deployment Tools.  Select the Create Bootable ISO (Linux Only) option and select next.

Select next until prompted for a storage location.  Navigate to where you would like to store the ISO and select OK.  Select next a couple more times and then finish.  Once you see the job complete in the job queue you will have your ISO in your storage location.

Now that we have our ISO, you just need to make it into a bootable USB.  I personally use Rufus for this but it is dealers choice.  Then just boot to the USB on the server and you are off to the races.

Windows Server 2008R2 Update KB3161949 Causes SMB Issues

I have had this issue plaguing my help desk for a while now without being able to find the root cause.  Eventually, they convinced me it wasn’t the two particular MFP’s having issues (I have dozens deployed with no issues) and I started digging.  I came across the issues with KB3161949 while I was digging and saw that these two MFP’s hadn’t worked since I installed that update (let’s just make it easy and say until I came around WU’s were never done on servers).  Anywho, I just followed the instructions from the technet article, bounced the box, and when we tested the next morning it was right as rain.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters

Value Name: AllowNBToInternet
Type: Dword
Value: 1
Default value of the flag: 0

Veeam Error: Agent failed to process method {DataTransfer.SyncDisk}

The other night I had my Veeam box decide it was not going to backup my VM’s.  This, naturally, is unacceptable behavior!  The error I was getting was the following (I cut out all the junk from my environment):

Processing <VMName> Error: An unexpected network error occurred. Failed to write data to the file <StorageUNC>.vbk]. Failed to download disk. Shared memory connection was closed. Failed to upload disk. Agent failed to process method {DataTransfer.SyncDisk}.

Before you jump to the obvious, there were no network related issues.  I did some digging and I found the solution!  I apologize to the random blog that I found the solution from, I have since closed the tab and lost the link.  Anywho, the following directory needs to be empty:

C:\Windows\TEMP\vmware-SYSTEM

I had a log file left in the directory.  Cleared it out, bounced the box (because why not?), and kicked off a backup of all my VM’s which completed without issue.

Controlling Windows 10 “Bloatware” Apps

It is no secret that Windows 10 has a nasty habit of installing software that we do not want installed in our environments, and this seems to be something that Microsoft has no intention of changing in the near future.  The only “easy” solution is to get your hands on Enterprise LTSB, but then you do not get feature updates.  Anywho, presented with this issue and the fact that my customers only pay for Windows 10 Pro (shocker) I came up with a PowerShell script to only keep the apps that I dictate installed, with a little help from the Obi-Wan you all hear about so frequently.

A quick run-down for those who are not yet familiar with Windows 10 there are two types of packages that we are concerned with today; AppxPackages and AppxProvisionedPackages.  AppxPackages are the packages of the currently installed Microsoft apps for a particular Windows User Profile on the machine.  AppxProvisionedPackages are the pesky devils that install the apps upon new user profile creation on the machine.  Naturally, the latter are the ones we are most concerned with, but we want to ditch any of the AppxPackages that may linger on.

Also, I have included a quick check to make sure the PowerShell script will only run on Windows 10 1703 or lower.  This way I have time to test on the next version and make sure this script doesn’t screw anything up before I allow it to run on client machines.

When it comes to deployment I push with GPO and run the script at computer startup, but I run a batch script that copies the .ps1 file down to a restricted folder on the local machine first.  I do this because this script needs to run as system to be fully effective.  I also add the following arguments when running the script to hide the PowerShell window while it’s running.

Setting Up Apache Virtual Hosts

Apache is likely the most popular method of serving web content on the internet at the moment.  Chances are if you’re here (at my blog), you’re enough of a nerd to have heard of it before.  Basically Apache “compartmentalizes” its functionality and components if you will.  These “compartments” that are indicative of individual domains/websites are known as Virtual Hosts.  Once you have them (or just the one for starters) set up, you can set up all the websites you wish.

To begin, we need to install Apache.

After it finishes installing, we’re going to look at the Document Root under /var/www.  The Document Root is the top-level directory that Apache looks at to find content to serve, and is by default set to /var/www/html.  What we would like to do is make directories for the domains that we wish to serve.

We have created our Document Root directories but currently they are owned by root.  If you would like a sudo user that you have created to be owner do the following replacing sudouser with the account username.  Alternatively, you can use $USER:$USER and it will sub-in the value of the currently logged in user when you press enter.

 

Next we need to make sure that read access is allowed for our general web directory so that the webpages we plan to host can be served properly.

Now we’re going to move away from our Document Roots and switch gears to the Virtual Host Files.  Think of these as the recipe that the Apache engine follows when receiving a request.  These files specify the configuration of our virtual hosts and how the Apache web server will respond to domain requests.  These files are stored in /etc/apache2/sites-available.  By default Apache creates a Virtual Host File called 000-default.conf.  We are going to copy this to make our lives a little bit easier.

I personally like to keep everything named after the domain I’m using, but you can choose whatever naming scheme you would like.  Open the file in an editor with root privileges and you should get something like the following:

Obviously this information is a little generic and we want to customize it.  You’ll want to change the ServerAdmin and DocumentRoot values to match your virtual host.  You will also need (or may like to) add ServerName and ServerAlias.  You should have something like the following when you’re finished:

Save and close your file.  Now copy the newly customized Virtual Host File and sub out all the domain1.com for domain2.com, then save and close the file.

Now all that there is left to do is enable our new Virtual Hosts in Apache and some cleanup work.  Enable the Virtual Hosts with the following command:

Disable the Apache default site:

Finally, restart Apache to have all of our changes take effect:

Connect to WSUS Database

Had an instance the other day where I needed to connect to the database for WSUS on Server 2012R2, but I actually had no idea how to do it!  Luckily, we have the internet at our disposal.

First things first (although quite obvious) we are going to need to make sure that SQL Server Management Studio is installed on the WSUS box, available to download from Microsoft for free from here.  Once you have that installed, open it up as administrator and connect to the following using Windows Authentication:

np:\\.\pipe\MICROSOFT##WID\tsql\query

Select connect and wa-lah you should get connected assuming you are an administrator.  You will find a database named SUSDB, this is your WSUS database.