February 4, 2017

ipmi fan control on supermicro and pfsense

applies to SuperMicro
 A1SRM-2358F 
 A1SRM-2558F
 A1SRM-2758F

Fan throttles from 0 to max and repeats after reboot.


in pfsense 
# kldload ipmi.ko


# kldstat

Id Refs Address            Size     Name
 1   14 0xffffffff80200000 225edc0  kernel
 2    1 0xffffffff82611000 7577     aesni.ko
 3    1 0xffffffff82619000 29eb     coretemp.ko
 4    1 0xffffffff8261c000 7fc9     ipmi.ko
 5    1 0xffffffff82624000 b3c      smbus.ko

# ipmitool sensor list all
CPU Temp         | 59.000     | degrees C  | ok    | 0.000     | 0.000     | 0.000     | 93.000    | 98.000    | 98.000    
System Temp      | 54.000     | degrees C  | ok    | -9.000    | -7.000    | -5.000    | 80.000    | 85.000    | 90.000    
Peripheral Temp  | 52.000     | degrees C  | ok    | -9.000    | -7.000    | -5.000    | 80.000    | 85.000    | 90.000    
DIMMA1 Temp      | 48.000     | degrees C  | ok    | 1.000     | 2.000     | 4.000     | 80.000    | 85.000    | 90.000    
DIMMA2 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
DIMMB1 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
DIMMB2 Temp      | na         |            | na    | na        | na        | na        | na        | na        | na        
FAN1             | na         |            | na    | na        | na        | na        | na        | na        | na        
FAN2             | na         |            | na    | na        | na        | na        | na        | na        | na        
FAN3             | 2100.000   | RPM        | ok    | 100.000   | 200.000   | 500.000   | 25300.000 | 25400.000 | 25500.000 
VCCP             | 0.810      | Volts      | ok    | 0.441     | 0.450     | 0.495     | 1.296     | 1.422     | 1.440     
VDIMM            | 1.335      | Volts      | ok    | 1.092     | 1.119     | 1.200     | 1.641     | 1.722     | 1.749     
12V              | 12.064     | Volts      | ok    | 10.144    | 10.272    | 10.784    | 12.960    | 13.280    | 13.408    
5VCC             | 4.740      | Volts      | ok    | 4.246     | 4.298     | 4.480     | 5.390     | 5.546     | 5.598     
3.3VCC           | 3.299      | Volts      | ok    | 2.789     | 2.823     | 2.959     | 3.554     | 3.656     | 3.690     
VBAT             | 3.330      | Volts      | ok    | 2.400     | 2.490     | 2.595     | 3.495     | 3.600     | 3.690     
5V Dual          | 4.730      | Volts      | ok    | 4.244     | 4.298     | 4.487     | 5.378     | 5.540     | 5.594     
3.3V AUX         | 3.282      | Volts      | ok    | 2.789     | 2.823     | 2.959     | 3.554     | 3.656     | 3.690     
Chassis Intru    | 0x0        | discrete   | 0x0000| na        | na        | na        | na        | na        | na        

Lower the lower thresholds
# ipmitool sensor thresh "FAN3" lower 100 200 500

Restart IPMI in SuperMicro IPMI Web GUI : Maintenance -> Unit Reset -> Reset 

Check : IPMI -> Configuration -> Fan Mode Setting -> "Set Fan to Standard Speed"

Fan will stabilize around 2k RPM to keep the temp lower.

September 10, 2015

Stop Windows Telemetry/Tracking Windows 7 and 8.1

Straight up copy for my records of this great article

http://techne.alaya.net/?p=12499

Below is a list of Windows updates which add telemetry/tracking. Before uninstalling them and rebooting make sure that you have Windows Update set to not automatically install updates:
KB3083325 Windows Update Client for Windows 8.1 and Windows Server 2012 R2: September 2015 more info
KB3083324 Windows Update Client for Windows 7 and Windows Server 2008 R2: September 2015 more info
KB2976978 Compatibility update for Windows 8.1 and Windows 8 more info
KB3075853 Windows Update Client for Windows 8.1 and Windows Server 2012 R2: August 2015 more info
KB3065987 Windows Update Client for Windows 7 and Windows Server 2008 R2: July 2015 more info
KB3050265 Windows Update Client for Windows 7: June 2015 more info
KB3075851 Windows Update Client for Windows 7 and Windows Server 2008 R2: August 2015 more info
KB2902907 MS Security Essentials/Windows Defender related update [no description/information available]
KB3068708 Update for customer experience and diagnostic telemetry more info
KB3022345 Update for customer experience and diagnostic telemetry more info
KB2952664 Compatibility update for upgrading Windows 7 more info
KB2990214 Update that enables you to upgrade from Windows 7 to a later version of Windows more info
KB3035583 Update installs Get Windows 10 app in Windows 8.1 and Windows 7 SP1 more info
KB971033 Description of the update for Windows Activation Technologies more info
KB3021917 Update to Windows 7 SP1 for performance improvements more info
KB3044374 Update that enables you to upgrade from Windows 8.1 to a later version of Windows more info
KB3075249 Update that adds telemetry points to consent.exe in Windows 8.1 and Windows 7 more info
KB3080149 Update for customer experience and diagnostic telemetry more info
They can be uninstalled manually via elevated command prompt with the following commands:
wusa /uninstall /kb:3083325 /quiet /norestart
wusa /uninstall /kb:3083324 /quiet /norestart
wusa /uninstall /kb:2976978 /quiet /norestart
wusa /uninstall /kb:3075853 /quiet /norestart
wusa /uninstall /kb:3065987 /quiet /norestart
wusa /uninstall /kb:3050265 /quiet /norestart
wusa /uninstall /kb:3075851 /quiet /norestart
wusa /uninstall /kb:2902907 /quiet /norestart
wusa /uninstall /kb:3068708 /quiet /norestart
wusa /uninstall /kb:3022345 /quiet /norestart
wusa /uninstall /kb:2952664 /quiet /norestart
wusa /uninstall /kb:2990214 /quiet /norestart
wusa /uninstall /kb:3035583 /quiet /norestart
wusa /uninstall /kb:971033 /quiet /norestart
wusa /uninstall /kb:3021917 /quiet /norestart
wusa /uninstall /kb:3044374 /quiet /norestart
wusa /uninstall /kb:3075249 /quiet /norestart
wusa /uninstall /kb:3080149 /quiet /norestart


The following services should be removed:
In an elevated command prompt run the following:
sc stop DiagTrack
sc stop dmwappushservice
sc delete DiagTrack
sc delete dmwappushservice
echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
Open the Task Scheduler (Win key then type “sched”). Under Task Scheduler Library -> Microsoft delete the following items:
Everything under “Application Experience”
Everything under “Autochk”
Everything under “Customer Experience Improvement Program”
Under “Disk Diagnostic” delete only the “Microsoft-Windows-DiskDiagnosticDataCollector”
Under “Maintenance” “WinSAT”
“Media Center” and click the “status” column, then select all non-disabled entries and disable them.
Block these hosts

a-0001.a-msedge.net
choice.microsoft.com
choice.microsoft.com.nsatc.net
compatexchange.cloudapp.net
corp.sts.microsoft.com
corpext.msitadfs.glbdns2.microsoft.com
cs1.wpc.v0cdn.net
df.telemetry.microsoft.com
diagnostics.support.microsoft.com
fe2.update.microsoft.com.akadns.net
feedback.microsoft-hohm.com
feedback.search.microsoft.com
feedback.windows.com
i1.services.social.microsoft.com
i1.services.social.microsoft.com.nsatc.net
oca.telemetry.microsoft.com
oca.telemetry.microsoft.com.nsatc.net
pre.footprintpredict.com
redir.metaservices.microsoft.com
reports.wes.df.telemetry.microsoft.com
services.wes.df.telemetry.microsoft.com
settings-sandbox.data.microsoft.com
sls.update.microsoft.com.akadns.net
sqm.df.telemetry.microsoft.com
sqm.telemetry.microsoft.com
sqm.telemetry.microsoft.com.nsatc.net
statsfe1.ws.microsoft.com
statsfe2.update.microsoft.com.akadns.net
statsfe2.ws.microsoft.com
survey.watson.microsoft.com
telecommand.telemetry.microsoft.com
telecommand.telemetry.microsoft.com.nsatc.net
telemetry.appex.bing.net
telemetry.appex.bing.net:443
telemetry.microsoft.com
telemetry.urs.microsoft.com
vortex.data.microsoft.com
vortex-sandbox.data.microsoft.com
vortex-win.data.microsoft.com
watson.live.com
watson.microsoft.com
watson.ppe.telemetry.microsoft.com
watson.telemetry.microsoft.com
watson.telemetry.microsoft.com.nsatc.net
wes.df.telemetry.microsoft.com

June 16, 2015

Windows Server 2008 R2 - Please shutdown this system and reboot into Directory Services Restore Mode

Error message :


Error status: 0x0000001. please shutdown this system and reboot into directory services restore mode

The server bluescreens, reboots into safe mode and repeats the cycle

Solution

The solution that worked was found on technet forums

1.  Restart the server and press F8 key, select Directory Services restore mode.
2.  Log in with the local administrator username and password
3.  Type cd \windows\system32
4.  type NTDSUTIL
5.  type activate instance NTDS
6.  type files
7.  If you encounter an error stating that the Jet engine could not be initialized exit out of ntdsutil.
8.  type cd\
9.  type md backupad
10. type cd \windows\ntds
11. type copy ntds.dit c:\backupad
12. type cd \windows\system32
13. type esentutl /g c:\windows\ntds\ntds.dit
14. This will perform an integrity check, (the results indicate that the jet database is corrupt)
15. Type esentutl /p   c:\windows\ntds\ntds.dit
16. Agree with the prompt
17. type cd \windows\ntds
18. type move *.log c:\backupad   (or just delete the log files)
This should complete the repair.  To verify that the repair has worked successfully:
1.  type cd \windows\system32
2.  type ntdsutil
3.  type activate instance ntds
3.  type files        (you should no longer get an error when you do this)
4.  type info       (file info should now appear correctly) 
One final step, now sure if it's required:
From the NTDSUTIL command prompt:
1.  type Semantic Database Analysis
2.  type Go

The addition is the error fix as described on Microsoft support article
3. ntdsutil "sem d a" "go f"

May 15, 2015

Manually delete linked clones or stale virtual desktops in VMware Horizon View

Here are some errors that get thrown out:

Failed to remove VM <VM path> from the View Composer inventory - null

Desktop Composer Fault: Virtual Machine with Input Specification already exists

Pool or Desktop stuck showing "Deleting (missing)"


  • Log on to the View composer server.
  • Open an elevated command prompt and navigate to "C:\Program Files (x86)\VMware\VMware View Composer".
  • Run this command: sviconfig -operation=RemoveSviClone -VmName=<Virtual Machine Name> -AdminUser=<username> -AdminPassword=<password> -ServerUrl=https://localhost:18443/SviService/v2_0. 
  • ComposerCommand
  • If it does not run successfully, you'll have to manually delete the VM from the ADAM database. See KB articles


Links and references


VMware KB: 2015112
VMware KB: 2009844

http://michkloc.com/failed-to-remove-vm-vm-path-from-the-view-composer-inventory-null/

http://www.vladan.fr/delete-orphaned-horizon-view-replica/

http://vcdx56.com/2013/10/23/can-not-delete-desktop-pool-in-vmware-horizon-view/

April 30, 2015

Disable IPv4 autoconfiguration for 169.254 duplicate addresses

Quick description

  • static IPs configured on various Windows servers running under VMware
  • after reboot they show both the static configured IP as well as a 169.254.10.50 (example)
  • the invalid IP shows as "prefered"

Fix

  • disable autoconfiguration
    • netsh interface ipv4 show inter
    • netsh interface ipv4 set interface 11 dadtransmits=0 store=persistent
  • disable DHCP client service
  • reboot






March 27, 2015

Quickly recover VMware orphaned virtual machines

After the ESXi OS crashed, it was quickly reinstalled to a fresh USB.

Once 'reconnected' in vCenter the existing datastore was recognized automatically however few things were missing:
- networking settings
- firewall rules
- auto-start for any VMs
- all VMs showed as 'orphaned'

Quick way to restore the VMs :
- enable SSH
- find your volume for the datastore in /vmfs/volumes
- run these line

# find /vmfs/volumes/53456cd6-ee79d800-ad57-002590e2fde0/ -name "*.vmx" | sed
's/\(.*\)/vim-cmd solo\/registervm "\1"/' > /restorevmx

# sh /restorevmx
# rm /restorevmx

What it does is search for all .vmx files in the datastore and runs the 'vim-cmd solo/registervm' command. 
Running it on existing VMs that are not 'orphaned' will just cause the tool to skip them

The best part is that the VMs don't have to be removed from inventory to be re-added

There doesn't seem to be any downsides as long as you don't remove them in vCenter.

References: VMware KB 1006160

February 10, 2015

automating winhelp2002 MVP HOSTS file to pfSense 2.2

Intro

looking to implement - "...HOSTS file to block ads, banners, 3rd party Cookies, 3rd party page counters, web bugs, and even most hijackers."


pfSense uses dnsmasq and we need to convert entries from HOSTS file to the dnsmasq format

0.0.0.0 static.a-ads.com -> address=/static.a-ads.com/127.0.0.1

We will have it scheduled to run daily at midnight to keep the list up to date

noteOn pfSense 2.2, The DNS Forwarder is not active by default. It has been replaced by Unbound as a DNS Resolver. It may still be used, and is still active on upgraded configurations. To use the DNS Forwarder (dnsmasq) on 2.2, first disable Unbound and then enable the DNS Forwarder.Dec 26, 2014
DNS Forwarder - PFSenseDocs
https://doc.pfsense.org/index.php/DNS_Forwarder

Therefore this applies only if you're using dnsmasq

Preparation

install package cron 0.1.8

create folder in ssh 
  # mkdir /usr/local/etc/dnsmasq.d/

go to pfSense: 
Services -> DNS Forwarded
  enable advanced button and enter: 
  conf-dir=/usr/local/etc/dnsmasq.d



Command

fetch -qR http://winhelp2002.mvps.org/hosts.txt /root/hosts.txt && perl -e 'while(<>){ chomp; lc; next if /^#/; if (/^0\.0\.0\.0\s([-a-z0-9.]*)/) { print "address=\/$1\/127.0.0.1\n"; } }' /root/hosts.txt > /usr/local/etc/dnsmasq.d/entries && pfSsh.php playback svc restart dnsmasq

broken down and explained

fetch -qR http://winhelp2002.mvps.org/hosts.txt /root/hosts.txt 
&& 

# -q, --quiet
Quiet mode.
# -R, --keep-output
The output files are precious, and should not be deleted
under any circumstances, even if the transfer failed or was
incomplete.

# saves to /root/hosts.txt
---------------------------------------------------------------------------

perl -e '
  while(<>) {    # for every line in input file (specified as argument below)

    chomp;         # remove newlines

    lc;                 # lowercase all characters

    next if /^#/;  # skip if it matches character '#' at the begining - comments

    if (/^0\.0\.0\.0\s([-a-z0-9.]*)/)     
        # if it matches this 0.0.0.0(space)(url - can only contain a-z0-9 and a dash)
        # example 0.0.0.0 static.a-ads.com

    { 
       print "address=\/$1\/127.0.0.1\n"; 
        # print what we matched $1 and the rest of the text so it looks like: 
        #   address=/static.a-ads.com/127.0.0.1

     } 
  }' 

/root/hosts.txt                                          # our input file
> /usr/local/etc/dnsmasq.d/entries          # save to this file
&& 
---------------------------------------------------------------------------

pfSsh.php playback svc restart dnsmasq   # restart dnsmasq service to reload file


Application


test the line by running it in the SSH - check the output of
/root/hosts.txt
/usr/local/etc/dnsmasq.d/entries


when everything runs and you have the 'entries' file populated correctly, schedule it to run daily 

Schedule


After you install the package, go to pfSense: 
Services -> Cron
Pay attention to add full paths





June 13, 2014

Migrate VMware vCenter from ESXi to Microsoft Hyper-V 2012 R2

Because vCenter was running on the ESXi that was supposed to be updated by the vCenter itself, it had to be moved elsewhere first.

To migrate to Hyper-V use the Microsoft tool
Microsoft Virtual Machine Converter 2.0 at
http://www.microsoft.com/en-us/download/details.aspx?id=42497

