## Thursday, August 15, 2019

### How Adding Bourbon Raises The ABV In Beer

Effects On ABV With Alcohol Additions

Joe “Jomebrew” Aiello

Synopsis

This is a followup to my previous article where I provided information on how to spike flavored sparkling water to make hard seltzer.

This article explains the effects on a beers ABV when you add alcohol directly to the beer. We’ll show how to calculate the change in ABV of a beer when you add something with alcohol in it such as wine or distilled spirits such as Bourbon.

For example, what is the new ABV when I add 2 ounces of Bourbon to my 7% ABV beer?

I will also explain how to calculate how much alcohol, such as wine or distilled spirit, is needed to raise the ABV of your beer to a specific ABV. For example, how much alcohol is needed to raise a beer from 7% ABV to 8% ABV.

Of course, this is not limited to beer. You can calculate the amount of alcohol in a mixed drink too. I’ll explain that later.

Find the ABV Calculator Here- Look For ABV Adjustments

Why?

To have a relatively precise understanding of how much ABV is raised when I add alcohol to a beer. When I add alcohol such wine or a spirit like bourbon to a beer to achieve a taste profile I it raised the overall OBV of the beer. For those like me, knowing the effect on the ABV is interesting and a little compulsive.

In addition to knowing the effects on ABV when adding alcohol, I’ve been interested in knowing how much alcohol is needed to raise the ABV of a beer (or other beverages) to a specific percent of alcohol.

Does This Only Work For Beer?

These formulas can be used to calculate the change or how much is needed to raise the ABV in any beverage.

Where my previous article talked about spiking a sparkling water with no existing alcohol, this article shows you how to calculate raise the ABV of a beverage that has zero or some alcohol already.  It can also be used to spike your sparkling water.

The Problem

How much is the ABV of a beverage raised when adding a distilled spirit. We’ll call this New ABV.

How much alcohol is needed to raise the ABV to a specific ABV. We’ll call this Raise ABV.

We need to start with a few bits of information. These first values are common for either formula.

First, you need to start with the volume of the beverage. For this example, I have 120 ounces of of a Baltic Porter.

Next, you need the percentage of alcohol in the baltic porter. In the example, I am using 7%. We will use .07 for the calculations to keep it simple (7/100)

Now, you need to know the percentage of alcohol (ABV) of the distilled spirit. Here, I am using 80 proof vodka which is 40% alcohol. For the calculations, we will use .4 (40/100)

For New ABV, we need to know how much alcoholic liquid are we adding. We’ll use 2 ounces in this example.

For Raise ABV, we need to know what the target ABV is. We’ll use 8% ABV.

Finally! We have all the values needed to do our calculations.

Breaking Down The Calculation for New ABV

The Formula we worked out is ((A*C)+(Q*V)) / (A+V)*100 or

Where:
A = Starting Volume
C= Current ABV of the Beverage
Q = ABV of the Alcohol Being Added
V = Volume of Alcohol Added to the Beverage

As mentioned earlier, we’ll use the decimal value of the percentages:
A = 128
C = .07
Q = .4
V = 2

So, plugging the numbers into the formula, we get ((128*.07)+(.4*2)) / (128+2)*100 or

This means that when I add 2 ounces of Bourbon at 80 proof to 1 gallon of beer, It will raise the ABV by .5% (half a percent) increasing my Baltic Porter from 7% ABV to 7.5%ABV.

Breaking Down The Calculation for Raise ABV

The Formula we worked out is (R-C) / (Q+R)*A or

Where:
A = Starting Volume
C= Current ABV of the Beverage
R = Target ABV of the Beverage
Q = ABV of the Alcohol Being Added

As mentioned earlier, we’ll use the decimal value of the percentages:
A = 128
C = .07
R = .08
Q = .4

So, plugging the numbers into the formula, we get (.08-.07) / (.4+.08)*128 or

This means to increase my 7% ABV Porter to 8% ABV, I need to add 4 ounces of 80 proof Bourbon. Sure, we knew this already since 2 ounces added .5% we can simply double that. But now we can calculate it too.

Please note: The formula for Raise ABV breaks when the ABV of the Alcohol Being Added equals the Target ABV of the Beverage. So, Don’t try to add 40% ABV liquor to achieve a 40% ABV.

How does this relate to calories?

Distilled spirits at 80 proof / 40% ABV run 64 calories per ounce. Since we are adding 2 ounces of 40% ABV distilled spirit, we simply multiply 2 X 64 which equals 128 calories are being added to a gallon of beer. So, you are adding 1 calorie per ounce or 12 calories per 12 ounces of beer plus the calories already in the beer.

How can I calculate the ABV Other Drinks?

How about a shaken Margarita? This can be tricky and you may need to run through the calculations a couple times if you are using multiple liquors with different ABV.

Take, for example a shaken Margarita. A common recipe is 2 ounces Tequila (80 proof), 1 ounce TripleSec (Dekuyper - 48 proof) and 1 ounce lime and about 1 ounce dilution from ice.

We have 5 ounces of volume.
2 ounces at 40% ABV
1 ounce at 24% ABV
1 ounce Lime at 0 ABV
1 ounces at 0 ABV

So, Add Tequila to the Ice and Lime and you have 4 ounces at 20% ABV. Now add 1 ounce Triple Sec and you have 5 ounces at 21% ABV.

That’s it. A Margarita using this recipe has about 21% ABV per 5 ounces which contains 1.05 ounces of alcohol. Compare to a 16 ounce beer at 6.5% ABV contains about the same alcohol.

Say you drop a 1 ounce shot of Jameson in your Guinness. What is the resulting ABV?

You have a 12 Ounce Guinness at 5% ABV. You add 1 ounce Jameson at 40% ABV. Plug in those values to the New ABV formula and you get a 13 ounce beer with 7.7 % ABV.

So, I dumped a 25 ounce bottle of Cabernet into my 5 gallon batch of 7% ABV Brown Ale. What is the new ABV? Plug the values into the New ABV formula and you get 7.2% ABV

How about dilution? I added 12 ounces of flavored sparkling water with 0% ABV into 2 ounces of 40% ABV Vodka. What is my ABV? Plug the values into the New ABV formula and you get 5.7% ABV.

### Making Hard Seltzer Using Flavored Sparkling Water

Spiking Flavored Sparkling Water

Joe “Jomebrew” Aiello

Synopsis
Calculating the amount of distilled spirit to raise the ABV of a beverage to a specific percentage of alcohol by volume (ABV). All values are in ounces.

Why?
I started this seemingly simple task of calculating the amount of alcohol to add to flavored sparkling water to achieve 5% ABV.

There are several commercially available hard seltzers that come in several fruity flavors but I wanted to see if I can spike flavored sparkling water to achieve the same flavor profile.

I did not want to taste alcohol and wanted to the amount of alcohol to be specific. I’d also like to know the number of calories in my spiked beverage.

I did ferment sugar and make a hard seltzer the hard way but really, the sparkling waters are inexpensive and readily available. Why not just spike it?

Find the ABV Calculator Here- Look For ABV Adjustments

How Does This Relate To Beer
The problem transcends just hard seltzer too. I’ve long pondered how much alcohol is needed to raise the ABV of a beer. I also ponder how much the ABV changes when I add bourbon to my beer however, this formula isn’t for that.With some tweaks, the formula could be used though.

The Problem
How much distilled spirit is needed to raise the ABV of a beverage to a specific ABV? You need to start with a few bits of information.

First, you need to start with the volume of the beverage. For this example, I have 12 ounces of sparkling passion fruit flavored water.

Next, you need the percentage of alcohol you want the final beverage to be. In the example, I am using 5%. We will use .05 for the calculations to keep it simple (5/100)

Now, you need to know the percentage of alcohol (ABV) of the distilled spirit. Here, I am using 80 proof vodka which is 40% alcohol. For the calculations, we will use .4 (40/100)

Finally! We have all the values needed to do our calculations.

Breaking Down The Calculation
The Formula we worked out is A*R/Q-R or

Where:

A = Starting Volume
R = Target ABV of the Beverage
Q = ABV of the Distilled Spirit

As mentioned earlier, we’ll use the decimal value of the percentages:
A = 12
R = .05
Q = .4

So, plugging the numbers into the formula, we get (12*.05)/(.4-.05) or

This simplifies to .6 / .35 which equals 1.71.

So, we need to add 1.71 ounces of 80 proof vodka to the 12 ounces of sparkling water to achieve a 5% ABV beverage. Our new total ounces is 12 + 1.71 which is 13.71 ounces.

There is it! My 13.71 ounce Passion Fruit Hard Seltzer at 5% ABV.

Wondering how many calories are in the beverage? Pure alcohol has 246 calories per ounce.

Distilled spirits at 80 proof / 40% ABV run 64 calories per ounce. Since we are adding 1.71 ounces of 40% ABV distilled spirit, we simply multiply 1.71 X 64 which equals 110 calories per 13.71 ounce Hard Seltzer.

Looking at raising the ABV or a beer by 1% to take my Vanilla Porter to an Imperial Bourbon Vanilla Porter, I’ll need to know how much beer I am starting with.

I’ll want to user 90 proof Bourbon.
I want to raise the ABV by 2%

The quick formula is (640*.02)/(.45-.02) since I have 45% ABV Bourbon and 5 gallons is 640 ounces.

Raising by 2% ABV. I will need 13.4 ounces of Bourbon or about ¾ of a pint! That is almost half a 750ML bottle. I think that will be a bit too much Bourbon.

## Thursday, May 9, 2019

### VMWare PowerCli Get All VMs In A Cluster On A Specific Datastore

I'm a novice using VMWare PowerCli so I use a lot of Google searches to figure out the complex and challenging PowerCli commands.

What I was trying to do was migrate / move all VMs in a cluster from one datastore to a different datastore.  I had 200+ VMs spread across 16 servers to move. Doing this via the console has its own challenges mostly the web clients both are cumbersome to use.

My biggest challenge was getting a list of VMs by cluster AND datastore. I thought this would be easy. Just use "get-vm -location XXX -datastore YYY".  But no, that returns VMs in the cluster or on the datastore. That list of 500 VMs.

I was never able to figure out how to get the list I wanted so I just brute force tried to move every one of the 500 VMs. If they were already on the target datastore, then it just finished and moved onto the next VM.  If the VM was NOT on the source datastore, then it failed and moved on to the next VM.  Those on the source datastore were moved.  Not very deterministic but it worked.

I continued to investigate how to do this trying to figure out the the API doc which is really a pain to use as well. Luckily Google has all the answers.

With the help of a blog post from 2102 by psvmware I was able to get the list of VMs I sought. I am pretty sure this can be used for different objects but I didn't mess around with that yet.

The command looks like this
Get-Cluster "MyCluster"|Get-vm |?{(\$_.extensiondata.config.datastoreurl|%{\$_.name}) -contains "SourceDatastore"}| select -expandproperty name
This returns only the VM name which can be used to move the VM

Here is my simple script that get s a list of VMs in a  cluster on a specific datastore then sorts the VMs by name ascending order and moves them to a different datastore. I actually used 2 scripts. One that sorts ascending and one that sorts descending so I can run them both and move 2 VMs at a time eventually running into each other. (when they both tried to move the same VM, one just waited for the other to finish).

\$vchost="my.vcenter.server"
\$vcuser="myUser"
\$srcdatastore="mySrcDatastoreName"
\$vccluster="myClusterName"
\$dstdatastore="myDestinationDatastoreName"
\$vm = Get-Cluster "\$vccluster"|Get-vm |?{(\$_.extensiondata.config.datastoreurl|%{\$_.name}) -contains "\$srcdatastore"}| select -expandproperty name |sort-object -ascending
foreach (\$i in \$vm) {
move-vm \$i -datastore \$dstdatastore -DiskStorageFormat thin
}

## Friday, March 15, 2019

### Craft Beer and My Life - Hoppy Brewing

Several years ago, I think it was 1994, at the Northern California Small Brewers Festival in Mountain View, California I was a volunteer beer pourer as I had been in other festivals. This festival was known to be one of the more rigid ones in the bay area (where the Pleasanton was pretty loose and a lot of fun).

I was pouring for the brewery E.J. Phair.  The owner and brewer was JJ Phair. We got along quite well as I had been visiting dozens of micro breweries for a couple years and had quite a bit of experience with  (what would be later called) craft beers.  Especially hoppy beers. back then, hoppy beers were unusual and blacked hop flavor and aromas with bitterness was not yet mature in the micro brew scene.  JJ and I had quite a bit of fun tasting the various beers being poured at the festival.

While pouring for JJ, I kept my water glass in the bucket of ice with the kegs. I've never been a fan of drinking water from plastic as I always felt it was wasteful, unnecessary and left a plastic taste. So, I drink from glass (and stainless these days). Well, someone from the festival came by and reminded us I can't drink beer while pouring. Of course we said we weren't and I was only drinking water which I showed them.

A bit later, JJ excitedly came back to his taps and told me I had to go try Hoppy Face Amber from a new brewery Hoppy Brewing. So, I went over, used a token and got a sample. I don't remember the beer but I do remember a wow factor and that it the hop aroma and flavor were huge.

Moments after I returned to JJ's taps, 8 or 10 festival "security" descended on us and demanded I stop pouring and handover my volunteer shirt. It was quite comical to me. I once again demonstrated I was drinking water but they went on about drinking beer while pouring and then pointed out I had just went over to Hoppy Brewing (I removed my shirt first) while I wa "on duty".  Rightfully so, JJ went ballistic. The folks argued heavily with them.

JJ explained he sent me over to try the beer but they were unrelenting. JJ decided he would leave the festival and take his beer with him. They tried to stop him saying he had donated the beer. I recall him saying maybe so but not his kegs. I'd like to remember that he then poured all his beer out but I don't think that happened.

I let JJ know I would be fine getting booted but he wouldn't let them treat me like that.  I was escorted out by 7 or 8 staff as if I was some big threat. the people and circumstance is just as laughable now as it was back then. I don't know what happened after that.

I continued to support E.J.Phair everytime I see it. I did get to see JJ again several years later and he kind of remembered or at least he was considerate enough to remember. We sampled his Helles right off the bright tank and it was fantastic!

I do remember that Hoppy Face Amber. They still make it today. Funny enough, I haven't had it since. I think it is time!

## Friday, March 8, 2019

### Craft Beer and My Life - 20 Tank

20 Tank Brewery Nearly Changed My Life

I was first introduced to craft beer around 1988 by a new found friend, Brian. Until then my exposure to beer was typical American homogenized light lager with the occasional import such as Heineken. I usually just followed my brothers lead. At first, we were Michelob fans. To us, this was kind of a premium beer. I was not much of a beer fan. My father didn’t drink much and I don’t recall anyone in my family drinking much beer. My older brother, who is a couple years older than me, was pretty much my guide. There was not much to choose from so his leadership role was pretty easy.

Sometime in 1983 Stroh’s beer came to our area. For some reason, this became our favorite beer. Probably because it was simply new. I remember thinking it was so plain. It was not any different than the other american beers but certainly not stale like the german beers. Not long thereafter was my 21st birthday. The love of my life at the time was Lori. Her family had moved about two hours north a year or so earlier. I was not entirely sure what was happening with our relationship. The distance was a strain but breaking up was a foreboding. She arrived to help celebrate my birthday bearing my favorite cake. Upon cutting into the cake, I realized it was not cake but a 12 pack of Stroh’s. It made me realize talked about Stroh's a lot, I guess though I don’t remember. I also realized it was time follow a different path than Lori. I don’t know if or how we ever broke up. I am pretty sure we did. I don’t recall ever seeing her again. I don’t know if I ever drank the 12 pack either.

Not much happened in my beer scene until i started a job in San Francisco three or 4 years later. Some time around 1988 I worked with Brian. Through sketchy memories, I recall conversations with Brian about the new craft beer revolution. Brian was also the first to talk about homebrew. Though I don’t recall much of conversation 25 years ago, I do remember Brian talking about exploding bottle in cupboard. I don’t think I ever tried any of his beer nor enjoyed the experience of exploding bottles. I do think fondly of him when I reminisce about the my first craft beer experiences.

My most vivid memory is our first visit to a new brewery in San Francisco; 20 Tank. There were three of us. Myself, Brian and John. I don’t recall how familiar John was with craft beer but I don’t think he was much of a drinker. I clearly remember a Red/Amber ale that was a bit coarse and kind of sweet. I also remember a powerfully bitter assault on my palate from an IPA called War Boner or something like that. This particular night, we sat upstairs and did an all out blitz on these delightful beers. The laughter was pain inspiring and I still snicker at the thought of chili but I don't know why. There is a permanent hilarious imprint burned into my psyche. I can’t help but smile now.

The three of us staggered out to the street and fell into a taxicab. I looked out the window and can still see the bright lights from inside the brewpub illuminating the building with 20 TANK BREWERY in big bold letters. I was dropped of at the train station and somehow made it onto a train and ended up home though there is no recollection of how or when.

I visited 20 Tank a few more times. I met the brewer and talked beer. He went on to start 21st Amendment Brewing some time later. I mostly recall the last time I was there. I was with a spectacular woman; Judy. We met at work. She shared an office with another strikingly beautiful woman. I don’t recall her name but I will call her Kim. I became friends with Kim often chatting on our train ride to or from work. Kim was just honest and sweet and engaging. At times, it was comical as to how many guys would ask me how I know Kim. There was real shock that a woman this beautiful would be friends with me I guess. There was a bit of fun sport in all of it and I did enjoy being in such company. I would, at times, visit Kim’s office for no particular reason just to say hi. It was there I met Judy. She was tall and slender and though different equally as striking as Kim. Two great reasons to find a reason to visit them. It doesn’t seem real but somehow I asked Judy to go out or maybe she asked me. I do know she agreed to and even picked me up though I don’t know why. We had a great time at 20 Tank and at the end of the night we walked to her car hand in hand.

I was in inner turmoil. I was on the cusp of maybe starting to date another woman. This other woman had a grip on my heart. I really enjoyed this evening with Judy but could not stop thinking of the other woman either. As Judy and I sat in her small car, just inches from one another, I explained this terrible predicament. Any other time, I would have not hesitated to take things as far as they would go with Judy. Instead, I talked about this other woman and how things were starting to blossom and I had to follow that path. It was awkward for sure. I did tell her I didn’t expect we would get on so well and I was not really prepared to have such a great date. She dropped me at the train. I spent the next hour and a half wonder if I was a fool. I married that other woman a few years later and we are still happly married today. I sometimes wonder what became of Judy. I do know 20 Tank closed in 2000.

That visit to 20 Tank almost changed my life.

## Monday, February 25, 2019

### Migrating to VMware 6.7 vCenter - xVmotion

I've had two 6.0 Windows vCenter instances with external MSSQL databases for quite some time. I've been reluctant to move to 6.5 due to the end of life of the desktop client. The workflow of the desktop client as well as sleek interface is unmatched and, apparently, un doable in the web browser interface. Further, we have had many issues with browsers and seems to have to switch every so often because one just stops working.

As time progresses, so we must adapt to changes even though they are backwards in ease of use and likability. The interface to 6.7 brings no improvements over the desktop client and only stunked workflows and heaps of frustrations.

I opted to deploy a new 6.7 vCenter appliance with embedded PSC and planned to migrate between vCenters.

• Partly because I am moving to a different Microsoft AD.
• Partly rather than assign AD users access to VM folders, I created security groups in AD and assigned groups to vcenter resources. users are placed in AD security groups that correspond to vcenter resources.
• Lastly, I planned to implement Distributed Virtual Switches and Distributed Virtual Port Groups which are supposed to make it a lot easier to deploy new hosts.

First, distributed switches and port groups is a huge pain in the ass. I am shocked how complicated it is to deploy and how neither web interface (Flex or HTML 5) visualizes the configuration well. I wonder if the UI designers went on vacation and engineers put together the interface. Unscrewing my hosts of distributed switches caused so much grief, it was easier to reinstall ESXi and start again.

