Wednesday, September 28, 2011

Linux rescan SCSI bus

If you add a new disk to a Linux VM system and you don't want to reboot it, you must rescan the SCSI bus to detect it.

Here you can find a bash script that will do this task for you:

Thanks to garloff.


Wednesday, September 21, 2011

Console access on esxi (3.x, 4.x)

This text is from
By default this isn’t possible. But there’s a way to get this working, just do the following:
  1. Go to the ESXi console and press alt+F1
  2. Type: unsupported
  3. Enter the root password(No prompt, typing is blindly)
  4. At the prompt type “vi /etc/inetd.conf”
  5. Look for the line that starts with “#ssh” (you can search with pressing “/”)
  6. Remove the “#” (press the “x” if the cursor is on the character)
  7. Save “/etc/inetd.conf” by typing “:wq!”
  8. Restart the management service “/sbin/ restart”
Here is a video that explains ssh access in esxi 3.x:
Here is a video that explains how to modify the kernel in esxi v4.x to enable ssh access:

Wednesday, September 7, 2011

ESX host displays the message "Configuration changes were not saved successfully during previous shutdown"

From VMware Knowledge Base:

  • When you log into the ESX 3.x host service console, you see the message:
    Configuration changes were not saved successfully during previous shutdown.
    Note: This message is stored in /etc/motd and is generated by the /etc/init.d/vmware script when esxcfg-boot -r returns an error when executed during a shutdown of the ESX host.

  • The log file /var/log/messages may show the following error messages:
    ERROR: Execution of '/sbin/vmware-mkinitrd -r -f -v /tmp/vmware.1.tmp '2.4.21-37.0.2.ELvmnix'' failed. See log messages above.
    ERROR: Could not write out new initrds.

  • initrd-2.4.21-37.0.2.ELvmnix.img in the /boot directory has a  size of zero

You need to recreate the initrd image file.

T o recreate the initrd image file:

  1. Start the system and select ESX troubleshooting mode.
  2. Log in as a user with administrative privileges.

  3. Run the commands:
    esxcfg-boot -b
    esxcfg-boot -p
    esxcfg-boot -r
    The message does not appear on the next ESX host reboot.

Mounting a Windows share from VMware esx 4

Mounting a windows share from VMware esx 4 can be useful for install updates.
First of all you must enable netbios ports on esx firewall, for this task you can run the following commands on your esx server

How to install/enable .Net 3.5 SP1 on Windows Server 2008 R2 for SQL Server 2008 and SQL Server 2008 R2

Here you can find a good article that explains how to enable .Net 3.5 on W2008:
The .NET Framework 3.5 SP1 (also referred to as .NET Framework 3.5.1) is a prerequisite for SQL Server 2008. SQL Server 2008 Setup for standalone instance will install the .NET Framework 3.5 SP1 if it is not already installed. In Windows Server 2008 R2, the .NET Framework is a feature and installing it is different when compared to older versions of Windows Operating System. In previous versions, one could either download the .NET Framework 3.5.1 install binaries from Microsoft download site or use the install binaries from the redist folder of the SQL Server 2008 installation media. Starting with Windows Server 2008 R2, the method of installing .NET Framework 3.5.1 has changed. This document explains how to verify that .NET Framework 3.5.1 is installed and if it is not installed how you can add it.
How to verify if .NET Framework 3.5 SP1 is installed:
Here are the steps to verify that .NET Framework 3.5.1 is installed on Windows Server 2008 R2.
  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight Administrative Tools and select Server Manager.
  3. In the Server Manager interface, click Features to display all the installed Features in the right hand pane. Verify that .NET Framework 3.5.1 is listed.
If .NET Framework 3.5.1 feature is not listed, you can use either of the following methods to install it:
Method 1: Using Server Manager Interface
  1. In the Server Manager interface, select Add Features to displays a list of possible features.
  2. In the Select Features interface, expand .NET Framework 3.5.1 Features.
  3. Once you expand .NET Framework 3.5.1 Features, you will see two check boxes. One for .NET Framework 3.5.1 and other for WCF Activation. Check the box next to .NET Framework 3.5.1 and click Next.
    Note: If you do not expand .NET Framework 3.5.1 Features and check it, you will get a pop-up titled Add Features Wizard  as shown below.
    Click Cancel and expand .NET Framework 3.5.1 Features and then check .NET Framework 3.5.1 check box below it.
    You cannot install .NET Framework 3.5.1 Features unless the required role services and features are also installed.

  4. In the Confirm Installation Selections interface, review the selections and then click Install.
  5. Allow the installation process to complete and then click Close.
Method 2: Using PowerShell
  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight All Programs and select Accessories
  3. Expand Windows PowerShell and right click Windows PowerShell and select Run as administrator. Click Yes on the User Account Control box.
  4. At the PowerShell command prompt, type the following commands, and then press ENTER after each command:
    • Import-Module ServerManager
    • Add-WindowsFeature as-net-framework
Note: A screenshot is shown below: