Exchange 2007 : User Mailflow Tracking

Exchange 2007 : User Mailflow Tracking

The following Exchange Shell commands will produce send/receive reports for user mail and export to CSV in the local directory:

get-messagetrackinglog -resultsize unlimited -server CAHTSRV02 -sender [email protected] -eventid send | select-object @{Name=”Recipients”;Expression={$_.recipients}},MessageSubject,Timestamp | export-csv userSurname-SentCAHTSRV02.csv

get-messagetrackinglog -resultsize unlimited -server CAHTSRV01 -sender [email protected] -eventid send | select-object @{Name=”Recipients”;Expression={$_.recipients}},MessageSubject,Timestamp | export-csv userSurname-SentCAHTSRV01.csv

get-messagetrackinglog -resultsize unlimited -server CAHTSRV01 -recipients [email protected] -eventid receive | select-object sender,MessageSubject,Timestamp | export-csv userSurname-ReceivedCAHTSRV01.csv

get-messagetrackinglog -resultsize unlimited -server CAHTSRV02 -recipients [email protected] -eventid receive | select-object sender,MessageSubject,Timestamp | export-csv userSurname-ReceivedCAHTSRV02.csv

Oracle 10.2.0.5 64-bit Client Install on Windows 2008 R2

Oracle 10.2.0.5 64-bit Client Install on Windows 7 / 2008 R2

In order to install the Oracle 10.2.0.5 64-bit client on Windows 2008 R2 (or Windows 2008 64-bit) you’ll need to execute setup using the following arguments:

setup.exe -ignoreSysprereqs -ignorePrereq

Note; This is CASE SENSITIVE

Thanks to ORACLE Note 1061272.1/aleys.net for this tip 😉

AD CS : Recover Private Key using Key Archival

AD CS : Recover Private Key using Key Archival

On an encrypted file obtain the certificate Public Key thumbprint using efsutil:

efsutil.exe /c

 

 

Open CA Manager snap-in in MMC

  1. Select Issued Certificates
  2. View > Add / Remove Columns > Add Archived Key

 

Search for user EFS Certificate with the same thumbprint as used on the encrypted file

 

 

Copy the certificate serial number, in this case ‘29 55 89 a8 00 00 00 00 00 e2

 

 

From the CLI on the CA with the archived key execute the command as Administrator; this will create a file in the current directory named outputblob

certutil -getkey 29 55 89 a8 00 00 00 00 00 e2” outputblob

 

Move the outputblob file to C:\ using the command; move outputblob C:\

 

Recover the private key using the command: certutil -recoverkey outputblob bradfordc_efs.pfx

 

 

Now import the new PFX certificate into the personal store on the computer where you are trying to access the encrypted data.

BO XI : Internet Explorer Issues

BO XI : Internet Explorer Issues

I came across an interesting issue with a BO XI deployment today, essentially users were unable to use Internet Explorer to connect to the Web Application; when trying to open the logon page they receieved an IE error stating that ‘Internet Explorer cannot display the page’. Further investigation showed that Firefox and other browsers worked.

The environment was BO XI running on Windows Serevr 2008 R2 (therefore IIS7/Tomcat)

This led me to look at Windows Authentication as IE would use NTLM whereas the other browsers would not.

After a dig around on the SAP support portal I cam across SAP 1292826 – Error: Internet Explorer cannot display the page. Essentially the solution was to modify the server.xml file located under \Program Files (x86)\Business Objects\Tomcat55\conf

  1. Search for ‘maxHttpHeaderSize‘ – this will likely be set to 8192.
  2. Change this to equal 32768 then restart the Apache Tomcat Service.

AD Migration : Cleanup extensionAttributes

AD Migration : Cleanup extensionAttributes

The Quest migration tools use extensionAttributes to keep objects in the source and destination domains. the script below will remove these entries. Change the desired extensionAttributes you wish to purge, as highlighted in red. You can also change the scope by changing strFilter and strOU.

   Const ADS_PROPERTY_DELETE = 4
   Const ADS_PROPERTY_UPDATE = 2
   Const ADS_PROPERTY_CLEAR = 1
  
   Dim strFilter ‘As String
   Dim oConnection ‘As ADODB.Connection
   Dim oRecordSet ‘As ADODB.RecordSet
   Dim strQuery ‘As String
   Dim strDomainNC ‘As String
   Dim oRootDSE ‘As IADs
   Dim vArray ‘As Variant()
   Dim vSid ‘As Variant
   Dim oDirObject ‘As Variant
   Dim strOU ‘As String

   ‘ Find the domain naming context
   set oRootDSE = GetObject(“LDAP://RootDSE”)
   strDomainNC = oRootDSE.Get(“defaultNamingContext”)
   set oRootDSE = Nothing

   ‘ Setup the ADO connection
   Set oConnection = CreateObject(“ADODB.Connection”)
   oConnection.Provider = “ADsDSOObject”
   oConnection.Open “ADs Provider”
   strOU = “OU=IT,”
   strFilter = “(&(objectClass=user)(objectCategory=person))”
   ‘strFilter = “(&(objectClass=computer))”
   ‘strFilter = “(&(objectClass=group))”
   strFilter = “(&(objectClass=contact))”
   strQuery = “;” & strFilter & “;distinguishedName,objectClass,name,extensionAttribute8,extensionAttribute9,targetAddress”

   ‘Execute the query
   set oRecordSet = oConnection.Execute(strQuery)

   if oRecordSet.Eof then
     WScript.Echo “No objects were found”
     WScript.Quit(0)
   Else
     Dim vClasses ‘As Variant
     Dim strClass ‘As String

     WScript.Echo “The following objects were found:”

     ‘ Iterate through the objects that match the filter
     While Not oRecordset.Eof
        vClasses = oRecordset.Fields(“objectClass”).Value
        strClass = vClasses(UBound(vClasses))
        If IsNull(oRecordSet.Fields(“extensionAttribute8“).Value ) and IsNull(oRecordSet.Fields(“extensionAttribute9“).Value) Then
            ‘Values Empty
        Else
            WScript.Echo chr(34) & oRecordset.Fields(“distinguishedName”).Value  & chr(34) & “,” & _
              chr(34) & oRecordset.Fields(“name”).Value   & chr(34) & “,” & _
              chr(34) & oRecordset.Fields(“extensionAttribute8“).Value & chr(34) & “,” & _
              chr(34) & oRecordset.Fields(“extensionAttribute9“).Value & chr(34)

              If InStr(oRecordset.Fields(“name”).Value, “/”) Then
                  ‘Ignore entries with a “/” in the canonical name – this will cause the script to fail
              Else
                set oDirObject = GetObject(“LDAP://” & oRecordset.Fields(“distinguishedName”).Value)
                oDirObject.PutEx ADS_PROPERTY_CLEAR, “extensionAttribute8“,  0
                oDirObject.SetInfo   
                oDirObject.PutEx ADS_PROPERTY_CLEAR, “extensionAttribute9“,  0
                  oDirObject.SetInfo
                End If   
        End if
        oRecordset.MoveNext
     Wend
   End if

   ‘Clean up
   Set oRecordset = Nothing
   Set oConnection = Nothing

 
Function OctetToHexStr(sOctet)
  Dim k
  OctetToHexStr = “”
  For k = 1 To Lenb(sOctet)
    OctetToHexStr = OctetToHexStr _
      & Right(“0” & Hex(Ascb(Midb(sOctet, k, 1))), 2)
  Next
End Function

AD Migration : Dump SIDHistory

AD Migration : Dump SIDHistory

Use the following script to dump SIDHistory for all objcts, or those under a particular OU. Change the strOU attrobute to “” if you wish to dump the SIDHistory for ALL objects, limit the objects that the SIDHistory  is gathered for by using the strFilter attribute. For example:

  • To report on User Account only, change strFilter to: “(&(objectClass=user)(objectCategory=person))”
  • To report on Groups chang strFilter to “(objectClass=Group)”

Save the script below into a vbs file then execute using the command: cscript.exe /nologo .vbs >> SIDHistory

Const ADS_PROPERTY_DELETE = 4

   Const ADS_PROPERTY_UPDATE = 2

   Dim strFilter ‘As String
   Dim oConnection ‘As ADODB.Connection
   Dim oRecordSet ‘As ADODB.RecordSet
   Dim strQuery ‘As String
   Dim strDomainNC ‘As String
   Dim oRootDSE ‘As IADs
   Dim vArray ‘As Variant()
   Dim vSid ‘As Variant
   Dim oDirObject ‘As Variant
   Dim strOU ‘As String

   ‘ Find the domain naming context
   set oRootDSE = GetObject(“LDAP://RootDSE”)
   strDomainNC = oRootDSE.Get(“defaultNamingContext”)
   set oRootDSE = Nothing

   ‘ Setup the ADO connection
   Set oConnection = CreateObject(“ADODB.Connection”)
   oConnection.Provider = “ADsDSOObject”
   oConnection.Open “ADs Provider”
   strOU = “OU=IT,”
   strFilter = “(&(objectClass=*))”
   strQuery = “;” & strFilter & “;distinguishedName,objectClass,name,sidHistory;subtree”

   ‘Execute the query
   set oRecordSet = oConnection.Execute(strQuery)

   if oRecordSet.Eof then
     WScript.Echo “No objects were found”
     WScript.Quit(0)
   Else
     Dim vClasses ‘As Variant
     Dim strClass ‘As String
     WScript.Echo “Name, Class, DN, SIDHistory”
     While Not oRecordset.Eof
        vClasses = oRecordset.Fields(“objectClass”).Value
        strClass = vClasses(UBound(vClasses))
        If IsNull(oRecordSet.Fields(“sIDHistory”).Value ) Then
           ‘object does not have a sidHistory
        Else
            ‘WScript.Echo chr(34) & oRecordset.Fields(“name”).Value & chr(34) & “,” & _
            ‘    chr(34) & strClass & chr(34) & “,” & chr(34) & _
            ‘    oRecordset.Fields(“distinguishedName”).Value & chr(34)
           
            set oDirObject = GetObject(“LDAP://” & oRecordset.Fields(“distinguishedName”).Value)
               vArray = oDirObject.GetEx(“sIDHistory”)
              
               For Each vSid in vArray
                   If OctetToHexStr(vSid) > “” Then
                       WScript.Echo chr(34) & oRecordset.Fields(“name”).Value & chr(34) & “,” & _
                        chr(34) & strClass & chr(34) & “,” & chr(34) & _
                        oRecordset.Fields(“distinguishedName”).Value & chr(34) & “,” & chr(34) & _
                        OctetToHexStr(vSid)    & chr(34)
                End If
            Next
        End if

        oRecordset.MoveNext
     Wend
   End if

   ‘Clean up
   Set oRecordset = Nothing
   Set oConnection = Nothing

 
Function OctetToHexStr(sOctet)
  Dim k
  OctetToHexStr = “”
  For k = 1 To Lenb(sOctet)
    OctetToHexStr = OctetToHexStr _
      & Right(“0” & Hex(Ascb(Midb(sOctet, k, 1))), 2)
  Next
End Function

SQL : SQL Server Migration Process

SQL Server Migration Process

 

Environment information:

  • Old Domain Name: domold.local / DOMOLD
  • New domain name: domnew.local / DOMNEW

You will need to update these domain names in the relevant processes and scripts detailed below.

Identification of Application Domain Dependencies

Stage one of this process is to establish any domain dependencies within an application. This includes email and active directory (authentication).

Recreation of Service Accounts

Logon to the system you are intending to migrate and identify all service accounts that are on the old domain;

 


 

Each of these accounts must be recreated on the new domnew.local domain. Each account should be prefixed with ‘svc_’ in order to easily identify service accounts in the future.

 

  

 

The accounts should also be configured so that the password does not expire, passwords should be documented. Once recreated you must now modify services so that they use the new service account:

 

         

 

It may also be necessary to mail-enable service accounts, ensuring they have the correct email address.

 

 

File System Permissions

Verify file system permissions and create additional entries for the new service account. Generally speaking these will be application specific directories and must be set manually.


Quest Tools Processing

 

EU Operations are now able to process the machine using the Quest tools. This tool will ensure all file system level user permissions are migrated on the server (excluding service accounts).


  

 

After completion of this step we can now move the server into the domnew.local domain, once complete the server will reboot.

 

  

 

 

Local Server Security Polices

 

Local security policies must be modified to allow logon as a service / batch job rights for individual accounts. On the old domain this was done via GPO, however we have now moved back to local security policies to achieve this.

Identify where the existing service account has been granted permissions and manually recreate them.

 

To identify current permissions Start > Run > gpedit.msc to load the local security policy editor.

 

  

 

 

Expand Computer Configuration > Windows Settings > Security Settings > Local policies > User Rights Assignment

 

  

 

Check for any entries for the local domain such as DOMOLD accounts and replace these with DOMNEW accounts.

                               

 

Application Level Changes

We are now ready to change application level domain dependencies on the migrated server as identified in stage one.

Scheduled Tasks

You will need to ensure all scheduled tasks are using DOMNEW accounts.

  

For non-SQL servers the migration process ends here.


SQL Server Specific Elements for Migration

Create a new service account; this account must be a local administrator on the machine:

 

  

 

The account must be granted logon as a service rights:

 

  

 

 

The account must be granted a SQL Login at the server instance level, this can be achieved form within Enterprise Manager:

 

  

 

         

 

     

 

Please note if the account is shown as the ‘dbo’ user do not set the permissions, instead you must run the sp_changedbown stored procedure against the database:

 

  

 

The Query should look as follows:

 

USE

Expediciones

EXEC sp_changedbowner DOMNEW\SVC_USD1SQL’

 

USE

mdb

EXEC sp_changedbowner DOMNEW\SVC_USD1SQL’

 

Change the Database name (in bold) and the username as is appropriate.

Next we must change the SQL Agent Job owners for the database. You can view all jobs from enterprise manager:

 

  

 

Double-click each job and change the owner to the new DOMNEW object:

 

  


To automate job changes you can use the following T-SQL script, this will change the owner of all jobs that have domold.local ownership to domnew.local\svc_sqladmin

 

–********* Before proceeding please backup the MSDB database in order to provide roll-back. ***********

 

USE MSDB

GO

SELECT GETDATE() AS ‘ExecutionTime’

GO

SELECT @@SERVERNAME AS ‘SQLServerInstance’

GO

SELECT j.[name] AS ‘JobName’,

Enabled = CASE WHEN j.Enabled = 0 THEN ‘No’

ELSE ‘Yes’

END,

l.[name] AS ‘OwnerName’

FROM MSDB.dbo.sysjobs j

INNER JOIN Master.dbo.syslogins l

ON j.owner_sid = l.sid

WHERE l.[name] like ‘%DOMOLD\%’ or l.[name] like ‘%DOMOLD\%’

ORDER BY j.[name]

GO

 

SET NOCOUNT ON

SELECT ‘EXEC MSDB.dbo.sp_update_job ‘ + char(13) +

‘@job_name = + char(39) + j.[Name] + char(39) + ‘,’ + char(13) +

‘@owner_login_name = ‘ + char(39) + DOMNEW\svc_sqladmin’ + char(39) + char(13) + char(13)

FROM MSDB.dbo.sysjobs j

INNER JOIN Master.dbo.syslogins l

ON j.owner_sid = l.sid

WHERE l.[name] like ‘%DOMOLD\%’ or l.[name] like ‘%DOMOLD\%’

ORDER BY j.[name]

 

 

 

Next we must identify and change all DTS Packages that are owned by old domain accounts. The following T-SQL will identify all unique accounts, which own DTS packages:

 

SELECT distinct owner FROM sysdtspackages

 

 

You will need to manually list the unique users and then run the following T-SQL for each user. Change the @old_owner and @new_owner definition at the start of the script:

 

–********* Before proceeding please backup the MSDB database in order to provide roll-back. ***********

 

DECLARE @old_owner varchar(100), @new_owner varchar(100), @name sysname, @id uniqueidentifier

 

set @old_owner = ‘DOMOLD\sqladmin’

set @new_owner = DOMNEW\svc_sqladmin’

 

IF (NOT EXISTS (SELECT * FROM sysdtspackages WHERE [owner] = @old_owner))

BEGIN

   RAISERROR(‘User ”%s” does not own any packages’, 16, 1, @old_owner)

   RETURN

END

 

SELECT DISTINCT [name], [id]

FROM sysdtspackages

WHERE [owner] = @old_owner

 

 

DECLARE cur_sysdtspackages CURSOR FOR

   SELECT DISTINCT [name], [id]

   FROM sysdtspackages

   WHERE [owner] = @old_owner

OPEN cur_sysdtspackages

FETCH NEXT FROM cur_sysdtspackages

INTO @name, @id

WHILE @@FETCH_STATUS = 0

BEGIN

     Print +N’Re-assigning owner on DTS Package: ‘ + @name

       EXEC sp_reassign_dtspackageowner @name[email protected], @id[email protected], @newloginname[email protected]_owner

     FETCH NEXT FROM cur_sysdtspackages

     INTO @name, @id

END

CLOSE cur_sysdtspackages

DEALLOCATE cur_sysdtspackages

 

 

Finally, change the credentials for the SQL services:

  

 

Enter the new DOMNEW username and password:

 

  

Verify that Database Level Users are added for the new DOMNEW domain:

  

 

DNS : Enabling DNS Dynamic Update Credentials

DNS : Enabling DNS Dynamic Update Credentials

 

For further info see MS KB Article: http://support.microsoft.com/default.aspx/kb/816592

 

This should be setup when you enabled secure updates only for an AD-Integrated DNS zone and have devices that are unable to perform secure dynamic updates of their A/PTR records. Examples of this type of device are Thin Client terminals.

 

Configure service account details on each server as detailed below, use the service account ‘svc_dnsproxy

 

    

 

Then add the computer objects to the ‘DNSUpdateProxy’ group in AD:

 

 

Finally it is necessary to remove the stale records from reverse DNS manually. We can immediately clear the 10.144.X.X reverse DNS records then selectively remove remaining stale records ensuring that DCs, Servers and Static Addresses are not deleted.

 

Forward lookup entries should not be affected by this change.

 

This change will probably be necessary on all European sites.

 

Records will now register as follows:

 

ESXi : Performing P2V Conversions using VMWare Converter

ESXi : Performing P2V Conversions using VMWare Converter

 

In order to convert a system it must be out of production – i.e. no transactions or processing can take place during the conversion.

 

I recently had to conduct around 60 P2V migrations to an ESXi cluster. The physical machines were on various subnets protected by firewalls that could not be modified ad-hoc to facilitate the migrations. I had two options:

 

1.        Create rules for P2V communication; this requires (more information here: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1010056)

 

Source

Destination

TCP Ports

UDP Ports

Converter server

Source computer

445, 139, 9089, 9090

137, 138

Converter server

VirtualCenter

443

 

Converter client

Converter server

443

 

Source computer

ESX

443, 902

 

 

2.        Use a conversion hub to bridge the required networks and act as the converter. This should be a Windows 2008 R2 VM with a VMXNET3 adapter connected to each network hosting physical machines )enabled on-demand, as required). The server should have RRAS installed as detailed below; this server must have an interface on the management network of the ESXi hosts.

 

 

  

 

  

 

 

Concepts;

3 servers are involved in the migration process;

  • Source Server – the physical server you wish to convert to a virtual server
  • ESX/Destination Server – the destination ESX host you wish to virtualise the physical server too.
  • Converter Server – hostname vCONVERTER – Standalone Windows 2008 R2 with IP Routing Capabilities and VMware Converter – use RDP to access.

 

You have two options for the P2V conversion;

1.        Online (with transactional processing stopped)

2.        Cold Clone

 

For cold clone scenarios boot from the cold clone CD available and then proceed from step 6 under P2V Conversion. Things to bear in mind:

  • You cannot ping the WindowsPE cold clone operating system, this is due to Windows Firewall. You can disable this using petool (supplied with cold clone ISO) – petool -i -f –disable
  • The default gateway on the cold clone should be IP address of the vCONVERTER machine’s interface on the same subnet.
  • You can inject SCSI/Network drivers into the coldclone iso file using petool, use ‘-n’ for network and ‘-d’ for storage; petool -i -n

 

Online P2V

 

Preparation

 

1.        Reset the local administrator password on the source server, unless you are 100% sure you know the password.

 

2.        Stop all transactional processing (SERVICES) on the source server and then configure service start-up as follows:

a.       For SQL servers: set SQL services manual.

b.       For Citrix use the cold clone CD

c.        For a Domain Controller use the cold clone CD

 

3.        On the source server capture all IP addressing and NLB information/configuration:

 If the server is on a different subnet to the ESXi hosts you will need to configure host routes to facilitate firewall bypass:

For example:

  • Physical host IP address: 172.20.20.152
  • ESXi Server IP address: 10.144.120.1
  • vCONVERTER ESXi Mgmt Network IP: 10.144.120.100
  • vCONVERTER emote subnet IP address: 172.20.20.155

 

                     I.      On the source server create a static host route to the ESXi server (change ESXi server IP address to suit), for example when EUVM01 (IP Address 10.144.120.1) is the destination – change the IP highlighted to suit:

route add 10.144.120.1 mask 255.255.255.255 172.20.20.155 -p

 

                    II.      On the destination ESXi server create a static host route to the source server (change source server IP address to suit), for example when ECOMWA4 is the source server – change the IP highlighted to suit:

esxcfg-route -a 172.20.20.152/32 10.144.120.100

 

 

P2V Conversion

 

1.        Logon to vcCONVERTER using Remote Desktop.

 

2.        Enable the additional NIC that is valid for your required conversion, at the very least you require the following NICs to be enabled:

a.       VMGMT-NETWORK-10.144.120.100-VLAN120

b.       INTERNAL

 

 

3.        Open the VMWare Converter Standalone Client from the desktop:

 

 

4.        Select connect to local server and click ‘Login’

 

 

5.        Click the Convert Machine button to proceed:

 

 

6.        Enter the source server name or IP address, authentication details and then click ‘Next.’ You may be prompted to install the VM Conversion agent, proceed; however this may reboot the server.

 

 

 

Once installed manually reboot the server.

 

7.        You will then be prompted to select a destination host. Because we have vApps the old converter crashes when you connect to the vCenter – If you do the converter will crash and you will have to start again!

 

 

8.        Enter the desired VM name (just the hostname, not FQDN), select the correct storage pool and ensure that the VM version is ‘Version 7’

 

 

9.        You are now able to modify the hardware that the virtual machine will be allocated; click EDIT next to any of the groups (Network etc) to begin the customisation.

 

 

Firstly configure the NIC VLAN membership; do not create teams etc.

  • Un-tick the ‘Connect at power on’ option.
  • Do not worry about selecting the correct VLAN/Network at this stage, for some reason this is ignored during the conversion process.

 

 

10.     Now reduce the CPU count to 1 or 2(MAX) depending on function of the server.

 

 

11.     Finally increase/decrease the storage allocation for each LUN, beware there are three type of clones that can occur:

1.        Disk-based Block-Level (Disk-based)

Available during a cold clone only; disks are copied to the destination block by block.

 

2.        Volume-based Block-Level (Volume-based)

Examine the source partition to determine what the partition boundaries are on-disk and then copy just the selected partitions on to the target disk on a block-by-block basis

 

3.        Volume-based File-Level (File-level)

Converter creates the target disk, partitions and formats it appropriately and copies over data from the source to the target on a file-by-file basis

 

If you reduce the size of a volume it will use the Volume-based File-Level method; typically this is around 5-10 times slower. In a trial conversion of a BL35p we saw Volume-based Block-Level run at around 18MB/sec and Volume-based File-Level run at around 100-300KB/sec. Disabling anti-virus, defragging the volume may help to speed up Volume-based File-Level clones.

 

Select Advanced

 

 

12.     If the server has 2 partitions split these into different vDisks as it will make future growth exercises far easier, click the Add Disk, then click the ‘Move Down’ – do this for each partition.

 

 

You can, if desired, perform a ‘Thin’ P2V using the option available here under the ‘Type’ column select the drop-down box to change disk format to thin.

 

13.     Service Management:

a.        If server is a Citrix Server set all Citrix services to ‘Manual’

b.        If this is a SQL Server set all SQL services to Manual

c.        Disable all HP (or similar OEM) Hardware/Management Services:

 

 

14.     Finally select the ‘Power off source machine’ and ‘Install VMWare Tools…’ options, then click ‘Next.’

 

 

 

 

15.     Review the task you are about to initiate, then click Finish – you may be prompted to reboot the source server, click Yes to reboot – the conversion will start automatically after the reboot.

 

 

 

16.     Once the VM conversion has finished power on the VM and then allow the server to reboot automatically once it has installed the VM tools, you’ll be prompted to select a host to power on the VM on:

 

 

17.     If the physical server was a Windows 2000 server, check that it is not stuck on the ‘It is now safe to turn off your computer’ screen. Physically power it off and remove from the rack/chassis.

 

18.     If server was IDE based you will need to perform the steps here and modify the vmdk files so that the adapterType is not IDE but buslogic. Then detach and re-attache the VMDK:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1016192

 

 

 

19.     If the server is a Windows 2003 or newer server, or you P2V’d using the cold clone disk you will have to add a new adapter,

o         For Windows 2003/2008/R2: remove all E1000 adapters on Windows 2000+ VM’s and use VMXNET3,

o         For Windows 2000 use E1000.

 

Click Add, select Ethernet Adapter and change the type to VMXNET3. Finally select the desired network to connect to.

 

 

 20.     From the assign the correct VLAN to each virtual NIC, enable one at a time to know the correct one for each VLAN – they will become active in Control Panel once connected:

 

 

21.     Power off and remove all COM Ports, Floppy Drives and USB Controllers, once complete power on the server:

 

 
 

22.     From Add/Remove Programs remove all HP components except from Data Protector. Once completed reboot the server. You may have to kill a stuck service using task manager if the HP Insight Agents are in a Stopping State, look for cqmgserv.exe.

 

 

23.     Manually remove the HP Network Team Adapter from Device Manager:

 

 

24.     Take a snapshot of the Virtual Machine.

 

25.     Download and run the ‘renewusb_2k.cmd’ (available here: http://cb-net.co.uk/downloads/devcon.zip) script to cleanup hidden/now invalid devices.

 

26.     If server is a HP server download (available here: http://cb-net.co.uk/downloads/HPPSPCleaner.exe). Credits for this tool http://ctxadmtools.musumeci.com.ar/HPPSPCleaner/HPPSPCleanerDownload.html.

 

 

Check network connectivity, check network connectivity x-chassis’ and x-host

 

27.     Delete static route from ESXi server (modify to suit the route you created earlier!):

esxcfg-route -d 172.20.20.141/32 10.144.120.100

 

28.     Delete the route from the Windows Host

 

29.     Delete the snapshot you created earlier.

 

 

30.     If this is a Citirx server perform the following additional actions:

                                                       

a.        To ensure users cannot access VMware Tools from the system tray or control panel:  

1.        Go to C:\Program files\VMware\VMware Tools .

2.        Right-click VMControlPanel.cpl properties and choose Security.

3.        Click Advanced and deselect Allow inheritable permissions.

4.        Click Deny for Read and Execute and Read for the users

5.        Log in as an Administrator.

6.        Right-click on the VMware Tools system tray icon.

7.        Choose Disable.

8.        In the registry editor, delete the VMware Tools key under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

 

b.        Install WindowsServer2003-KB978243-x86-ENU.exe from P2V folder.

c.        Set /NoExecute=OptIn in the boot.ini file if the Citrix server is x86.

d.        Again, for Citrix Ensure that WindowsServer2003-KB2279561-x86-ENU.exe is installed (available in P2V folder) – this resolves stop 0x00000050 errors when using user mode printer drivers:

 

 

e.        If server is a Citrix server adjust the page file to be RAM x 2 + 100MB (or if equal to/above 8GB RAM then RAM + 100MB)

f.         If you have modified the PageFile and extended the System drive run PageDefrag to create a contagious page file.

g.        If server is a Citrix server set services back to the correct start-up value:

 

 

h.        Finally, in order to ensure user profiles are not corrupted:

1.        Access the Windows Registry. Choose Start > Run, then type regedit. The Registry Editor window opens.

2.        Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\.

3.        Right-click ProviderOrder and choose Modify. In the Edit String Value dialog box, edit the value data string and remove the word hgfs, vmhgs, or vmhgfs).

o        If the value data string contains LanmanWorkstation,hgfs, LanmanWorkstation,vmhgs, or LanmanWorkstation,vmhgfs, change it to LanmanWorkstation.

o        If the value data string contains only hgfs or vmhgfs, erase it and leave the value data string empty.

4.        Click OK.

5.        Close the registry editor. Choose File > Exit.

Reboot the virtual machine.

 

31.     If server is Windows 2003+ use Network Load Balancer MMC tool to re-add host, for Windows 2000 manually reconfigure the host. Including adding the secondary IP address to the host.

 

32.     If server is a Windows 2003 server power off VM and configure Hardware Instruction Set and MMU virtualisation. Under the properties of the VM select the ‘options’ tab, then select CPU/MMU Virtualisation options. Select the value to suit your environment.

 

 

33.     Again, if the server was a HP server, Delete the following registry keys:

Ø       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CPQTeamMP

Ø       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CPQTeam

Ø       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cpqasm2

Ø       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CpqCiDrv

Ø       HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CpqCiDrv\Security

 

34.     Remove any HP Network Utility bindings from the VM NICs

 

 

35.     Configure LAN interface power management options (disable power management!):

 


36.     Move VM to the correct resource pool and adjust resource pool shares accordingly

37.    Confirm that the following DWORD value is set to HEX 3C:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Disk\TimeOutValue

38.     Test server/application.

ESXi : Using VMA to manage ESXi server logs

ESXi : Using VMA to manage ESXi server logs

ESXi uses a scratch partition to store logs files; when a server is restarted/rebooted logs will be lost. Using vMA it is possible to ship logs to another server in order to preserve them for troubleshooting purposes.

Logs are stored under /var/log/vmware/


 

The following logs are collected from ESXi servers:

  • Hostd – Host Management service log
  • messages – VMkernel, vmkwarning, and hostd log
  • vpxa – vCenter Agent log

 

 

The settings defined in your vMA setup will determine how many logs are stored for your ESXi hosts, for example the following command will store 20 log files with a maximum size of 10MB per log file, logs will be collected every 10 seconds:

vilogger enable –server vm01.domain.local –numrotation 20 –maxfilesize 10 –collectionperiod 10

 

It is also possible to use the built-in syslog server to store logs to a datastore: http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1016621