Then, I was burned buy licensing. I made a big mistake. I used the trial license when configuring distributed switches. When I went to license my host just before it expired, I was shocked to be rejected as has Standard licenses and not Enterprise. So, I slowly unwound the configuration and though I am not sure what I did and can't do it again, I was able to detach the host from the distributed switch and port groups, crease new standard switches and port groups and eventually delete all traces of the distributed switches and port groups. NOTE: If you do this, you will need console access to the host to reassign the management network to the NIC. Maybe it is easier if you have two NICs in the vswitch but I have just one.

Before unwinding the distributed switch, I tested XVMotion fling to migrate VMs from Old vcenter to New vCenter. Again, I ran into issues.

• First, there was a MTU issue that took way too long to figure out but was a big problem on 6.7 but not 6.0.
• Next was duplicate folder names in a cluster. If you have, say, four folders A,B,C and D and under B you have a folder name A, xVmotion pukes. Well, you don't see any target folders and you have no idea why.
I successfully moved one cluster and about 100 VMs. I'd like to have been able to filter source VMs by folder rather than just a search which would have made moving a whole folder a lot easier.

When I tried to migrate on my next cluster, I ran into more problems.
• I think this have been because DRS on the new vCenter cluster was not enabled
• License not available to perform the operation
• After enabling DRS started getting this error. I made sure the new host had a license. Problem persisted. Turns out the source host had a Standard license who doesn't support vMotion. How stupid is that? Once I applied an Enterprise license to the source host, I was able to migrate VMs.
Recap:
• Be careful using the evaluation key. It can bite you later
• You need Enterprise licenses to migrate VMs across vCenters
• Triple check all MTU setting on hosts and switches
• Make sure you don't have duplicate folder names
• Keep an eye on both source and destination vCenter event logs to identify where an issue may be arising from. I tended to think it was destination
• Make sure you have DRS on both source and destination
• Make sure host NICs enable vMotion

## Friday, December 14, 2018

### Windows 7 to 10 upgrade Failure 0x800f0955 - 0x20003

Tech.. another techie article.  Maybe I'll go back to weird, personal, hiking, adventuring or beer brewing (and drinking) again one day.  For now, another pain in my ass with computers.  I do work with technology all day long.  Lots of different tech with servers and data centers, so I have a lot to bitch about.

This time, I've been trying to (free) upgrade windows 7 to windows 10. It seems to fail a lot.  Like fail, fail.

In a nutshell, running MediaCreationTool1809.exe (versions wil vary over time) from https://www.microsoft.com/en-us/software-download/windows10 allows you to create windows 10 media; ISO file which can be burned to a DVD-ROM or USB drive.  You can also just upgraded right from the tool which will cache the install files on your hard drive (you need 8GB free but really 12 or so).

So, I take the easy route.  Run the media creation to and select to upgrade.  The process is pretty simple.  It download files, stages an upgrade, reboots, starts the upgrade, does some updates, fails, rolls back (very cleanly/safely every time).  The code I get is 0x800f0955 - 0x20003 and some Safe_OS and Updates message.  I use google university to find what the error means, do everything everyone suggests and it fails.

Having done this several times now and spent hours troubleshooting, I've come up empty.  If only the upgrade would log exactly what it is doing when it fails, maybe we would fix it.  But it doesn't and I can't get around that problem.  However, I've still been able to upgrade several systems.  All you do is...

First, do some cleanup of your Windows PC.  Necessary?  Probably not. Works every time I do?  Yup.

Ok, first, you will need to install from a USB drive.  Sorry. You need a 8GB drive.  These are cheap and easy to use.  So, get one, insert it into a USB slot and run the media creation tool to create the installer USB drive.  When you are all done, you can delete everything form the USB and have some portable storage. Note: Booting from USB can be slowwww on older systems or not using USB 3.0 flash drive. Like a couple hours slow. It was only a few minutes with USB 3.0 drive and interface.

You can click cleanup if you want and scroll down to see the EASY part. You should cleanup first though.

Cleanup.   Open Windows Explorer.  Navigate to C:\Users.  Double click the account name you log in as. e.g. c:\users\jomebrew\
Click in the address bar and add \appdata.  Looks like this c:\users\jomebrew\appdata.  press Enter

Open Local, then open Temp.  Now your address bar shows C:\Users\jomebrew\AppData\Local\Temp with your account name of course.

Select everything in this folder  Click inthe right panel and click Edit / Select All.
Press the Delete key and click Yes.
Skip any files that can't be deleted.

In the address bar, click Local

Open Microsoft, then open Windows then open WER.  Delete everything in ReportArchive and ReportQueue.  If they are empty, move on.

Open ReportArchive then select all and press delete key and yes

Click the left (back) arrow or WER from the address bar then open ReportQueue.  Select all and press the delete and then yes

On the address bar, click Local Disk (C:)

Click click in the address bar and add program data.  it will look like this C:\ProgramData
Again,
Open Microsoft, then open Windows then open WER.  Delete everything in ReportArchive and ReportQueue.  If they are empty, move on.
Open ReportArchive then select all and press delete key and yes

Click the left (back) arrow or WER from the address bar then open ReportQueue.  Select all and press the delete and then yes

On the address bar, click Local Disk (C:)

Open Windows then open Temp

Select All then press the Delete key and click Yes.
Skip any files that can't be deleted.

On the Address bar, click Computer
Locate Local Disk C:.  Right click on this and select Properties (or highlight it and select File / Properties) Same thing.

Click Disk Cleanup.  Let it scan and when done, select all the boxes

Click Delete then Delete files.  This can take a while but will finish.

Make sure recycle bin is empty.

The EASY Part
Now that things are clean, navigate to the USB drive. Double click Setup.exe.
This seems to be the important piece,  On the first screen it asks Get Updates and Optional Features.  Select Not Right Now.  Then click Next.

Now click the appropriate options to finish the install. That's it!

Once Windows 10 installs, I select No to all the sharing options presented during the configuration steps.  Be sure to apply latest updates once windows 10 is done installing.

Note:  the installer spends a lot of time at 66% and 67%.  Be patient.

## Wednesday, August 22, 2018

### Fixing Windows 10 Missing systemprofile Desktop folder

I ran into an issue that seems to come from Windows 10 Updates.  Moments after logging in, I get a warning windows advising C:\WINDOWS\system32\config\systemprofile\Desktop is unavailable.  There is no desktop, just a task bar and recycle bin.

The problems stems from the relocation of the default desktop from c:\users\default to C:\WINDOWS\system32\config\systemprofile\ but the Desktop folder doesn't get migrated.  Thus, the error message.

I could not launch any program except task manager, so I worked out a convoluted procedure to launch a windows explorer instance and was able to show the now hidden Default user folder in c:\users, copy the contents and paste it in the new default user folder C:\WINDOWS\system32\config\systemprofile\default.

After following the procedure and rebooting.  I was able to log in and was back to my normal desktop.

Here is the procedure I followed.  It might be a bit overkill (copying all files in the default users folder but I only wanted to do it once.  Sorry, no images this time.

On the task bar (if you see one) or press ALT+CTRL+DEL and select task manager.
Click Browse
Locate Desktop in the left panel
Right Click and select Properties
Click Location
Click Find Target  (wait a little bit for an explorer window to open)
On the top Menu click View
On the far right, click Options
Folder Options will open.  Click View
Click the radio button Show hidden files, folders, and drives
Uncheck Hide empty drives
Uncheck Hide extensions for known folders and icons
Click OK
Click Users in the address bar (This PC > Local Disk (C) > Users )

You should not see the Default user folder along with any other user folder as della s a Default.migrated
Double click on the Default folder to open the folder
On the menu ribbon (the menu below the top ment with File/Home?Share/View), far right, click Select All (or click white space in the details panel asn press CTRL+A).  All files should be selected/highlighted
Right Click on any highlighted are and select Copy (or click Copy from the menu ribbon)

Navigate to C:\Windows\System32\Config   - You may get a security box to allow you to access the folder.  Click Continue
Click systemprofile   - You may get a security box to allow you to access the folder.  Click Continue
In the details white space, right click and select Paste (or click Paste from the menu ribbon)

Reboot - Press ALT+CTRL+DEl then click the power icon in the lower right and select Restart

## Tuesday, August 7, 2018

### Accessing VMFS Datastores from CentOS Live Linux

I've often run into issues with disk and other errors preventing me from getting VMs or other files off a VMFS volume.  I have used this process a couple times to retrieve VMs and other files when options for using VMware tools just are not enough.

This article assume the user has a decent bit of knowledge where to get things and how to work with their own servers.  For example, I don't describe how to boot your server from an ISO image.  I use remote tools to my server but you can burn a DVD, write an image and boot from USB, use an external drive, etc.

Next, Locate the epel repository rpm. You will download it later but it is good to verify the path first rather than debug it later.  Currently it is at http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm though the path and name may change.  if it does, I just work my way back up the file path in the URL until I find the change and navigate down from there.

Then, Locate the vmfs-tools package.  Again, you will download it later but verify the path and change the procedure below as necessary.  The package is currently at https://glandium.org/projects/vmfs-tools/vmfs-tools-0.2.5.tar.gz

Finally, make sure you have a SSH client.  I use teraterm but you can use putty or whatever you like.

Start by booting to the Centos ISO image.

Select Install CentOS 7.   Eventually you will be rewarded with a desktop.  From there, open a terminal window.  I right click on the desktop and select Konsole.

Elevate to root
su -

To make it easier to work with and make cut and paste commands easier, start ssh server
service sshd start

Now create a new user account and set the password.  I don't care the user name you use or the password. just remember them
passwd userx

SSH to the server
You can get the IP address using ifconfig

Elevate to root
su -

Now work from the ssh client and not the console anymore.

Create a mount path for the datastore.  Create and many as you want to mount VMFS volumes and use any path and name you want.  Here I had 2 volumes to mount so I created 2 mount points.
mkdir -p /mnt/dsk1
mkdir -p /mnt/dsk2

Download and install the epel repository package. This makes it easy to install the next couple packages.
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -Uhv epel-release-7-11.noarch.rpm

Install Libuuid, Libuuid-devel and gcc. say yes to all prompts
yum install libuuid libuuid-devel
yum install gcc

wget https://glandium.org/projects/vmfs-tools/vmfs-tools-0.2.5.tar.gz
tar zxf vmfs-tools-0.2.5.tar.gz

Compile vmfs-tools
cd vmfs-tools-0.2.5
./configure
make
make install
("make install" didn't actually install it in /user/bin so I execute it from the build path)
cd ~/vmfs-tools-0.2.5/vmfs-fuse or just cd vmfs-fuse

When mounting a an VMWare boot disk, there are several partitions.  The 3rd partition is almost always the datastore. In this example, I have 2 VMware disk (sdc and sdd).  Notice only 2 partitions on sdd.  This is not a bootable VMWare drive, justa  datastore drive.

Now, lets mount the volume.  I am mounting partition3 (the datastore partition) to the mount path I created previously.
./vmfs-fuse /dev/sdc3 /mnt/dsk1

If you want to see the partitions on the disk, use fdisk -l /dev/sdc or whatever the sd? device is.
fdisk -l /dev/sdc

NOTE:  The file system is read only.  So, you can't write. I am not sure why, I don't really need to write.

You can also run a a fsck scan of the volume to see if there are issues with the file system
cd ~/vmfs-tools-0.2.5/fsck.vmfs/
./fsck.vmfs /dev/sdc3

Now you can copy and view files on the VMFS datastore by navigating around /mnt/dsk1.

To copy files somewhere, you will need  a USB drive or a network file system mount.  I used a NFS mount.  e.g.

mkdir /nfs
mount 192.168.1.1:/vol/nfs /nfs

I wanted to copy off some VMs in hops of saving them, so I used rsync which shows progress and will continue on errors.
rsync -r --info=progress2 mnt/dsk1/myvm /nfs/myvm

Now that I am done, I cleanly unmount my datastores and reboot.
umount /nfs

## Wednesday, February 7, 2018

### MAC OSX Zero Free Space for VMWare Deduplication

Periodically working with virtual machines (vms),  enough files are created and deleted that the thin provisioned virtual disk (vdisk) expands to its maximum capacity even though the operating system (OS) file system shows free space.   This is typical and normal behavior.  Unfortunately, this consumes space on the underlying storage that is no longer being active used with the VM OS.

For years I have been using the sdelete.exe Microsoft SDelete tool that securely erases deleted files using the option to just write zeros to all remaining free space.  In Linux, I use the dd tool to read from /dev/zero and write to a temporary file filling all free space with zeros then deleting the temporary file.

These procedures simply write zeros to free space.  VMware and network storage systems will "see" these zeros and free allocated storage space to the virtual disk.  In essence, this shrinks the virtual file size on storage freeing unused space on the storage system.  Some advanced storage systems will automatically detect these zeros and automatically free the space.  Others you need to run a command line on ESXi to free the zeroed space.

The MAC OS has a couple ways to write zeros on free space.  The graphical disk utility in Utilities menu and a command line too.  I haven't had much luck with the GUI tool, so this procedure uses the command line tool.

First, open a terminal as an admin account.

type diskutil list to locate the drive you want to write zeros to.  In my case it is partition 2 on /dev/disk0.  Look for Apple_HFS macintosh HD.  the identifier for mine is disk0s2.

Now run the too and write some zeros

diskutil secureErase freespace 0 disk02

where...

secureErase = Secure Erace.  There are 5 levels, we want level 0 for single-pass zeros
freespace = only write zeros to free, unused space.  Does not affect files or OS
0 = secureErase level 0 single-pass zeros
disk0s2 = my partition that has my data

I have a SSD drive so it is pretty quick.    3 or 4 minutes.  The progress bar will indicate how long the zero write will take.  The estimate updates every few seconds.

When it is all done, use the vmware command line tool vmkfstool to free space that contains all zeros.  First SSH to the ESXi hot and login as root (there are other methods but I use SSH to esxi to run the command line tools).

For example on my VM, I used the command
vmkfstools -K /vmfs/volumes/datastore1/Mac_OS_Master/Mac_OS_Master.vmdk

The starting size of the VM was 105GB with used and non-shared at 95GB.  After zero write procedure, the provisioned size was still 105GB the used and not-shared were now 57GB.

If the VM has frequent file writes and deletes, the used space will slowly increase again and eventually warrant another shrinking.  If it is very frequent and expands the virtual disk to capacity in a short time, it may not be worth the effort to shrink the virtual disk.  It is up to you.

## Friday, May 19, 2017

### Automated Applying of Microsoft WannaCry Security Patch With PSEXEC

I needed to ensure we had this patch on hundreds of servers that are pretty much unmanaged.  I've used various tools in the past but had to figure out how to do it to my windows 8.1 and 2012R2 hosts. This applies to any manual patch really.

First, I used psexec from the sysinternal tools at Microsoft https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx.

I needed a way to get the update onto the machines without needing credentials to access a network share.  I figured out how to use powershell to copy the file from a web server I've already setup.

I copied the update msu file to the webserver with a simpler name and renamed it as a .zip file to eliminate issues with file transfer through the web server.  IIS will block the file unless you have a content type configured for the extension msu.

I created a simple text file with the IP addresses of all the hosts I wanted to patch.  one per line.  e.g.
10.10.10.1
10.10.10.2
10.0.0.3

Using the powershell command Invoke-WebRequest is like using wget.  Just define the output file and specify the web url of the file.

e.g. powershell Invoke-WebRequest -OutFile c:\temp\update.msu http://mywebserver/update.zip

With psexec, you should specify the full path to the file.  Finding powershell path is simple.  Just type where powershell from a command line.

The psexec command example for a list of hosts
psexec @buildshosts.txt -s -u username -p password C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Invoke-WebRequest -OutFile c:\temp\update.msu http://mywebserver/update.zip

Alternatively you can just issue it directly to a host
psexec \\10.10.10.1 -s -u username -p password C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Invoke-WebRequest -OutFile c:\temp\update.msu http://mywebserver/update.zip

Now that the patch was on the host, I used psexec to apply it using the standalone wusa stand alone tool. Since I know it is in the default path c:\windows\system32, I didn't bother to specify the path.

I included the /quiet and /forcerestart options to silently install and then reboot.

The patch update tool exits with code 1641 if the application and reboot was successful.

The process is done serially so, it takes a while to iterate through a large number of hosts.

There is a chance powershell is old and doesn't support the  Invoke-WebRequest option.

## Saturday, November 19, 2016

### Freaking Out About To Run Out Of Disk Space On My Nimble AFA

So I am moving workloads over to a Nimble All Flash Array and I notice I am out of free space.  Now I start freaking out afraid my critical VMs are about to start crashing.  I checked the Nimble GUI and I am only using 20% of disk space after compression and deduplication.   I know I am not running out but VMware doesn't.  There is the Nimble free space vs VMware free space.

As I start move workloads off Nimble, I already know the problem, just now what to do about it yet.  When the Nimble volume was created, we chose to allocate the entire capacity to a single volume that will be mounted on a cluster of VMWare hosts.  The total free space is 7TB.

As I run through the issue and ping my account SE and a friend who knows this stuff better than I, I consider how Nimble is supposed to represent actual free space.  Or better yet, how is it going to dynamically show the volume size?  Starting out, there is no compression and deduplication savings so, the volume size is the max size of free space.  While I want it to change the volume size dynamically based on actual dedupe and compression ratios, Nimble doesn't.

I proceed to the Nimble GUI and navigate to my single large volume.  As I iterate through volume configuration, I decide to change the volume size or at least see if I can. Right there above the volume size is a blurb of text  advising you can create a volume size greater the the free space because of deduplication and compression.  It would be nice it the GUI gave me some guidance on how big based on the current ratios, but it doesn't.  With nearly 5X space reclamation, I could probably choose 35TB.  So I choose 15TB for now.

Back in VMware vCenter, I rescan the volume on each host and try to resize the volume on each mounted host to no avail.  I make an educated guess and connect directly to a host.  I picked the first host I mounted and formatted the volume and attempt a resize from there.  Sure enough, it allows me to resize.  Back in vCenter, I go to each host again and rescan which now shows the 15TB of total space.  I cancel my storage vMotions that were abandoning the storage and go back to moving the final set of workloads back onto the Nimble.

Crisis averted and I never needed help for the SE or my expert friend.

The Nimble AFA has been performing incredibly well with sub millisecond latency.  My jobs are performing quite predictably which is critical for the workload.  Further, Nimble AFA is saving me around 30-45 minutes over the fastest time from my next gen hybrid array.  The Nimble AFA is a better match to the workload than the next gen hybrid array which experiences unpredictable latency causing my jobs to vary between zero and 6 hours or additional time.  Of course time will tell but so far, Nimble is stellar.

## Tuesday, October 18, 2016

### Free VMware ESXi Active Directory Problems

I have several free license VMware ESXi servers where I use Active Directory (AD) authentication to log in via the vCenter client.  I frequently find AD credential don't work (usually invalid password or authentication failed).

When I look at the Host Configuration / Authentication Services Setting tab, I see:
Directory Service Type                    Active Directory
Domain                                            Mydomain.Com
Trusted Domain Controllers                        --

The "--"  for domain controllers means it isn't talking to my DC.  I've spend hours digging though DC and ESXi logs trying to figure out why with no clear reason found.  We have had to take drastic actions such as leaving the domain which causes all the defined permissions to be lost and have to be recreated.   Rebooting usually works but that is very disruptive.

My star helper finally found a way to reconnect to AD that is fast, easy and non-disruptive.  Basically he kept searching through all the files on ESXi looking for anything to do with AD, domain and a dozen other keywords.  He found this gem!

/usr/lib/vmware/likewise/bin/domainjoin-cli

This is the script that joins the domain or rejoins when disconnected for some reason.

The usage is:

/usr/lib/vmware/likewise/bin/domainjoin-cli join

E.g.

I have automated this using plink and a simple perl based web page where we can enter a number of IP addresses and iterate through the list issuing the command via plink.  It usually works but when it doesn't, we ssh to the host and issue the command manually.

Note:  We have experienced AD issues on Vmware 5.5 and 6.0.  These are not issues with vCenter or licenses hosts.  I imagine stand alone licensed hosts would experience the same issue.

## Sunday, October 16, 2016

### Installing RaspberryPints on Raspian Jesse

I'v setup a couple Raspberry Pints (RP) on new Raspberry Pi 3 Model B.  While most of the configuration at http://raspberrypints.com/build-flow-meters-2/ is still relevant, there are a couple differences.

I have images below to show the code lines in files that are edited.  This blog tool does not allow me ti easily list code snippets which would make it a lot easier to copy and paste.

#### Step 5: Package Configuration Wo/Flow Meters

The path to autostart has changed.  From the pi home directory, edit the following file
 .config/lxsession/LXDE-pi/autostart

Use the following entry to load Chromium in kiosk mode and instruct Chromium not to display the unsafe shutdown message on restart.

 @chromium-browser --incognito --kiosk localhost

#### Apache2 Default Document Root Directory

Apache2 default document root is /var/www/html.  you can choose to install Raspberry Pints in that directory or change Apache2 configuration.  I chose to change Apache 2 configuration.

Edit /etc/apache2/sites-enabled/000-default.conf and change

DocumentRoot /var/www/html to DocumentRoot /var/www

## My Changes to Raspberry Pints

I make a few changes to Raspberry Pints to suit me needs.

RP does not refresh the browser on my systems.  Once taps are updated the page needs a manual refresh.  I add a refresh every 60 seconds to automatically pickup tap changes.  There is a refresh.sh tool that I expect should refresh but doesn't work on my system.  Maybe because xdotool isn't installed.

Edit /var/www/index.php

Add the meta refresh tag as show in the as shown below

#### Automatically Mark Kegs as Clean When A Keg is Kicked

I don't manage kegs and don't care about the keg feature.  I just want to show my taps.  The process to kick a keg and tap a new beer is a bit tedious especially at a festival.  So, I automatically mark a keg a clean when I kick it.

I prefer to backup the original instruction.  Find and add a # to comment out the following line and add the line afterwards.  It is easiest to copy and paste the first line then add the #.  Change NEEDS_CLEANING to CLEAN

 #\$sql="UPDATE kegs k, taps t SET k.kegStatusCode = 'NEEDS_CLEANING' WHERE t.kegId = k.id AND t.Id = \$id"; \$sql="UPDATE kegs k, taps t SET k.kegStatusCode = 'CLEAN' WHERE t.kegId = k.id AND t.Id = \$id";

Most people already know what the columns mean.  I can get some more screen real estate by removing the column headers.  the following simply adds comment tags to not display the header.

Edit /var/www/index.php
Around line 111, locate the thead tag and add the !-- as show below.  Then locate the closing /thead tag and add the --> as show below.

#### Rearrange Columns to List Beer Name after the Tap Number

This is a bit more complex.  I recommend backing up index.php before making changes.

 cd /var/www cp index.php index.php.orig

Locate the following text for the Name Column and copy to the clipboard **.  It is around line 174.

Now scroll up and locate. It is around line 160.

Paste the Name column data, from copied earlier, above the ConfigName line.  Save. Reload the taps page and verify the changes are ok.

** There are various ways to cut and paste or copy and delete depending in the editor you use.

If you screw up the tables, just copy index.php.orig to index.php.

I also make changes to style.css and update fonts, sizes, colors, table width (so name column is wider).

Cheers!

## Sunday, May 15, 2016

### Double IPA and a Barleywine in a Single Brew

I am almost out of beer. I know, right?  Down to the Pineapple IPA hopped with Citra and Mosaic. The club needs a barleywine for NCHF, the Northern California Homebrew Festival.  The missus DIPA. Can I make a barleywine and a Double IPA in a single batch?  Technically, a Barleywine and is a Double/Tripel IPA and a game of semantics.

So I modified my Phoebe Pry IPA recipe and a club Barleywine recipe to do a no sparge Barleywine and mash on the same grain bed with the IPA recipe.  I have done this before with an Imperial Stout and a normal Stout.  They came out great.   I wasn't sure if dark beer fare better with this method or not.

 Recipes and Brew Day Notes
I separated the recipe ingredients in two separate buckets.  Milled separately and added a note to each to ensure I was using he right ingredients at the right time.  I started with the no sparge Barleywine.  using Beersmith software, I chose a Brew In a Bag equipment profile which is an easy way to calculate a no sparge batch strike water volume. I definitely nailed the strike temp at 154F adding 7.2 gallons of 170F water to the 12 pounds of grain for the 3 gallon batch.

Now I had an hour for the mash before I would vorlauf 2 pints at a time, 10 times until the wort would flow clear.   So, it was time for some brew day breakfast; Triple decker fried ham and egg sandwich on a plain bagel cut into three layers.  Some beer mustard and spicy pepper jack cheese went well with my Chocolate Coconut Porter.

I transfered around 5 gallons of 13.2 BRIX wort which was 1.054 Specific Gravity.  A long way from my target 1.101 SG.  After 2 hours of boiling and several hop additions (Magnum, Cascade, Columbus) the boil was done an the gravity was 24 BRIX or 1.102 SG.  I transferred about 2.5 gallons into the 3 gallons fermentor at 68f.  I pitched a packet of Safale 04 dry yeast.

After transferring the Barleywine to the boil kettle, I added the additional 13lbs of grain to the grain bed and added 4 gallons of strike water at 165F hitting my smash temp of 146F.  A little over an hour later I sparged with another 2.5 gallons of 168F water and ended up with 5 gallons of clear wort in the kettle.  I was a little worried with the 14 BRIX pre boil gravity (1.058 SG) but after an hour oro so of boiling and adding magnum, Cascade and Simcoe hops I ended up with 3 gallons of 1.083 SG wort in the fermenter.

I pitched 2 vials of White Labs 001 yeast and rigged a blowoff for the high krausen yeast to drop into the Barleywine. The implementation was poor and was almost a disaster but worked well enough to get the happy yeast from the IPA into the Barleywine though there was a lot of leakage and cleaning still to do.

With a lot to clean and gnarly back pain, I took a break and had an intermission beer.

The beers stayed in the fermenter for two weeks.  I took both out and cleaned the mess in the fermenter from the blowoff experiment. It took gravity sample and dry hopped both.

The barleywine finished at 1.021 SG for a final ABV of 10.8.  I dry hopped with an ounce of Cascade, an ounce of Amarillo and two ounces of Liberty hops.

The IPA finished at 1.011 SG for a final ABV of 9.5%.  I dry hopped with an once of Simcoe, two ounces of Cascade and an ounce of Amarillo.

I will let both set another 5 days before kegging.  If I can score some spirals, I will oak age the barley wine another week or two before kegging.

Next up I plan to split a 6 gallon batch of Imperial Porter and finish with 3 gallons of Bourbon Vanilla and 3 gallons of Chocolate and something else.

## Tuesday, May 10, 2016

### Taxonomy Of A VMWare Outage After A Power Failure

A few VMs hosted on the two blade servers indicated they were inaccessible. Some were simply orphaned which is sometimes a result of a power loss event.  Others listed the GUID of the path (rather than the label for the storage).  Orphaned VMs must be removed from inventory and then added to inventory from the datastore browser.  VMs that show the GUID path can often be recovered simply by refreshing the storage after all services are restored.  Neither of these were successful.

The hosts have been configured with local storage and NetApp storage for some time.  VMs have been running from both datastore sources without issue.

After the power failure, we experienced problems with VMs on NetApp storage.

-          VMs running from local storage experienced no issues and could be started normally.
-          VMs running on the NetApp could not be started.  Orphaned VMs could not be added to inventory.  We were not able to modify or copy the files on the NetApp.   We could not unmount the NetApp.  Neither SSH or Desktop clients actions were successful.  Later in the morning, we identified another blade experiencing the same condition.  This indicated it was not isolated to just these two blades.

We verified the NetApp was in a normal state by accessing the files  as a CIFS share.

We identified changes since the last power failure (a week ago).  1. We added a vSwitch and network interface to the Storage network.  2. We attached a Nimble volume to the host.  We decided to back out these two changes.

We set the Nimble Volume to Offline in Nimble.  Surprisingly, we were then able to unmount the NetApp.  This indicated a strange link to the datastores. VMWare indicated the datastore was in use. Several iterations of removing and adding did not solve the VM issues on NetApp.

We unmounted NetApp then removed the new Storage vSwitch followed by mounting the NetApp again.  VM operation on the NetApp were normal again.

We unmounted NetApp, added the Storage vSwitch then mounted NetApp again.  VM operations failed on the NetApp once again.

A short time later we realized the NetApp export access permissions permitted the (public) IP address of the original vSwitch of the blades.  Adding the vSwitch on the Storage network established a connection from the new IP on the local storage subnet.

The solution was to change the NetApp export permissions to allow root access from the new Storage vSwitch IP address.  Resolution time was 7 hours.

Last week we added another blade to the system.  In the course of adding the additional server, we added a Nimble storage volumes to the existing two servers.  We add a new Storage vSwitch connected to the IO Aggregator which has a 10Gb connection directly attached to the storage network.  After the power failure, the NetApp was remounted over the new Storage vSwitch as the destination was on the locally attached network.  This put the datastore in a read only state.  Technically, the NFS export is mounted as non-root which does not have write privileges.  Additional blades have this same configuration and experienced the same issue though the users hadn’t realized it yet.

## Sunday, January 31, 2016

### High CPU in Windows VM

Summary:  When VMware Resource Pool constrains CPU resources on a VM within the pool, the guest OS can indicate high CPU usage when VMware showed it as not particularly busy.  CPU Ready % from esxtop shows the VM has a high %.  Resolution is to increase the CPU limit in the resource pool settings, power off some VMs or check for process in the VMs using excessive CPU.

I had been struggling with  a Windows 2012 R2 VM running on VMware.  I have a few hundred of these but this one happened to be a domain controller and was painful to remote desktop to. Further, it is running on hyper-converged Nutanix host in India. I know the host and storage are fine.  I even had the fine folks at Nutanix help look at the issue just in case there was some odd issue with storage for this one VM.

To be honest, I have a couple more VMs experiencing issues.  One of the issues we did find was CPU was often in a high Ready percent.  One of traps we fall get caught in is there is ample CPU % free on the host.  Around 40% free. But that does not mean VMs are not waiting for CPU.  Clearly mine were with 10 or 15% Ready.

I manually control memory and CPU for each of my resource pool.  basically, each resource pool get a percentage of usable CPU and memory.  I deduct 20% of each CPU and Memory from the total of all hosts in the cluster then calculate what that means in KB and Mhz and allocate these per resource pool.  This way, I can ensure the machine never exceeds 80% resource utilization.  I had to create a spreadsheet to calculate these values for me.  It is tedious and when I add a host to the cluster or worse, a new resource pool, there is a lot of updating to the spreadsheet then updating resource pool settings.

So, I checked my resource pool usage for this problem VM and while it is close to the max, it is around 5% free CPU resources.  So, I have this VM that is basically idle but using 90% CPU in the OS.  VMware performance stats show it rather idle.  Remote Desktop control is painfully slow just to open control panel.  It is acting poorly as a DC.  Plenty of free resources on the host.

I see the VM is an exceedingly and pretty constant high CPU Ready %.  What could cause this I thought.  Then, I realize the only thing that would create this condition is if the resource pool limits was constraining the VMs in the pool despite looking OK.

So, I add 20,000 MHz to the resource pool and the CPU usage for the pool in the summary display makes this weird jump and I can see now that the resource pool was actually under duress and the VMs were being heavily constrained.  Within a few minutes the VM returns to normal.  The CPU % in Windows drops to a normal few percent and RDP is working normally and the CPU Ready % for the VM is under 1% again.

## Monday, June 15, 2015

### NetApp OnCommand System Manager would not launch

It was really pissing me off.  All the sudden, NetApp OnCommand System Manager would not launch.  I tried the desktop icon, the .exe, the start menu but nothing happened.   I clicked away and nothing happened.

I opened a command line and launched java manually and it worked and was 1.8 dot something which is should be OK.

I recently upgraded OnCommand to 3.1.2 RC1 which fixed my last set of connection (500 errors) issues.  Of course I had to make some command line changes to the NetApp box which is a pain in the ass since I never remember the console password.  However, it was working OK.

Maybe Java upgraded, I can't remember but OnCommand stopped working.  So, I installed 3.1.2 RC2 which the links in this forum post said I needed to do http://community.netapp.com/... But, it still would not launch.

So, I poked around on my system look for rogue Java executables. Sure enough I found some in "c:\windows\system32".  Since this is in the path earlier that the real java path, every time I launch System Manager, this java was invoked.  System Manager could be better written to show an error but it isn't, so we just see nothing.

I deleted the java files in the c:\windows\system32 folder and System Manager launched perfectly.

C:\Windows\System32>java
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.8', but '1.7' is required.
Error: could not find java.dll

Error: Could not find Java SE Runtime Environment.

C:\Windows\System32>dir java*.*
Volume in drive C is OS

Directory of C:\Windows\System32

04/02/2015  09:41 AM           189,352 java.exe
05/22/2015  11:29 AM            77,824 JavaScriptCollectionAgent.dll
04/02/2015  09:41 AM           189,352 javaw.exe
04/02/2015  09:41 AM           320,424 javaws.exe
4 File(s)        776,952 bytes
0 Dir(s)  123,620,012,032 bytes free

C:\Windows\System32>del java*.*
C:\Windows\System32\JavaScriptCollectionAgent.dll
Access is denied.

C:\Windows\System32>