Wednesday, November 23, 2016

Setup a 2016 Nano Server for Hyper-V on a Dell Internal Dual SD Module (IDSDM)

Here are my notes that I used to get Nano server running on a Dell R730 with SD Cards.
The part number for the Internal Dual SD Module (IDSDM) is PMR79 or 330-BBCN
http://www.dell.com/en-us/shop/dell-internal-dual-sd-module-card-reader-sd-for-poweredge-r430-r630-r730-r730xd-t430-t630/apd/330-bbcn/storage-drives-media
It has dual 16GB SD Cards Dell DP/N: 037D9D

Preparing your management PC/server (Or install the latest RSAT tools for Build 1607 or newer on Win10)
Install-WindowsFeature -Name RSAT-Hyper-V-Tools, Hyper-V-Tools, Hyper-V-PowerShell, RSAT-Clustering, RSAT-Clustering-MGMT, RSAT-AD-PowerShell -Verbose

You will need the ADK and Nano Server Image Builder.  
There is an intro to the Image builder and links to that and the ADK here:
https://blogs.technet.microsoft.com/nanoserver/2016/10/15/introducing-the-nano-server-image-builder/

Create your Nano server USB stick so you can install Nano on bare metal.
You can make an ISO for use with a Virtual console like iDrac too.
The first part of the instructions from Dell that were created for TP4 didn't work for me.
Instead I used a combination of the Microsoft Nano Server Image Builder app and the instructions for setting up the boot to SD from the Dell white paper.

The Dell Blog and PDF on booting Nano from Internal Dual SD Module (IDSDM) is here:
http://en.community.dell.com/techcenter/b/techcenter/archive/2015/11/24/installing-nano-server-on-dell-poweredge-server-internal-dual-sd-module
It's called "Installing Nano Server on Dell PowerEdge Server Internal Dual SD Module"
I skipped the first part and just used the Image Builder instead and then started on page 6 with "Change System Boot Order into IDSDM".

Set VMM as a trusted host
Set-Item WSMan:\localhost\Client\TrustedHosts "192.168.xxx.xxx"

Set your management PC/Server as a trusted host
Set-Item WSMan:\localhost\Client\TrustedHosts "192.168.xxx.xxx"

Allow ping
Import-Module NetSecurity
New-NetFirewallRule –DisplayName “Allow Ping” –Direction Inbound –Action Allow –Protocol icmpv4 –Enabled True

At this point you can use iDrac to setup your RAID for storing the VM files.

Create a new partition for Hyper-V on your Nano Server VM instance
Get-Disk | Where partitionstyle -eq ‘raw’ | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize

I had two RAID 10 Virtual Disks to setup, so I had to break it out by drive letter.
Find out what disk number to format before you run the next commands! 
Get-Disk
Get-Partition | where DriveLetter -eq "G" | Format-Volume -FileSystem NTFS -NewFileSystemLabel “data” -Confirm:$false
Get-Partition | where DriveLetter -eq "F" | Format-Volume -FileSystem NTFS -NewFileSystemLabel “backup” -Confirm:$false

**ReFS is currently not supported on Nano, so we are using NTFS**
Traditional NIC teaming is not supported with Nano.  Server 2016 introduced SET instead.

Get a list of Network adapters
Get-NetAdapter

Create a Teamed vmSwitch with SET for Nano
New-VMSwitch -Name vNICset -NetAdapterName NIC1, NIC2 -EnableEmbeddedTeaming $true 

You should see the Virtual Teamed NIC in Hyper-V now.
Turn on VMQ for the NICs in the driver settings - ONLY on 10GB NICs

Thursday, October 06, 2016

Fix Boeing Portal setting for Internet Explorer IE11

The Boeing Supplier Portal stopped working for us after Boeing made a change on 10/5/2016.
The Boeing Portal support team was able to help a little, but they have no documentation on how your IE11 should be setup to access their Exostar and Boeing Portal sites.
Some of the errors we were seeing were a black page after we clicked on the Boeing Portal link in the Exostar MAG page and then some people would get to the portal but then get a login screen any time they clicked on a link, like the REDARS/EID Drawing search window.

There also seems to be a new requirement to setup security questions.  For people with problems this page may come up over and over.

For the record, we are running x64 Windows 10 Enterprise with Prizm Plugin 10.3

Here are the things we had to do in order to get full Portal access to work again.

Close all your IE Browser Windows
Open one new IE Browser Window
Go to TOOLS – INTERNET OPTIONS
Under BROWSING HISTORY – Click DELETE

Check ALL boxes Except for Passwords reset and the top checkbox for “Preserve favorites website data” – Click DELETE

Click on the Advanced tab and press both the reset and restore advanced settings buttons

Click on the Security tab
Click on Trusted Sites
Click on the Site Button
Add https://*.boeing.com
I have my security level set to low, but it will work fine set to Medium




Reboot

This will not work until you REBOOT!
Some users reported that after this they need to attempt the login 3 times before it worked.
If you login fails, close all the windows and try again two more times.

If all else fails, Firefox works fine.  We use v42 and v44 on Windows 10 x64 with Prizm 10.3.

Update - 10/19/2016
If Firefox still doesn't work we found that for a few people, uninstalling firefox and then reinstalling it will fix any issues. (Don't forgot to re-install Prizm after you do that!)

If you really get desperate, you can also try backing up and then re-creating the user's windows profile.




Thursday, September 29, 2016

Silent upgrade batch file for CATIA V5-6R2016

Here is my silent upgrade batch file for CATIA V5-6R2016
This blog is going to wrap some lines and sometimes screw up the quotes, so double check all that.

@echo off
echo Install CATIA 2016 silently - (x64 bit Windows)
echo Based on the supported "Distributing the Software in Compressed Form" method.
REM Install CATIA and all Service packs on a clean PC and then zip them up.
REM - Ed Hammond 9.28.2016 Skills Inc. ed@skillsinc.com
REM - Copy this file to the local PC and run as Administrator
REM Set the variable for the UNC location on the server where the CATIA installers are stored 
set CATIAINSTALLERS=\\MYSERVER\FILE SHARE\CATIA\CATIA R2016
REM ---------------------------
REM -- Install Catia Base
REM start "" /wait "%CATIAINSTALLERS%\CATIA R2016\V5-6R2016.CATIA_P3.win_b64.1-1\CATIA_P3.win_b64\1\WIN64\startb.exe" -newdir -noreboot -all 
REM ---------------------------
REM -- Install VBA
REM msiexec /q /i "%CATIAINSTALLERS%\CATIA R2016\V5-6R2016.CATIA_P3.win_b64.1-1\CATIA_P3.win_b64\1\VBA\Vba71_x64.msi"
REM ---------------------------
REM -- Install Service Pack
REM start "" /wait "%CATIAINSTALLERS%\CATIA R2016\V5-6R2016.SP3.SPK.win_b64.1-1\SPK.win_b64\1\WIN64\startspkb.exe" -bC -killprocess
REM ****************** Now zip them up and put the zip file on your server: %CATIAINSTALLERS%\CATIA2016-for-SCCM.zip ********************
echo ---------------------------
C:
REM Zip up everything under %ProgramFiles%\Dassault Systemes\, Name the ZIP file CATIA2016-for-SCCM.zip and store the zip on the server.
echo Backing up CATSettings folder
echo ---------------------------
REM Backup CATSettings folder prior to upgrade. WARNING: Reusing these settings is against best practices. They should be re-created for each version.
start "" /wait robocopy "%APPDATA%\DassultSystemes\CATSettings" "%APPDATA%\DassultSystemes\CATSettings2015" /R:1
Echo Exporting CATSettings to XML file
echo ---------------------------
start "" /wait robocopy "%ProgramFiles%\Dassault Systemes\B25\win_b64\code\bin\CATBatGenXMLSet.exe"" "%APPDATA%\DassultSystemes\CATSettings" CATSettings-Export.xml
REM Optional: Use this Enviroment file line to change where the setting are stored: CATUserSettingPath=CSIDL_APPDATA\DassaultSystemes\CATSettings2015
echo Uninstall the old version
echo ---------------------------
if not exist "%ProgramFiles%\Dassault Systemes\B25\win_b64" to CLEAN
if exist "%temp%\Uninstall.bat" del "%temp%\Uninstall.bat"
start "" /wait robocopy "%ProgramFiles%\Dassault Systemes\B25\win_b64" "%temp%" Uninstall.bat /R:1

