Configure iDRAC with RACADM

To setup a iDRAC with a static ip address, you can use the following commands from the Dell server:

 

racadm config -g cfgLanNetworking -o cfgNicIpAddress 10.0.0.1
racadm config -g cfgLanNetworking -o cfgNicGateway 10.0.0.254
racadm config -g cfgLanNetworking -o cfgNicNetmask 255.255.255.0
racadm config -g cfgLanNetworking -o cfgNicUseDHCP 0
racadm config -g cfgLanNetworking -o cfgDNSServersFromDHCP 0
racadm config -g cfgLanNetworking -o cfgDNSServer1 10.0.0.100
racadm config -g cfgLanNetworking -o cfgDNSServer2 10.0.0.101
racadm racreset

 

It is not necessary to do a reset of the idrac (last command).

 

To configure it for a remote server use:

racadm -r <ip address or hostname> -u <username> -p <password> <subcommand>

 

references:

RACADM Command Line Interface for DRAC

Using the Local RACADM Command Line Interface

send “show tech all” from a HP switch to a tftp server

Introduction

A ‘show tech all’ file contains a lot of information from the switch. Although it is possible to capture this output using session logging in your telnet or terminal emulator application, it is better to transfer the file via TFTP. Session logs tend to have a lot of control sequences embedded which makes it difficult for us to analyze the file.

 

If you do not have IP connectivity on the switch and the switch has a console port, it is possible to transfer the ‘show tech all’ file via the console cable, see at the end of this document.

Requirements

* You must have a TFTP server running on a PC (See ‘obtaining a TFTP server’ below)

* Your switch must have IP connectivity to the PC running a TFTP server

* You must have command line access to the switch

Obtaining a TFTP server

You can download a simple and easy to use TFTP server for free from http://www.solarwinds.com/

 

Alternatively you can download TFTPd32 from http://tftpd32.jounin.net/ which also includes simple SNTP, syslog and DHCP servers.

Obtaining the ‘show tech all’ via TFTP

Start your TFTP server:

tftp

 

Notice the ‘Current Directory’ setting; this is where the file from the switch will end up.

 

Also notice the ‘Server interfaces’ setting; this is the IP address you will specify on the switch command line when creating the ‘show tech all’ file.

 

 

Connect to the command line of the switch and log in if needed. You should NOT be in configuration mode on the switch, but you do need to be in enable (manager) mode. Issue the following command:

 

Switch# copy command-output ‘show tech all’ tftp 12.23.34.45 xxxx.txt

 

Where 12.23.34.45 is the IP address of the PC running the TFTP server, and xxxx is something to identify the switch.

 

 

The switch will now generate the required file, and transfer it to your PC via TFTP. You can pick up the file in the “Current Directory” folder and e-mail it to ProCurve support.

Obtaining the ‘show tech all’ via console cable

If there is no IP connectivity to the switch, it is still possible to obtain a ‘show tech all’ file if the switch has a console port. You can use Hyper Terminal which is typically installed with Windows, or you may choose to use a free application like Tera Term (http://en.sourceforge.jp/projects/ttssh2/releases/).

 

Connect the serial cable between your computer and the switch. Establish a connection, the parameters are 9600,8,N,1,N (9600 baud, 8 bits, no parity, 1 stop bit, no flow control).

 

***NOTE*** If the above settings don’t respond and you have a newer RJ45 looking Serial port on the switch use XON/XOFF instead of NONE at the last setting (Flow Control)***

 

 

When you have command line access via the console, issue the following command:

 

Switch# copy command ‘sh tech all’ xmodem

 

Now instruct the terminal emulator application to receive the file:

 

Hyper Terminal – In the menu select Transfer->Receive File, Set receiving protocol to XMODEM, and note the destination directory. Click Receive, name the file, and save.

 

Tera Term – In the menu select File->Transfer->XMODEM->Receive, name the file, and save.

 

Once the file transfer has completed, you can e-mail it to HPN support.

 

Note that the switch may time out before you start receiving the file. Simply press Arrow Up in the terminal session, re-execute the command, and try again.

 

Logging the output of ‘show tech all’ via a terminal emulator:

Choose Transfer -> Capture Text or the follow the examples below.

This opens a window where you can scroll down to the folder where you wish to save the logs to. In this “Browse” window you can also define a name for the log file, for instance YYYY-MM-DD-HH-MM.txt

hyperterminalputty

 

 

***If your preferred terminal emulator is Putty, ensure that you tick the option enabling “Printable output. ***

 

log

 

Choose the folder you wish to save the logs to. Your desktop is preferable.

Now your switch will send its logs to the file on your desktop, as long as it is connected via your terminal emulator.

 

download as word file: [wpdm_file id=83]

Shrink disks in Windows

First delete all VSS snapshots (e.g. disk F):

vssadmin delete shadows /for=f: /all

 

Optimize the disk with powershell:

Optimize-Volume -driveletter F -defrag -verbose

Resize the disk with powershell (e.d. to 450 GB):

Resize-Partition -Driveletter F –Size 450GB

Shrink the disk with diskpart (e.d. 1784 MB):

shrink minimum 1784

To check the Maximum size and the Minimum size to where a disk can shrink, use the following command:

Get-PartitionSupportedSize -DiskNumber 1 -PartitionNumber 1 | select @{Name=”Minimum Size (GB)”; Expression={$_.SizeMin/1GB}}, @{Name=”Maximum Size (GB)”;Expression={$_.SizeMax/1GB}}

With Diskpart

shrink querymax

How to Configure IPv6 Using Group Policy

By default, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista enable and use IPv6 as the default protocol. These versions of Windows will normally use IPv6 for all network communication and will step down to IPv4 as necessary.
You may decide to disable Windows IPv6 for several reasons. Perhaps your IPv4 network doesn’t support it, and you want to disable unnecessary protocols. You may have also read that IPv6 breaks Outlook Anywhere on Exchange 2007 Client Access servers.

Most people think that you disable IPv6 by simply unchecking the Internet Protocol Version 6 (TCP/IPv6) checkbox, as shown above. This method disables IPv6 on the particular LAN interface and connection. For other network adapters or connections, users have to repeat the steps to disable IPv6. However, disabling IPv6 this way does not disable IPv6 on tunnel interfaces or the IPv6 loopback interface. It also must be done manually and cannot be instrumented or enforced using Group Policy.

In order to truly disable IPv6, you must disable it in the registry in the following key:
Normally, the DisabledComponents value does not exist. If the value does not exist or the value data is 0, IPv6 is enabled on all interfaces.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents

Microsoft wrote KB article 929852 to document how to disable certain Internet Protocol version 6 (IPv6) components in Windows Vista (and later) manually using the registry. At the end of the article, Microsoft helpfully wrote, “Note: Administrators must create an ADMX file in order to expose the settings in step 5 in a Group Policy setting.” Nice. So, I decided to do just that.

I wrote the attached ADMX and ADML files to enable the configuration of IPv6 using Group Policy. Copy each file to the computer you will use to configure the policy.
IPv6Configuration.zip [wpdm_file id=82]- This ZIP file contains both the ADMX and ADML files:

  • IPv6Configuration.admx – Copy this file to %SYSTEMROOT%\PolicyDefinitions
  • IPv6Configuration.adml – Copy this file to %SYSTEMROOT&\PolicyDefinitions\en-US (Replace en-US with your country’s language, as necessary)

Now log into the computer and use the Group Policy Management Console (GPMC) to configure the IPv6 settings. The new policy will be located under Computer Configuration > Policies > Administrative Templates > Network > IPv6 Configuration, as shown below:

Here, you can configure the following IPv6 settings:

  • Enable all IPv6 components (Windows default)
  • Disable all IPv6 components (the setting you probably want)
  • Disable 6to4
  • Disable ISATAP
  • Disable Teredo
  • Disable Teredo and 6to4
  • Disable all tunnel interfaces
  • Disable all LAN and PPP interfaces
  • Disable all LAN, PPP and tunnel interfaces
  • Prefer IPv4 over IPv6

Note that you must restart the computer for the configuration to go into effect.

 

source: http://www.expta.com/2009/02/how-to-configure-ipv6-using-group.html

How to disable IP version 6 or its specific components in Windows

To disable certain IPv6 components yourself, follow these steps:

  1. Click Start
    Collapse this imageExpand this image

    Start button

    , type regedit in the Start Search box, and then click regedit.exe in the Programs list.

  2. In the User Account Control dialog box, click Continue.
  3. In Registry Editor, locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters \
  4. Double-click DisabledComponents to change the DisabledComponents entry.
    Collapse this imageExpand this image

    2683283

    Note If the DisabledComponents entry is unavailable, you must create it. To do this, follow these steps:

    1. In the Edit menu, point to New, and then click DWORD (32-bit) Value.
    2. Type DisabledComponents, and then press ENTER.
    3. Double-click DisabledComponents.
  5. Type any one of the following values in the Value data field to configure the IPv6 protocol to the desired state, and then click OK:
    1. Type 0 to enable all IPv6 components. (Windows default setting)
    2. Type 0xffffffff to disable all IPv6 components except the IPv6 loopback interface. This value also configures Windows to prefer using IPv4 over IPv6 by changing entries in the prefix policy table. For more information, see Source and Destination Address Selection
      (http://technet.microsoft.com/library/bb877985.aspx)

      .

    3. Type 0x20 to prefer IPv4 over IPv6 by changing entries in the prefix policy table.
    4. Type 0x10 to disable IPv6 on all nontunnel interfaces (both LAN and Point-to-Point Protocol [PPP] interfaces).
    5. Type 0x01 to disable IPv6 on all tunnel interfaces. These include Intra-Site Automatic Tunnel Addressing Protocol (ISATAP), 6to4, and Teredo.
    6. Type 0x11 to disable all IPv6 interfaces except for the IPv6 loopback interface.

source: http://support.microsoft.com/kb/929852/en-us

 

 

Creating a persistent scratch location for ESXi 4.x and 5.x (1033696)

source: http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1033696

 

VMware recommends that ESXi has a persistent scratch location available for storing temporary data including logs, diagnostic information, and system swap. (This is not a requirement, however.) Persistent scratch space may be provisioned on a FAT 16, VMFS, or NFS partition accessible by the ESXi host.

Note: Scratch space is configured automatically during installation or first boot of an ESXi host, and does not usually need to be manually configured. ESXi Installable creates a 4 GB Fat16 partition on the target device during installation if there is sufficient space, and if the device is considered Local.

If persistent scratch space is not available, ESXi stores this temporary data on a ramdisk, which is constrained in space. This might be problematic in low-memory situations, but is not critical to the operation of ESXi. Information stored on a ramdisk does not persist across reboots, so troubleshooting information such as logs and core files could be lost. If a persistent scratch location on the host is not configured properly, you may experience intermittent issues due to lack of space for temporary files and the log files will not be updated.

 

Configuring a persistent scratch location using PowerCLI

To configure persistent scratch space for ESXi using the vSphere PowerCLI interface:

Notes:

  • Before proceeding, ensure that /tmp/scratch exists. If it does not exist, use the command mkdir /tmp/scratch to create it.
  • For more information on vSphere PowerCLI usage, see the vSphere PowerCLI documentation.
  1. Open a command prompt where the PowerCLI is installed.
  2. Connect to the ESXi host using the command:connect-viserver esx_hostname_or_IP
  3. Obtain a list of datastores reachable from this ESXi host using the command:Get-Datastore
  4. Mount a datastore read/write as a PSDrive using the command:New-PSDrive -Name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore "DatastoreName")
  5. Access the new PSDrive using the command:Set-Location mounteddatastore:
  6. Create a uniquely-named directory for this ESXi host using the command:New-Item "DirectoryName" -ItemType directory

    For example:

    New-Item ".locker-ESXHostname" -ItemType directory

  7. Check the current value of the ScratchConfig.ConfiguredScratchLocation configuration option using the command:Get-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation"

    NoteVMHostAdvancedConfiguration has been deprecated in PowerCLI 5.1 and replaced with AdvancedSetting. For more information, see the vSphere PowerCLI documentation.

  8. Change the ScratchConfig.ConfiguredScratchLocation configuration option, specifying the full path to the directory created in step 6, using the command:Set-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/DatastoreName/DirectoryName"

    For example:

    Set-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/Datastore1/.locker-ESXHostname"

  9. Put the ESXi host into maintenance mode and reboot for the configuration change to take effect.

Dell: How to install Server Administrator on Windows 2012 Server Core Edition

Do the following to install Server Administrator on a Server Core. Once installed, you can launch OMSA using a supported remote browser.

1. Enable WOW component. Run the following command from the Server Core command prompt:

 dism /online /enable-feature /featurename:ServerCore-WOW64

2. Install x64 Server Administrator. Run the following command to install

Msiexec /i SysMgmtx64.msi

3. Disable WOW: Run the following command to disable WOW feature.

 dism /online /disable-feature /featurename:ServerCore-WOW64

4. Reboot the system.

Note: Disabling or enabling the WOW component would require system reboot.

5. Server Administrator is installed. You can launch the Server Administrator from a remote device as Server Core does not have the user interface

DiskPart has encountered an error: The media is write protected.

During the creation of a new disk, the error “The media is write protected” pops up.

Check if the disk (or volume) is in a read-only state:

DISKPART> attributes disk
Current Read-only State : Yes
Read-only : Yes
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No

If the disk or volume is in a read-only state, clear the attribute with the following command:

 

attributes disk clear readonly

attributes volume clear readonly

Go ahead with the creation of the new disk

Copy vswitch information between ESX servers

Below is a script to copy vswitch information from a source ESX server to a destination ESX server.

All vswitch, network and vlan information will be copied.

# Define Variables 
$VCServer = "vc-server" 
$cred = Get-Credential

# Connect server 
$VC = Connect-VIServer -Server "$VCServer" 

#$VISRV = Connect-VIServer (Read-Host "Please enter the name of your VI SERVER")
$BASEHost = Get-VMHost -Name (Read-Host "Please enter the name of your existing server as seen in the VI Client:")
$NEWHost = Get-VMHost -Name (Read-Host "Please enter the name of the server to configure as seen in the VI Client:")

$BASEHost |Get-VirtualSwitch |Foreach {
   If (($NEWHost |Get-VirtualSwitch -Name $_.Name-ErrorAction SilentlyContinue)-eq $null){
       Write-Host "Creating Virtual Switch $($_.Name)"
       $NewSwitch = $NEWHost |New-VirtualSwitch -Name $_.Name-NumPorts $_.NumPorts-Mtu $_.Mtu
       $vSwitch = $_
    }
   $_ |Get-VirtualPortGroup |Foreach {
       If (($NEWHost |Get-VirtualPortGroup -Name $_.Name-ErrorAction SilentlyContinue)-eq $null){
           Write-Host "Creating Portgroup $($_.Name)"
           $NewPortGroup = $NEWHost |Get-VirtualSwitch -Name $vSwitch |New-VirtualPortGroup -Name $_.Name-VLanId $_.VLanID
        }
    }
}