Check the manual, there are some caveats.
Installed on the Hyper-V server and shared the 'Disks' folder on the Hyper-V server to administrators. This share is required by the converter tool.

Shut down the vCenter machine and point the converter to the ESXi itself.
Use the shared drive above as the destination and a temp folder as the conversion working folder.


After conversion completes:
  • uninstall the VMware tools and install the Microsoft Integration Services
  • change the settings on the NIC as there's a completely new one installed. Uncheck IPV6
  • update any DHCP lease reservations with the new MAC address if needed
  • to keep the old VM from interfering, disconnect the NIC for the VM by unchecking the 'connected' box in ESX

The migrated vCenter machine had some issues and was unable to start the vpxd service
There was an error something to the effect of "unable to create sso facade" in the log file at
  %ProgramData%\VMware\VMware VirtualCenter\Logs\vpxd.log

Two possible fixes 

  • Check your hosts file and make sure when you ping the FQDN you get IPV4 responses only.
  • Run the fix on the second article 
start -> run -> cmd
set JAVA_HOME=C:\Program Files\VMware\Infrastructure\jre
cd "C:\Program Files\VMware\Infrastructure\SSOServer\Utils
rsautil manage-secrets -a recover -m <masterPassword>

Try to manually start service or reboot


January 19, 2014

VMware vCenter: A general system error occurred: Authorize Exception

Intro 

Trying to log in to ESXi and vCenter 5.1, getting error 'Authorize Exception'. These are the troubleshooting steps taken to resolve.
There was a specific cause tied to a scenario and there are solution steps taken to remedy.


Troubleshooting

Luckily there is a KB article that shows up when you search for the error text on a search engine. We'll start with that as a guide

vCenter Server login fails with the error: A general system error occurred: Authorize Exception (1015639)

VMware advises to check these 3 things

  1. SSO identity source not configured correctly
  2. vCenter Server disconnected from Active Directory
  3. DNS resolution


In order of difficulty, start from the bottom.



3. DNS resolution

To verify that the DNS is working, on the vCenter window server, do one or all of these

  • check the ipconfig/all from the command line and verify the DNS servers listed are correct
  • open cmd, type nslookup, and try to resolve the hostname and FQDN of your vCenter server



2. vCenter Server AD connectivity

To verify, RDP to vCenter and open the user groups in Windows Server, then review the Administrators group. 

If you are seeing the Security IDs instead of DOMAIN\USER, the AD connectivity is lost and you may have to rejoin the AD. 
The KB article above has some more details before you just re-add blindly.



1. SSO identity source

Here's the guide on how to configure the SSO


To verify this configuration we are going to go backwards
  • Navigate to vCenter web Client
  • https://vcenter.corp.potato.com:9443/vsphere-client/ 
  • login using the following
    • username: admin@System-Domain
    • password:  set up during vCenter installation. If you used Simple install, the password may be blank (?)
  • Go to Administration -> Sign-On and Discovery, Configuration
  • under Identity Sources, click on the ldaps entry and then the little pencil icon to edit it.
  • Verify your settings and check the Primary server URL first
  • Note the button 'Choose Certificate' does not show up until you type something in any box
  • You can test the connection but the fail message is non-descript here.



































Check Certificate 


There are different ways about this, but you want to verify the machine certificate of the 'Primary server URL'. This is needed for secure LDAP to work.
  • RDP to the windows machine (dynamics.corp.potato.com). Start -> run -> mmc -> add remove snap-in -> Certificates -> Add -> Computer account -> Local -> finish
  • Expand Certificates -> Personal -> Certificates
  • find the matching cert and verify
    • Valid from: check this date is correct!
    • Issued to: dynamics.corp.potato.com
    • Issued by: your AD cert authority 
    • Intent: "Proves your identity to a remote computer" AND "Ensures the identity of a remote computer"
    • Certificate Template Name : "DomainController"
    • Enhanced Key Usage: "Client Authentication (1.3.6.1.5.5.7.3.2)" AND "Server Authentication (1.3.6.1.5.5.7.3.1)"

Check LDAPS is working

  • connect to any domain controller that works and go start -> run -> ldp
  • Connection -> connect -> enter the FQDN of the 'primary server' (dynamics.corp.potato.com)
  • use port 636 and check 'SSL'
  • if it's failing you will get an error that you can look up, hopefully. In this case it was 
0x0 = ldap_unbind(ld);
ld = ldap_sslinit("dynamics", 389, 1);
Error 0 = ldap_set_option(hLdap, LDAP_OPT_PROTOCOL_VERSION, 3);
Error 81 = ldap_connect(hLdap, NULL);
Server error: <empty>
Error <0x51>: Fail to connect to dynamics.
ld = ldap_sslinit("dynamics", 6389, 1);
Error 81 = ldap_set_option(hLdap, LDAP_OPT_PROTOCOL_VERSION, 3);
Error 81 = ldap_connect(hLdap, NULL);
Server error: <empty>
Error <0x51>: Fail to connect to dynamics.

  • If it's successful you will get something like this
ld = ldap_sslinit("dynamics", 636, 1);
Error 0 = ldap_set_option(hLdap, LDAP_OPT_PROTOCOL_VERSION, 3);
Error 0 = ldap_connect(hLdap, NULL);
Error 0 = ldap_get_option(hLdap,LDAP_OPT_SSL,(void*)&lv);
Host supports SSL, SSL cipher strength = 128 bits
Established connection to dynamics.
Retrieving base DSA information...
Getting 1 entries:
Dn: (RootDSE)
configurationNamingContext: CN=Configuration,DC=corp,DC=potato,DC=com;
          [many lines]
