Mike Says Meh The blog of Sys Admin Mike Kauspedas

17Jun/150

Show classic ASP errors in Azure

Here is the web.config to show classic ASP (.asp files) in Azure, or in my case Windows Azure Pack with websites.

<configuration>
   <system.webServer>
		<asp scriptErrorSentToBrowser="true"/>
		<httpErrors existingResponse="PassThrough"/>
		<!--<httpErrors errorMode="Detailed"/>-->
   </system.webServer>
</configuration>

I commented out detailed error messages. With that enabled it would not show the classic ASP errors.

Filed under: Tech No Comments
13Jun/150

Fix Failed to retrieve configuration information. in Windows Azure pack Websites

Did you try enabling failed request tracing for a web site in the admin portal for Windows Azure Pack: Websites? And now you're getting this error when you try to open the configure tab?

Failed to retrieve configuration information.: Please try again. If the problem persists, contact support.

WAP error

Thanks to a kind gentleman on the WAP forums I got the module needed in powershell to edit the websites config. Here is how to fix it.

  1. From the controller open powershell as administrator the run the commands below.
  2. > Import-Module websitesdev
  3. > Set-WebSitesSiteConfig -name <sitename> -RequestTracingEnabled $false

Replace sitename with your site name in the portal. The site name can be found under your Cloud > Websites and the name column.

WAP portal

Here is the output from my CN (controller server).

PS C:\Windows\system32> Import-Module websitesdev
PS C:\Windows\system32> Set-WebSitesSiteConfig -name bake -RequestTracingEnabled $false
Configuration for website bake has been updated.

Filed under: Tech No Comments
29May/150

Dynamic vs Fixed Disk Benchmarks – Dynamic is faster

In the past I've never noticed much gain from going to a fixed disk over dynamic so I decided to finally put it to the test. I tested with two different disk arrays, one a slow SATA using storage spaces (RAID1+0) and another using SSD in straight RAID 0. Each array has 4 disks. Each connected over SATA600. The speed of the disks ultimately doesn't matter, I just want to find out if fixed really is faster than dynamic. I'm using crystal disk mark 4.0.1 x64 inside a VM. I ran two tests each, 3 passes with a 1GB file.

I first tested with SSD and after the results I thought maybe it was just SSD since those disks are so fast anyway. Maybe no latency wipes out any performance loss you get with the overhead of dynamic.