echo EXIT >> %temp%\Uninstall.bat
start "" /wait %temp%\Uninstall.bat
:CLEAN
echo Create the ENV Folders
echo ---------------------------
if not exist "%ProgramData%\DassaultSystemes\CATEnv" mkdir "%ProgramData%\DassaultSystemes\CATEnv"
if not exist "%APPDATA%\DassultSystemes\CATEnv" mkdir "%APPDATA%\DassultSystemes\CATEnv"
REM Extract Zip file to local PC
echo Use powershell to unzip the files to "%ProgramFiles%\Dassault Systemes\B26"
echo This can take 5 minutes, don't close this window!
echo ---------------------------
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%CATIAINSTALLERS%\CATIA2016-for-SCCM.zip', '%ProgramFiles%'); }"
echo Now run all the CATIA tools that create the shortcuts and Prerequisites.
start "" /wait msiexec /i "%CATIAINSTALLERS%\V5-6R2016.CATIA_P3.win_b64.1-1\CATIA_P3.win_b64\1\WIN64\InstallDSSoftwarePrerequisites_x86_x64.msi" /q
start "" /wait msiexec /i "%CATIAINSTALLERS%\V5-6R2016.CATIA_P3.win_b64.1-1\CATIA_P3.win_b64\1\WIN64\InstallDSSoftwareVC11Prerequisites_x86_x64.msi" /q 
CD "%ProgramFiles%\Dassault Systemes\B26\win_b64\code\bin"
echo Running setcatenv
echo ---------------------------
REM For setcatenv help try setcatenv -h
REM For V5Regserver help try V5Regserver -h
REM Enviroment (-e) = CATIA_P3.V5-6R2016.B26
REM ProductLine (-cs) = CATIA_P3
setcatenv -p "%ProgramFiles%\Dassault Systemes\B26" -e CATIA_P3.V5-6R2016.B26 -d "%ProgramData%\DassaultSystemes\CATEnv" -a global -icon yes -menu yes -cs CATIA_P3
set DSY_NO_HKCU_REGISTRATION=TRUE
echo Running V5Regserver
echo ---------------------------
V5Regserver -set CATIA -env CATIA_P3.V5-6R2016.B26 -direnv "%ProgramData%\DassaultSystemes\CATEnv"
echo Running setcatenv for Tools
echo ---------------------------
setcatenv -tools -e CATIA_P3.V5-6R2016.B26 -cs CATIA_P3
echo Running VBA installer
echo ---------------------------
start "" /wait "%CATIAINSTALLERS%\V5-6R2016.CATIA_P3.win_b64.1-1\CATIA_P3.win_b64\1\VBA\DSVBA71Installer.exe" /install /norestart /q /log %temp%\DSVBA71.log
REM Create a license file (DSLicSrv.txt) that can be copied to the license folder and store it on the server
if not exist "%ProgramData%\DassaultSystemes\Licenses" mkdir "%ProgramData%\DassaultSystemes\Licenses"
copy "%CATIAINSTALLERS%\DSLicSrv.txt" %ProgramData%\DassaultSystemes\Licenses\ /y
echo Done! Don't forget to update you DSLS License Server!

Saturday, June 18, 2016

Troubleshooting SQL Server log file size with AlwaysOn - Shrinking the logs

The SQL Server logs filled up my hard drive and the database stopped working! Crap!

So some backups were missed and now the log file has filled up the disk. Here is how to shrink the logs.
It's panic time, so lets get some triage done.  
Is this on a Virtual Machine? 
Can you expand the disk size to get your database running again while you figure out the rest?  You might need to go that route if everything has ground to a halt.

Backup the database and logs, shrink the log file

If you don't have your backup priority set for the primary replica/server, do that first.

1. Backup the database on the primary server
2. Backup the transaction logs on the primary.  This will truncate the logs on the primary and all secondary servers
3. Right click on the database to go "Tasks" -> "Shrink" -> "Files"
4. From the "File Type" menu, select "Log" and press OK
Only shrink the logs, you can't shrink the database while your connected to a AlwaysOn Availablity group.

Check to see how much free space is available now in the logs with this command:

DBCC SQLPERF(LOGSPACE)

Hopefully your using less than 5% now.

Now that you fixed that problem, check your backups and figure out why the transaction logs are not getting backed up (truncated).

My Initial Database Log size is too large and SQL will not let me lower the size

If you need to lower the initial log file size (if the shrink was not enough and the log is still big) you will need to remove it from the Availabilty group and take these steps.
This will need to be done during a maintenance window since your going to break AlwaysOn for a while.

1. Create a full backup of the database
2. Go to the database properties (right click on the DB -> properties), under the "options" section, change the database recovery model to "Simple" then press OK
3. Right click on the database to go "Tasks" -> "Shrink" -> "Files"
4. From the "File Type" menu, select "Log" and press OK
5. Go back to database properties -> options and change the recovery model back to "Full" (do not press OK)
6. Click on the "Files" section of the properties window and change the initial size and growth rate of the log file. then press OK
7. The log file is now a reasonable size
8. Join the database back to the AlwaysOn availablity group.