Tuesday, March 20, 2007

Lost ESX-server's root password ?!?!! :-(

After a little google-ing I found a Red Hat Enterprise password reset procedure, that also works on ESX 3, actually it's quite easy.

  1. Reboot your ESX-server.
  2. In the Linux GRUB menu select "Service Console" and press "e" to edit.
  3. Go to the line that starts with "kernel" and press "e" again
  4. Append the word "single" at the end of the line and press enter
  5. Press "b" to boot with these options
  6. Once the system is booted you get a Linux command prompt, where you can enter "passwd" to change the password
  7. Reboot and login using your new password

Friday, March 16, 2007

Virtual Center High Availability ...

How to ... for now I'm not sure ...

I have a 2 site config with 2 ESX-clusters one in each site.
I thought to install a MNS-cluster with a file share witness, and use the new cluster-aware features of VC with patch 2.

I would like to virtualize the 2 cluster nodes and put 1 node in each site, and maybe put the witness file share in a 3th site.

It's certainly something to consider but not sure if it will work ... waiting for input from Vmware support ...

to be continued ...

Saturday, March 10, 2007

Unattended install of ESX with Microsoft's RIS-server

I needed to install a lot of ESX servers and thought of a little automation.So I looked around the web and found this link : http://www.vmware.com/community/message.jspa?messageID=466174

In short it comes to this :

Setup the RIS Server :

  1. Install DHCP and RIS
  2. On your RIS server create the following folder structure: Setup\English\Images\PXELinux\i386\templates\pxelinux.cfg\ (pxelinux.cfg is a folder)
  3. Download the latest version of syslinux from: http://www.kernel.org/pub/linux/utils/boot/syslinux/
  4. From the ESX 3 (this works with 2.5.x as well) CD (images\pxeboot) copy the following files to Setup\English\Images\PXELinux\i386\templates vmlinuz initrd.img

    NOTE: you MAY want to rename these files IF you plan on have multiple versions of ESX builds available.
  5. From the file you downloaded in step 2, copy the pxelinux.0 to the templates folder.
  6. Create a file called pxelinux.sif file in the template folder with the following contents: [OSChooser]
    Description = "Linux"
    Help = "This option runs a Linux installer."
    LaunchFile = "Setup\English\Images\PXELinux\i386\templates\pxelinux.0"
    ImageType = Flat Version="1.01"
  7. In the Setup\English\Images\PXELinux\i386\templates\pxelinux.cfg folder create a file called 'default' (no extension) with the following info.
    DEFAULT esx
    prompt 1
    display boot.msg
    timeout 1000
    label esx
    kernel vmlinuz append initrd=initrd.img
  8. Install NFS on your RIS server, Windows 2003 R2 provides it as a standard component
  9. Create an NFS share with a copy of the Vmware ESX 3.0.1 CD.
  10. Enable scripted installation feature on an already installed ESX to create the answer files.
    You can use this link page 94 : http://www.vmware.com/pdf/vi3_installation_guide.pdf
  11. Log in to the ESX Server 3.0.1 service console as root.
  12. Open the file/usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/struts-config.xml in a text editor such as vi.
  13. Locate the scripted section.
  14. Comment out the line reading:
  15. Uncomment the following lines:
  16. Save and close the file.
  17. Type service vmware-webAccess restart.
  18. Launch a supported Web browser and enter the URL of your ESX Server installation to open VI Web Access.The Welcome page appears.
  19. Click Log in to the Scripted Installer.
  20. Follow the onscreen instructions to create and download the answer file
  21. Save the answer file in the root of your NFS share.
  22. Boot your new physical server, let it boot from PXE
  23. At the boot: type esx and the link to the answer file you want to use during install, for example : esx ks=nfs:192.168.29.45:/PXEInstallESX/KS.cfg

TIP : If you have the MAC-addresses of your servers up-front (some hardware vendors can provide this info together with the serial number of the server), you can create additionale files in the Setup\English\Images\PXELinux\i386\templates\pxelinux.cfg directory. Name them after MAC-addresses of your servers.
DEFAULT esx
prompt 1
display boot.msg
timeout 1000
label esx
kernel vmlinuz
append initrd=initrd.img ks=nfs:192.168.29.45:/PXEInstallESX/KS.cfg

This way everything would be fully automated.

Have fun with it ...