Dynamic Test 1
Sequential Read (Q= 32,T= 1) :  5568.709 MB/s
Sequential Write (Q= 32,T= 1) :   662.037 MB/s
Random Read 4KiB (Q= 32,T= 1) :   139.494 MB/s [ 34056.2 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   123.682 MB/s [ 30195.8 IOPS]
Sequential Read (T= 1) :   579.854 MB/s
Sequential Write (T= 1) :   576.732 MB/s
Random Read 4KiB (Q= 1,T= 1) :    19.219 MB/s [  4692.1 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    34.639 MB/s [  8456.8 IOPS]

Dynamic Test 2
Sequential Read (Q= 32,T= 1) :  4511.435 MB/s
Sequential Write (Q= 32,T= 1) :   662.157 MB/s
Random Read 4KiB (Q= 32,T= 1) :   140.051 MB/s [ 34192.1 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   123.475 MB/s [ 30145.3 IOPS]
Sequential Read (T= 1) :   576.089 MB/s
Sequential Write (T= 1) :   575.869 MB/s
Random Read 4KiB (Q= 1,T= 1) :    19.542 MB/s [  4771.0 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    33.126 MB/s [  8087.4 IOPS]

Fixed Test 1
Sequential Read (Q= 32,T= 1) :   700.012 MB/s
Sequential Write (Q= 32,T= 1) :   659.203 MB/s
Random Read 4KiB (Q= 32,T= 1) :   140.867 MB/s [ 34391.4 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   124.820 MB/s [ 30473.6 IOPS]
Sequential Read (T= 1) :   570.374 MB/s
Sequential Write (T= 1) :   570.917 MB/s
Random Read 4KiB (Q= 1,T= 1) :    18.859 MB/s [  4604.2 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    34.872 MB/s [  8513.7 IOPS]

Fixed test 2
Sequential Read (Q= 32,T= 1) :   699.533 MB/s
Sequential Write (Q= 32,T= 1) :   656.096 MB/s
Random Read 4KiB (Q= 32,T= 1) :   141.714 MB/s [ 34598.1 IOPS]
Random Write 4KiB (Q= 32,T= 1) :   125.472 MB/s [ 30632.8 IOPS]
Sequential Read (T= 1) :   584.835 MB/s
Sequential Write (T= 1) :   568.106 MB/s
Random Read 4KiB (Q= 1,T= 1) :    18.880 MB/s [  4609.4 IOPS]
Random Write 4KiB (Q= 1,T= 1) :    35.024 MB/s [  8550.8 IOPS]

Slower SATA now. Read is awesome, incredibly high. But those numbers are consistent in SSD as well so I don't think it's a fluke.

Dynamic test 1
Sequential Read (Q= 32,T= 1) :  1768.289 MB/s
Sequential Write (Q= 32,T= 1) :    25.291 MB/s
Random Read 4KiB (Q= 32,T= 1) :     6.339 MB/s [  1547.6 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.304 MB/s [    74.2 IOPS]
Sequential Read (T= 1) :    67.744 MB/s
Sequential Write (T= 1) :    26.213 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.593 MB/s [   144.8 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.310 MB/s [    75.7 IOPS]

Dynamic test 2
Sequential Read (Q= 32,T= 1) :  1723.136 MB/s
Sequential Write (Q= 32,T= 1) :    25.242 MB/s
Random Read 4KiB (Q= 32,T= 1) :     6.186 MB/s [  1510.3 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.315 MB/s [    76.9 IOPS]
Sequential Read (T= 1) :    66.275 MB/s
Sequential Write (T= 1) :    25.581 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.565 MB/s [   137.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.312 MB/s [    76.2 IOPS]

Fixed test 1
Sequential Read (Q= 32,T= 1) :    67.003 MB/s
Sequential Write (Q= 32,T= 1) :    24.195 MB/s
Random Read 4KiB (Q= 32,T= 1) :     0.658 MB/s [   160.6 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.264 MB/s [    64.5 IOPS]
Sequential Read (T= 1) :    65.013 MB/s
Sequential Write (T= 1) :    25.376 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.607 MB/s [   148.2 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.263 MB/s [    64.2 IOPS]

Fixed test 2
Sequential Read (Q= 32,T= 1) :    77.594 MB/s
Sequential Write (Q= 32,T= 1) :    24.769 MB/s
Random Read 4KiB (Q= 32,T= 1) :     0.636 MB/s [   155.3 IOPS]
Random Write 4KiB (Q= 32,T= 1) :     0.261 MB/s [    63.7 IOPS]
Sequential Read (T= 1) :    65.016 MB/s
Sequential Write (T= 1) :    25.586 MB/s
Random Read 4KiB (Q= 1,T= 1) :     0.614 MB/s [   149.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) :     0.269 MB/s [    65.7 IOPS]

I also did some more testing with Atto and got the same results. In each case Dynamic was always faster than fixed. I'm confused ...

Dynamic test

Testing dynamic vhdx

Testing dynamic vhdx

Fixed test

testing fixed vhdx

testing fixed vhdx

To be honest, they are pretty much even in performance, aside from those crazy read numbers. But it's also clear that dynamic edges out fixed. Maybe it's my environment or something else, because everything online says Fixed should be faster. There are even other bench marks.

Filed under: Tech No Comments
27May/150

Cannot add shared web worker role to Windows Azure Pack Websites

Ran into this issue after the CU6 update. Turns our it is an issue with the update. I believe Microsoft is pushing everyone to the new MMC console instead of the web portal for admin tasks. This could be part of that effort. If you are seeing these errors when adding a new web worker role in WAP:WS (Windows Azure Pack with the Websites role ) try adding the new role through the controller server.

My post to the azure forums is here.

Error in the web portal:
Please try again. If the problem persists, contact support.

Error in event logs (MgmtSvc-AdminSite) on the adminhub.
Error:ProtocolException: The remote server returned an unexpected response: (400) Bad Request.
<Exception>
<Type>ProtocolException</Type>
<Message>The remote server returned an unexpected response: (400) Bad Request.</Message>
<StackTrace><![CDATA[

And this. (I replaced the partial server name with MEHMEH)

Rest client received unsucessful response message with status code '404' and body '{"Code":"NotFound","Message":"Server MEHMEH is not accessible. Could not connect to the server 'MEHMEH'. This may be because the server is not available. Make sure the server name or address is correct and try again.","ExtendedCode":"10002","MessageTemplate":"Server {0} is not accessible.","Parameters":["MEHMEH"],"InnerErrors":null}'.

Work around:

  1. Login to the controller server.
  2. Open the Websites Management Console MMC.
  3. Click on Servers.
  4. Click Add Server from the right hand menu.
  5. Type in the name, choose the role (webworker), choose mode (shared), and choose large (WAP ignores this on shared roles).

  6. The role will add and immediately appear in the web portal as well.
Filed under: Tech No Comments
21May/150

Powershell to get all MAC addresses of each virtual machine on a host and export to tab delimited file

This will spit out the MAC address and name of each virtual machine on a host to a text file. You can then clean the file up and throw it in Excel. I had to use this to clean up duplicate MACs in two different clusters because I'm a bad sys admin and didn't change the MAC address pools on the hosts or SCVMM.

Get-VM|Get-VMNetworkAdapter | Select-Object VMName, MACAddress | Export-Csv -delimiter "`t" -path C:\macs.txt

It comes out looking like this and I just use a find and replace to remove all the " so I can throw it in Excel. Then I use Excel to find and sort duplicates.

#TYPE Selected.Microsoft.HyperV.PowerShell.VMNetworkAdapter
"VMName" "MacAddress"
"server01" "00155D0167E2"
"server02" "00155D0A65E1"

After you paste it into Excel you can use Conditional Formatting > Highlight Cell Rules > Duplicate Values. Then sort by the column with MAC addresses A>Z and look for the highlighted rows.

Filed under: Tech No Comments
21May/150

Use powershell to turn off IPSec Task Offloading on all Virtual Machines on a host

I know you came here to copy and paste so here it is. Run this on each host. Works on stand alone and in clusters.

Get-VM | Get-VMNetworkAdapter | Set-VMNetworkAdapter -IPsecOffloadMaximumSecurityAssociation 0

Very simple. Gets all virtual machines on a host, then their network adapters, then disables IPSec task offloading. This is equivalent to unchecking the box in the settings below.

You can also change that 0 (disable) to a different number to change the offload tasks. IE 333 or something. Not that I recommend that, I just like the number 3.

But wait, you only want to disable this on certain machines, and your machines all have similar names? Maybe you have virtual machines named MyVirtualMachine001 - MyVirtualMachine099. Here's the command with a select-object. Just change the name to whatever fits your environment and virtual machine names.

Get-VM | Where-Object {$_.Name -like "MyVirtualMachine0*"} | Get-VMNetworkAdapter | Set-VMNetworkAdapter -IPsecOffloadMaximumSecurityAssociation 0

Why disable this you ask? Well in my case we were having an issue with RDP being really slow on some virtual machines. We originally thought it was disk IO, but our IO numbers didn't add up. They just weren't bad enough to make a machine as slow as it was. Then we logged into console and realized that was a LOT faster. Our CTO at work found this and we started testing by disabling. RDP was much faster after disabling IPSec task offloading.

Update
These servers that had the RDP issue were actually part of Windows Azure Pack Websites. Turns out that disabling IPSec offloading didn't do the trick. We thought it did, but once we added the roles back into WAPWS they were slow again. Again, our CTO found the fix. On our local machines we are disabling UDP for the remote desktop client. This seems counter-intuitive since everywhere else online recommends enabling UDP for better performance. But I can't argue with the results, RDP is much faster and I'm not seeing a decrease in performance with other connections. To disable:

  1. Open local group policy editor on the machine you are connecting from (not the server).
  2. Navigate to Computer Config > Administrative Templates >  Windows Components > Remote Desktop Services > Remote Desktop Connection Client.
  3. Edit the rule titled "Turn off UDP on the client." Click enabled.

  4. The effect is immediate, just reconnect to the server through RDP. No need to restart your client.
Filed under: Tech No Comments
2May/150

The mother of all disk benches! 4 disk SSD array, server SSD array, storage spaces

I built a new disk array for my Hyper-V lab at home. Overkill? Yeah, but I got tired of waiting for VM's to boot, or build from deployment. When I study or learn something new I need efficiency! Plus there was a sale on 256GB drives and I found a little 4 disk hot swap box. For comparison I have a SSD array in a server, some single disks, and a 4 disk old SATA300 using Windows 8.1 storage spaces (software RAID).

My PC: Intel Core i5 4670K | 32GB DDR1600
I'm using Crystal disk mark for testing.

*Note: I use RAID 0, there is a write penalty but these are SSDs. Yes, data isn't important so redundancy, well, who cares. Although I do back it up with Backblaze which allows me to backup meaningless VHDs.
4 disk RAID 0 SSD Array. Sandisk SDSSDHP256G 256GB SATA600 SSD
Sequential Read (Q= 32,T= 1) : 1578.833 MB/s
Sequential Write (Q= 32,T= 1) : 1272.100 MB/s
Random Read 4KiB (Q= 32,T= 1) : 349.640 MB/s [ 85361.3 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 318.789 MB/s [ 77829.3 IOPS]
Sequential Read (T= 1) : 1419.964 MB/s
Sequential Write (T= 1) : 1146.151 MB/s
Random Read 4KiB (Q= 1,T= 1) : 125.328 MB/s [ 30597.7 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 100.152 MB/s [ 24451.2 IOPS]

Notice the increased read performance between the array and a single SSD disk, but how large the write penalty is with RAID 0.

Single SSD SATA600 OCZ-Agility 256GB
Sequential Read (Q= 32,T= 1) : 386.957 MB/s
Sequential Write (Q= 32,T= 1) : 209.348 MB/s
Random Read 4KiB (Q= 32,T= 1) : 262.283 MB/s [ 64033.9 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 211.379 MB/s [ 51606.2 IOPS]
Sequential Read (T= 1) : 187.703 MB/s
Sequential Write (T= 1) : 211.817 MB/s
Random Read 4KiB (Q= 1,T= 1) : 18.627 MB/s [ 4547.6 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 131.864 MB/s [ 32193.4 IOPS]

Single SATA Hybrid SATA600 ST750LX003-1AC154 750GB
Sequential Read (Q= 32,T= 1) : 104.197 MB/s
Sequential Write (Q= 32,T= 1) : 105.733 MB/s
Random Read 4KiB (Q= 32,T= 1) : 1.317 MB/s [ 321.5 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 1.199 MB/s [ 292.7 IOPS]
Sequential Read (T= 1) : 104.002 MB/s
Sequential Write (T= 1) : 106.107 MB/s
Random Read 4KiB (Q= 1,T= 1) : 0.663 MB/s [ 161.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 1.214 MB/s [ 296.4 IOPS]

Storage Spaces two-way mirror (RAID 10) 4 disk array SATA300 ST3750640AS 750GB
Sequential Read (Q= 32,T= 1) : 75.898 MB/s
Sequential Write (Q= 32,T= 1) : 24.826 MB/s
Random Read 4KiB (Q= 32,T= 1) : 0.649 MB/s [ 158.4 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 0.284 MB/s [ 69.3 IOPS]
Sequential Read (T= 1) : 75.491 MB/s
Sequential Write (T= 1) : 26.843 MB/s
Random Read 4KiB (Q= 1,T= 1) : 0.651 MB/s [ 158.9 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 0.284 MB/s [ 69.3 IOPS]

RAID 5 with 6 disk + hot spare. PERC H710P Mini SATA600
Sequential Read (Q= 32,T= 1) : 2855.447 MB/s
Sequential Write (Q= 32,T= 1) : 2016.346 MB/s
Random Read 4KiB (Q= 32,T= 1) : 349.066 MB/s [ 85221.2 IOPS]
Random Write 4KiB (Q= 32,T= 1) : 115.260 MB/s [ 28139.6 IOPS]
Sequential Read (T= 1) : 2185.178 MB/s
Sequential Write (T= 1) : 1794.224 MB/s
Random Read 4KiB (Q= 1,T= 1) : 60.030 MB/s [ 14655.8 IOPS]
Random Write 4KiB (Q= 1,T= 1) : 59.278 MB/s [ 14472.2 IOPS]

I'm going to have to work on the random reads and writes on this server. That should blow my home array out of the water.

Filed under: Tech No Comments
8Apr/150

Open your hosts file in notepad as administrator from command prompt

Working for a web hosting company I edit my hosts file a LOT. And forever I did it the hard way, right click on notepad and then open as administrator then open the hosts file. Unacceptable! I need my hosts file open and ready in a split second. Time is money, money is time, time is infinite, money is power, power corrupts, illuminati! But I digress. Here are the steps.

1. Open command prompt as administrator. Right click on it and open as administrator. Or go to your start screen and search for cmd then hold down CTRL + SHIFT + ENTER. I have classic shell installed because over the years I grew to love and admire the start menu and I refuse to give it up despite everyone's love of the new start tile metro screen.

Note: You'll know it's open as Administrator because the top of the window will say so and the default path will be C:\Windows\System32>. If you open command prompt as your normal user it will open to a default path of your user profile. IE C:\Users\user.name>

2. Type "notepad C:\Windows\System32\drivers\etc\hosts". Without the "" into the command prompt.

3. Now the hosts file is open and notepad is running as administrator.

. Yay!

Filed under: Tech No Comments
9Jan/153

How to remove the AMD PCI Express (3GIO) Filter Driver

tl;dr:

  1. Go to device manager.
  2. Find AMD PCI Express (3GIO) Filter Driver.
  3. Update the driver.
  4. Browse my computer.
  5. Point to the folder full of intel chipset drivers.
  6. Voila.
  7. Reboot.

My Mom's HP laptop just died, the night before she is scheduled to fly up to Canada for an extended visit. She needs the laptop, it's her livelihood. So I do what I think is the easiest approach and swap the drive into my laptop. Even knowing it's Windows 7 and I'm going from AMD to Intel based chipsets it should work. And it did. Except for PoS AMD PCI Express (3GIO) Filter Driver.

After swapping the drive I got all the drivers installed and showing good except my Intel HD Graphics 4000 driver. It had a big fat yellow ! and an error stating "This device cannot find enough free resources that it can use. (Code 12)". I made sure all the AMD drivers were uninstalled, cleaned the registry of their existence, and even searched for their old brethren ATI. After some quick searching through the rest of the drivers in device manager I found the last remaining AMD driver, AMD PCI Express (3GIO) Filter Driver. Right clicked, uninstall and check the box to uninstall the driver software. Turns out that is the PCI bus and when you uninstall the PCI bus it reinstalls everything else. So I patiently waited and rebooted thinking it would simply disappear and my HD 4000 would work.

Nope, because the AMD PCI Express (3GIO) Filter Driver is full of hate and demons and terrorizes laptops like a suicide bomber. Except it's one that keeps coming back and exploding and you never die but you feel the pain over and over and over again. Sorry, it's 2am right now ...

Anyway. After reading about other peoples' woes (all prior to 2012, and it's 2015 now) I discovered that AMD in their infinite wisdom had renamed the pcisys driver. This replaced the PCI bus driver. So what if I just tried to update the driver for the AMD PCI Express (3GIO) Filter Driver in device manager? Hrm? So I did but I pointed it to my folder full of intel chipset drivers and BAM, it reverted to PCI bus, rebooted, and voila.

Filed under: Tech 3 Comments
7Oct/140

Dell DSET report default password

The default password is "dell" without the "".

I recently ran a DSET report on an older server. Dell DSET is their debug utility that pulls hardware specs but more importantly hardware logs. So when your old PowerEdge has a blinking amber light you can run that report and figure out what's going on. When you run DSET it places a zip file on your desktop. This has a small HTML app that has the report, it looks a lot like OpenManage. In the report you will find the hardware logs and what is going on with the server. When you extract the file use the password dell.

dell dset

Filed under: Tech No Comments