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