....... 

Cause

In this case, the following scenario happened:

  • A domain controller was removed from the forest. 
  • This DC by chance was also the Cert Authority. 
  • The replacement DC was not made a CA
  • There was no CA on the domain, and all the existing machine issued certs were valid for a year
  • After a year has passed since the [automatic] issuing of the certs, the LDAPS ceased to function since the certs were past their expiry date.
  • The clue was that during the cert check of 'dynamics' the machine cert was showing as expired and LDP tool was failing to connect as well


Solution

Issue new cert to the 'Primary server' (dynamics)

  • A Cert Authority was installed in the domain forest. 'New CA' was added since old private keys were lost
  • CA automatically propagated on the domain and issued new machine certs to all the existing DCs and signed with the new CA as 'issued by'. 
  • Reboot of the 'dynamics' server was performed here.
  • at this point verified LDAPS with LDP tool connecting to 'dynamics' successfully 

Export the cert from 'Primary server' (dynamics)

  • Connect to the 'Primary server' (dynamics) 
  • Start -> run -> mmc -> add remove snap-in -> Certificates -> Add -> Computer account -> Local -> finish
  • Expand Certificates -> Personal -> Certificates
  • Find the matching cert by the FQDN -> properties
  • Details tab -> Copy to File -> Next -> No, do not export the private key -> Base-64 encoded X.509 (.CER)
  • Save this file to a common location

Import the new cert to vCenter server 

This next bit may not be the formal way to fix, but it worked since all the config in place was valid and only the cert was needed
  • Navigate to vCenter web Client as instructed above
  • https://vcenter.corp.potato.com:9443/vsphere-client/ 
  • .... like above and refer to the picture....
  • Add any text in either 'Primary' or 'Secondary server URL' and undo it. This will cause the button 'Choose Certificate' to appear, but keep all the existing values as they were. 
  • Click the 'Choose Certificate' and navigate to the .CER file you exported above
  • The successful message is 'Certificate added' / 'The selected certificate has been successfully added to the vCenter Single Sign On keystore.'
  • You can test the connection now as well, 
    • since we're logged in as admin@System-Domain change to 'Password' 
    • use any domain user/pw that is authorized
    • 'The connection has been established successfully.'
  • Click OK to save

Logging in to vCenter using the vSphere client worked at this point without any more reboots.


April 8, 2013

The trust relationship between this workstation and the primary domain failed

Had this error happen with a Microsoft Windows 2008 R2 server running in a VM.
When logging in to Windows, if using any domain accounts, getting the error

“The trust relationship between this workstation and the primary domain failed"


The obvious fix is to rejoin the domain but a much simpler and probably less invasive method is to run the netdom command

Login with a local machine admin account and run:

netdom.exe resetpwd /s:<server> /ud:<user> /pd:*


<server> = a domain controller in the joined domain
<user> = DOMAIN\User format with rights to change the computer password. I used domain admin.

More info at
http://implbits.com/About/Blog/tabid/78/post/don-t-rejoin-to-fix-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/Default.aspx

March 5, 2013

ESX 4.0 upgrade to ESXi 5.1 with 3ware 9650SE

Intro

This is a straight up upgrade of an ESX 4.0 installation to ESXi 5.1. 
The hardware is Intel Xeon CPUs however the biggest obstacle was the RAID controller LSI/AMCC 3ware 9650SE which was not detected when installing with the VMware default ISO.
The RAID1 was also where the ESX 4 was installed, so it was not even possible to perform the upgrade without the extra steps.

Overview

  1. Download the VMWare driver for the 3ware 9650SE
  2. Integrate the driver into a custom boot ISO image
  3. Perform the upgrade using a CD on site
  4. Few observations and notes

--------------------------------------------------------------------------


1. Download the VMWare driver for the 3ware 9650SE


  • Search the web for 'VMware Compatibility Guide'. At the time of writing, the URL is http://partnerweb.vmware.com/
  • Change 
    • 'What you are looking for' to 'IO Devices'
    • select ESXi 5.1 
    • and keyword '9650'
  • In the results click on the '3ware 9650SE' link. Brand name is under 'AMCC'
  • The footnotes refer to 
  • Follow the link, and either 
    • search for '3w-9xxx version 2.27.08.036' in 'All Downloads'
    • or follow the links 
      • VMware vSphere -> 
      • Drivers & Tools tab -> 
      • Driver CDs -> 
      • look for '3ware' or '2.27.08.036'
  • Final link is at VMware ESXi 5.0 Driver CD for LSI 3ware 96xx RAID Controllers
  • File LSI_2.27.08.036vm50-637081.zip (110,254 bytes)



2. Integrate the driver into a custom boot ISO image


  • Search the web for 'ESXi-Customizer'. At the time of writing, the URL is 
  • Install and run the ESXi-Customizer.cmd
  • Unzip the driver file, and feed the ISO image and the driver into the ESXi-Customizer
  • Files are: 
    • VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso
    • scsi-3w-9xxx-2.27.08.036-1OEM.500.0.0.472560.x86_64.vib
  • Once the ISO image is built, burn it to a CD or DVD, rewritable also works.


3. Perform the upgrade using a CD on site


  • This is a straight forward procedure which should not take more than 30min
  • Schedule a maintenance window, and reboot with the CD in the host
  • The RAID will now be detected as a storage device and you can perform the 'force upgrade'
  • After the reboot, make sure you have your new licence ready because it will be in a 60 day trial mode


4. Few observations and notes


  • The 4.0 was actually updated (not upgraded) using the Update Manager first. There was a few hundred patches and updates, however I don't believe this was necessary prior to the upgrade to 5.1
  • The Update Manager could most likely use the custom ISO as a new upgrade baseline, however this was not tested.
  • First attempt was the 5.1 default ISO which was used as an upgrade baseline in the Update Manager, however this failed and caused the host to go in an infinite reboot loop. There is a boot menu that was added that allows either boot from 4.0 or to perform the 5.1 upgrade. Not sure how to edit this menu and remove the 5.1 upgrade as default option which kept failing

March 4, 2013

Update VMWare Tools on Cisco CallManager 7.1 to ESXi 5.1

Intro


We have CUCM 7 running on ESXi 4.0 that was upgraded to 5.1. VMWare tools need to be installed or updated on the CallManager


Overview of the steps

  1. Log in to the CUCM shell via "Remote Support" account
  2. Initiate the VMWare tools install
  3. Bonus: Troubleshooting an error 'No module mptscsi found'

1. CUCM Remote Support login

  • Download the CentOS install disk. Tested working is 
    • CentOS-5.5-i386-bin-1of7.iso (653,910,016 bytes)
  • Log in to the CUCM console, and add a 'remote support' user
    •  admin:utils remote_account enable
    •  admin:utils remote_account create [username] [num of days active]
  • Mount the CentOS ISO to the VM and reboot the CM
    •  admin:utils system restart
  • Boot to the CentOS CD, press 'esc' key during boot to get to the BIOS boot manager
  • Select the 'recovery disk' option
  • Mount the root partition '/' as there may be '/partB' as well
  • Once you get to shell prompt, check these files
    • #lsattr /etc/passwd /etc/group /etc/shadow /etc/gshadow
  • In my case they were all --------, but if there's an immutable flag 'i' you will have to take it out
    • #chattr -i /etc/passwd /etc/shadow /etc/group /etc/gshadow
  • Change the password for the [username] used above in step 2
    • #passwd [username]
  • Reboot and unmount the CD from the VM
  • Log in to the console using the [username] and password you reset in step above

2. VMWare Tools install

  • In the vSphere client, initiate the vmware tools installation by going to Guest-> 'Install/Upgrade VM Tools'. Don't select the automatic install.
  • Go to the console where you logged in with [username] and check that you have a folder /media/cdrom
  • In my case, there was no /media/cdrom. Because of an upgrade it was located in /partB/media/cdrom however the /etc/fstab was still pointing to /media/cdrom
  • I had to create folder /media/cdrom before mounting the CD, then just issue
    • # mount /media/cdrom
  • Copy the tools tar.gz from the CD to your home folder then untar and run the install script
    • # cp /media/cdrom/VMwareTools-9.0.1-913578.tar.gz ~
    • # cd ~
    • # tar zxvf VMwareTools-9.0.1-913578.tar.gz
    • # cd vmware-tools-distrib/
    • # ./vmware-install.pl
  • Take all the defaults the script offers. If you don't have errors, this should complete fine, in which case just reboot the server and enjoy the job well done.

3. BONUS. Errors!


During the install, just at the end it fails with an error message 
'No module mptscsi found for kernel x.x.x.x'

There's a lovely KB article on VMWare site at 

Even though the kernel versions don't match, following the instructions to comment out 'mptscsi' from /etc/modprobe.conf worked. In my case I had to comment out two entries, 

/etc/modprobe.conf :
...
#alias scsi_hostadapter1 mptscsi
...
#alias scsi_hostadapter5 mptscsih
...
~

Re-running the 'vmware-install.pl' script completed successfully this time, and I uncommented those entries before the final reboot.


January 19, 2013

Enable VNC in VMware ESXi 5.1

Steps

  1. create custom firewall rule file
  2. refresh rules
  3. make sure the changes are persistent across reboots
  4. NOTE: these changes may not be persistent across upgrades or updates.
  5. Enable VNC on the target VM

Procedure

Custom Firewall rule file

Service ID

First, find the service ID to use for your custom firewall rule.

Example:

/etc/vmware/firewall # cat service.xml
...
<service id='0032'>
    <id>vprobeServer</id>
    <rule id='0000'>
      <direction>inbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>57007</port>
    </rule>
    <enabled>false</enabled>
    <required>false</required>
  </service>

</ConfigRoot>

/etc/vmware/firewall #

We are going to use 0033

Custom File

Create a file on your computer called enablevnc.xml


<!-- Firewall configuration information -->
<ConfigRoot>

  <!-- VNC -->
  <service id="0033">
    <id>VNC</id>
    <rule id='0000'>
      <direction>outbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>
        <begin>5800</begin>
        <end>5999</end>
      </port>
    </rule>
    <rule id='0001'>
      <direction>inbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>
        <begin>5800</begin>
        <end>5999</end>
      </port>
    </rule>
    <enabled>true</enabled>
    <required>false</required>
  </service>

</ConfigRoot>


Copy the file to a datastore on your VM
in this example copied to 
/vmfs/volumes/500G2/enablevnc.xml

You can also edit in place in SSH and just copy/paste.


Copy the file from the datastore to the firewall folder

/etc/vmware/firewall # cp /vmfs/volumes/500G2/enablevnc.xml /etc/vmware/firewall/

Refresh firewall rules

/etc/vmware/firewall # esxcli network firewall refresh 
Confirm the changes
/etc/vmware/firewall # esxcli network firewall ruleset list
...
vSPC                  false
remoteSerialPort      false
vprobeServer          false
VNC                    true


Make changes peristent

Edit local.sh

ESXi 5.1 made changes so you have to edit /etc/rc.local.d/local.sh now.

/etc/vmware/firewall # vi /etc/rc.local.d/local.sh 

#!/bin/sh

# local configuration options

# Note: modify at your own risk!  If you do/use anything in this
# script that is not part of a stable API (relying on files to be in
# specific places, specific tools, specific output, etc) there is a
# possibility you will end up with a broken system after patching or
# upgrading.  Changes are not supported unless under direction of
# VMware support.

cp /vmfs/volumes/500G2/enablevnc.xml /etc/vmware/firewall/
      
exit 0
~
/etc/vmware/firewall # 

Run auto-backup.sh

/etc/vmware/firewall # /sbin/auto-backup.sh 
Files /etc/vmware/dvsdata.db and /tmp/auto-backup.61769//etc/vmware/dvsdata.db differ
Saving current state in /bootbank
Clock updated.
Time: 03:54:44   Date: 01/20/2013   UTC
/etc/vmware/firewall #


Enable VNC on target VM

Make sure your VM is shut down
edit the .vmx file manually over SSH or change the 'Configuration Parameters' in vSphere
These are the two config parameters to add. 
There is no password configured in this example.

remotedisplay.vnc.enabled = "true"
remotedisplay.vnc.port = "5900"

Connect


To connect to the desktop of the target VM, use a free VNC client, IP address of your ESXi server and port 5900

January 9, 2012

Transcend USB 3.0 controller drivers

So the USB controller model TS-PDU3 comes with an NEC chipset.
NEC is called RENESAS now.

You can see the lineup at
www.renesas.com/prod/usb/map/assp_host.html
EDIT: Updated link : http://www.renesas.com/products/soc/usb_assp/index.jsp

I think it's the µPD720200, but I couldn't find a way to download drivers for it from their site.
http://www2.renesas.com/usb/en/product/upd720200.html



Download the transcend driver and install.

filename : RENESAS-USB3-Host-Driver-20320-setup.exe

It will install as

date : 12/10/2010
version : 2.0.32.0

Then go to intel's website and download their updated drivers
http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=19880&lang=eng&wapkw=

filename : USB3.0_allOS_2.1.28.0_PV.exe
EDIT: updated file same link is USB3.0_allOS_2.1.28.1_PV.exe


Run and it will automatically update to

date : 10/25/2011
version : 2.1.28.0

Maybe there are newer drivers but this fixes the issues with recognizing some USB drives.

This was all tested on Windows 7 x64.



November 19, 2011

Nikon D200 tethered support and iPad2



This relates to tethering a Nikon D200 to the PC and iPad2 as a monitor using the following

  • Windows 7 64bit
  • Nikon D200
  • Capture One Pro 6.3.2 64bit
  • Nikon Camera Control Pro 2.9.0
  • Lightroom 3.5 64bit
  • Apple iPad2

Abstract
  • Alow the camera to be used by a photographer, the laptop/PC to preview any incoming files and an iPad to review any files via wireless as well.

Outline of the troubleshooting:
The camera worked fine in Windows and was recognized and was able to connect and transfer files.
When the camera is set to USB mode PTP you can take pictures but there is no screen preview. You can also go in the menus and change any settings except for USB mode.
If you set to 'mass transfer' mode then you cannot take any pictures with the camera when connected to a PC.

None of the installed software was able to recognize the camera. 
Capture One Pro was reporting 'no camera attached' and Nikon Camera Control Pro was reporting 'no camera was detected'

There was some suspicion that a special USB cable is needed, this is not true. A regular shielded USB 2.0 cable is all that is needed.

Also had to update the D200 to firmware 2.01 however did this not make any difference.

An  update was ran on the Nikon Camera Control 2 to the latest version. The installed version 2.0 was unable to recognize the camera. The updated version 2.8 and subsequent 2.9 was able to recognize and was able to control all aspects of the camera.
Capture One Pro was still unable to recognize the camera even after several restarts.
A fix was found at the phase one forums


An updated file is needed from the updated Nikon Camera Control 2 to be copied to the Capture One Pro folder

C:\Program Files (x86)\Common Files\Nikon\Camera Control Modules\D200_Mod.md3

copy and overwite to

C:\Program Files\Phase One\Capture One 6\CaptureProcess\CaptureCore\Nikon\MAID

I would do the same for any other cameras that you own such as D40 and D80 that are located in the Capture One 6 folder.

The working file
  • filename: D200_Mod.md3
  • size: 699,904 bytes
  • date modified: Wednesday, ‎June ‎09, ‎2010, ‏‎10:41:02 PM


The camera works in Capture One now, however there are limitations in regards to the Nikon software. 
  • There is no 'auto focus and capture' button, instead it is just 'capture'. 
  • Setting aperture and shutter speed works, and it's reflected when changed on camera. 
  • There are none of the settings to modify or calibrate the camera other than 'program', aperture, shutter speed and EV adj.


Capture Pilot

The biggest advantage of using Capture One Pro is the 'Capture Pilot' functionality. This is possible to utilize with either Nikon Camera Control Pro or Capture One Pro alone.
Select the folder you want to share with the built in server and use the iPad app called 'capture pilot' to connect and browse files as they are captured. There's a fee to upgrade which lets you control the camera from the iPad however the app itself is free.

You can use either the Nikon or PhaseOne software to control the camera: configure the folder where to download the files, then point Capture One browser to see the files automatically as they are captured as well as configure the Capture Pilot to host files from that same folder for the iPad connectivity.

This setup allows three separate stations:
  • photographer views and takes photos via the viewfinder
  • editor/designer/creative to monitor files on the laptop or other calibrated screens
  • client and any other audience browse via one or many iPads from on or off location depending on the networking setup.  Optionally you can configure iPad clients to permit or deny rating or adjusting of images. 



Few notes worth mentioning
  • Lightroom 3.5 does not support D200 tethering under Windows at all.
  • You can run Capture One Pro together with Camera Control Pro and you can capture files from both interchangeably. They do not seem to block each other.
  • You do not need a memory card when shooting tethered since all the files get copied to the capture location immediately. The camera buffer will take as many shots as it can while the files get transferred. Also no need to change any camera settings to allow to shoot without the memory card.
  • There was no speed difference during capture; the limit is the USB connection and the cable shielding. Also do not go over the USB2.0 spec of max cable length 5m (16.4ft)
  • Battery usage seems higher than average, however if not using tethered the LCD screen was used for at least 30sec per shot which was using the battery even more.
  • The camera can be turned off and on while either software runs. They seem to recognize when the D200 is plugged in fairly well.
  • The iPad2 screen used was not calibrated however the color accuracy was excellent. It's using a bright IPS panel which does not exhibit much color shift when viewed side to side.
  • Total time taken from shutter to seeing image on iPad: 5-6 seconds.
  • If you get an error "capture pilot cannot be started" this is because the bonjour application was uninstalled. Reinstall CaptureOne



Considerations
  • A solution that allows any camera to upload the files it captures to a remote location using WiFi or some other form of wireless can be used with Capture One Pro and its Capture Pilot.
  • For the Nikon D200 it's the WT-3a.  Not sure for newer cameras or other vendors. Maybe they are built in now or the future models. D800?
  • Scenario: provide iPads during a wedding photo shoot for people to watch incoming photos from anywhere. This also requires a LAN WiFi setup on location and possibly an assistant to edit photos as they come in. Would be quite a performance however would only require a small WiFi router and iPad(s).
  • Events photos? Sports?
  • Definitely useful in a studio controlled environment.
  • The app also works with iPhones and there is most likely a good percentage of guests that would have those already. Would need to have them connect to the LAN WiFi hotspot or studio network first.



February 28, 2011

Windows 7 SP1 USB Driver bug

Looks like the SP1 doesn't update the USB drivers properly


Run this from command prompt

  cd %SystemRoot%\System32\drivers
  dir usbehci.sys usbport.sys winusb.sys

And if any of the files are dated July 2009 instead of November 2010, then you are affected.

quickfix:
1. get http://code.kliu.org/misc/pendmove/ and put it in the path.
2. run batch file

@echo off
echo Reminder: This must be run from an elevated command prompt!
pause

if ["%PROCESSOR_ARCHITECTURE%"] == ["x86"]   goto x86-32
if ["%PROCESSOR_ARCHITECTURE%"] == ["AMD64"] goto x86-64

echo Invalid PROCESSOR_ARCHITECTURE!
goto end

:x86-32
set SourceRoot=%SystemRoot%\winsxs\x86_usbport.inf_31bf3856ad364e35_6.1.7601.17514_none_bfc9c95e61cfba61
set SourceRoot2=%SystemRoot%\winsxs\x86_winusb.inf_31bf3856ad364e35_6.1.7601.17514_none_f9fc4e7173e3735c
goto start

:x86-64
set SourceRoot=%SystemRoot%\winsxs\amd64_usbport.inf_31bf3856ad364e35_6.1.7601.17514_none_1be864e21a2d2b97
set SourceRoot2=%SystemRoot%\winsxs\amd64_winusb.inf_31bf3856ad364e35_6.1.7601.17514_none_561ae9f52c40e492
goto start

:start
pushd %SystemRoot%\System32\drivers

copy %SourceRoot%\usbehci.sys usbehci.sys.new
pendmove usbehci.sys.new usbehci.sys

copy %SourceRoot%\usbport.sys usbport.sys.new
pendmove usbport.sys.new usbport.sys

if exist winusb.sys (
    copy %SourceRoot2%\winusb.sys winusb.sys.new
    pendmove winusb.sys.new winusb.sys
)

popd
echo Now you need to reboot.

:end
pause


See full thread at http://forums.mydigitallife.info/threads/24666-The-Windows-7-SP1-USB-Driver-Bug-(what-it-is-and-how-to-fix-it)


EDIT
Looks like hotfix KB2615763-v2 eliminates the need for this garbage. See forum post dated 19 Oct 2011, 12:35 AM

November 12, 2010

Adobe Flash full screen without focus

These simple instructions should keep for a while despite all the changes to flash versions.


Flash does not like to stay running full screen after it loses focus. Adobe says this is by design.
This works only for Win7, x64, firefox. Chrome has its own version in a different folder. IE uses ActiveX.


hex edit (HxD)

C:\Windows\SysWOW64\Macromed\Flash\

NPSWF32.dll

don't have another version of your file ending with .dll even if different name.

around Offset 0x180D40

74 39 83 E8 07 74 11 83 E8 05 75 13 8B

change to

90 90 83 E8 07 74 11 83 E8 05 75 13 8B


more discussion at http://bramp.net/blog/full-screen-hack-for-flash

November 9, 2010

editing vado HD files

Editing vado files with Adobe Premiere CS5:
by default you can only edit the audio, and there's no video.

If you search for 'x264vfw' you will find a sourceforge project at
http://sourceforge.net/projects/x264vfw/

download the latest file for your x32 or x64 system and install it. No reboot required if you have Premiere closed during install.