embassy.se - Blog

My own cheatsheets on the net

Enabling SSH via oem.tgz on ESXi

clock August 16, 2009 13:07 by author Osterberg

Recently I’ve replaced my server at home with a new one.
I installed ESXi on a USB stick and enabled the SSH as described here.

Then updated it via “vSphere Host Update Utility 4.0”. After rebooting ESXi the SSH server wasn't working. Doing less /etc/inetd.conf revealed that the SSH server was reset to default (turned off).

Googling this, it seems that ESXi now tries to set the defaults on various things when rebooting.


I’ve resolved this by replacing the original oem.tgz file with a customized version witch have SSH and FTP enabled by default.

This excellent page have diffrent oem.tgz files.

I did this:

  1. Downloaded this file.
  2. Upload the file to the datastore

    Datastore 
  3. At the console press ALT+F1 and type “unsupported” and press ENTER key. Type the password.
  4. Type cp /vmfs/volumes/[your datastore name]/[path to oem.tgz file] /bootbank/oem.tgz
  5. Restart ESXi server.
  6. Done!

 

Source: vm-help.com



Install Active Directory on Server Core

clock August 14, 2009 21:36 by author Osterberg

To install Active Directory on Server Core you need to run dcpromo.exe in unattended mode.

First start notepad on Server Core and paste the following:

[DCINSTALL]
InstallDNS=yes
NewDomain=forest
NewDomainDNSName=<The fully qualified Domain Name System (DNS) name>
DomainNetBiosName=<By default, the first label of the fully qualified DNS name>
SiteName=<Default-First-Site-Name>
ReplicaOrNewDomain=domain
ForestLevel=3
DomainLevel=3
DatabasePath="%systemroot%\NTDS"
LogPath="%systemroot%\NTDS"
RebootOnCompletion=yes
SYSVOLPath="%systemroot%\SYSVOL"
SafeModeAdminPassword=P@ssw0rd

This is example is for a new forest installation with Forest and Domain level set to 2008.
Path to database, sysvol and logs are “defaults”. DNS will be installed.

You have to change the fields “NewDomainDNSName” and “DomainNetBiosName” and set a safemodepassword.

Save it as unattend.txt

 Save as

 

Then run dcpromo /unattend:unattend.txt

When you run the dcpromo.exe command, it deletes the password from the unattended file. If you need to run the command again, you have to retype the password in the unattended file.

 

More information at Microsoft Knowledgebase



Change screen resolution in Server Core

clock August 12, 2009 23:45 by author Osterberg

Ever wondered how to change screen resolution in Server Core? 

I’ve found a blogpost about that here Change resolution on server core

And just to simplify it:

Locate \HKLM\System\CurrentControlSet\Control\Video\{classID}\0000\DefaultSettings.XResultion and \DefaultSettings.YResolution

where you have a key named “VolatileSettings”  directly under the \0000\ key.

image 

and set the values to desired screen resolution. In the case above it's set to 1024x768.

Restart the server for the changes to take affect.
(rember? shutdown /r /f /t 0 /c “Changed screen resolution”)



iPod hardware reset

clock June 28, 2009 19:05 by author Osterberg

Ever got your iPod to lock up?

This is how I reset it.

  1. Turn keylock on
  2. Turn keylock off
  3. Press menu and middle buttom for a cuple of seconds.
  4. Done.

 

Source: mtdewvirus.com



How to create lager drives than 256 GB in VMware

clock June 6, 2009 03:00 by author Osterberg

 

Recently I’ve tried to create a harddisk for a virtual machine in VMware that I wanted to be 600 GB in size. 
I run the “Add Hardware” wizard in vSphere Client and selected harddisk, typed 600 GB as disk size and !PLONK!

max disk 256GB

 

hmmm, it defaults to 256 GB.

Googletime!

As I now learned the max size of the disk or rather the max size of the VMDK is directly dependant of the block size of the VMFS partition. The default block size are 1MB witch give a max disk size of 256 GB.

datastore properties

Other block sizes are:
2MB –> MAX 512GB
4MB –> MAX 1024GB (1 TB)
8MB –> MAX 2048GB (2 TB)

When you install ESXi it formats all available disks with default blocksize and creates a datastore. I guess the solution to this is to delete the datastore and reformat it with a larger block size.

 

  1. Delete the datastore.
    Remember to move the data of the datastore first.

    delete datastore
  2. Click “Add Datastore”.

    image


  3. Click next –>

    Add datastore
  4. Choose your disk/LUN –> next
  5. Enter a name for the datastore –> next
  6. Choose desired block size –> next

    Choose block size 
     
  7. Click Finish –> Done!

Reference: VMware Communities



Enable remote desktop on Windows 2008 Server Core

clock June 5, 2009 16:29 by author Osterberg

For Windows 2008 , Server Core & Vista clients type:

Cscript %windir%\system32\SCRegEdit.wsf /ar 0 

For Windows XP & Windows 2003 clients type:

cscript %windir%\system32\SCRegEdit.wsf /ar 0

cscript %windir%\system32\SCRegEdit.wsf /cs 0

KB at Microsoft



Enable the unsupported SSH server in ESXi

clock June 3, 2009 21:13 by author Osterberg

 

  1. At the console of the ESXi host, press ALT+F1 to access the command shell.
  2. Enter unsupported in the console and hit enter. You will not see what you type.
  3. If you did it right you should see a fairly common linux command promt like: ~#
  4. Edit the file /etc/inetd.conf. Remove the # in front of the line that starts with # SSH.
    Do this simply by typing vi /etc/inetd.conf . Use the down arrow to locate the line.
    press the letter x and save the file by pressing ESC once and then type :qw!
  5. Now, at next restart of the ESXi host you will be able to access the host via SSH.
    Or run “/sbin/services.sh restart

 

Sources: vm-help.com & yellow-bricks.com



Installing ESXi 4.0 on a USB pendrive and HP ML110

clock June 3, 2009 21:00 by author Osterberg

 

I’ve recently installed EXSi 4.0 on my home server. I’ve choosed to install it on a regular USB pendrive.

You don’t have to do the unpack and DD trick anymore as the ESXi 4.0 version now support installation to a connected USB pendrive.

The installation of ESXi 4 is really simple and straightforward so I didn’t do any screencaptures under the installation.

As you can see in this fuzzy picture, I’ve used a pendrive mounted to a internal connector on the motherboard.

 

Motherboard with internal USB connector

 

It all works really well.



Install VMWare tools on Windows 2008 Server Core

clock June 3, 2009 18:22 by author Osterberg

To install VMware tools on server core, do as you usually do.
In the vmware consol, in the menu under VM choose Guest –> Install/Upgrade VMware Tools

 

image 

After you’ve done that probably nothing happens…

Change to CD-ROM drive on your virtual guest by typing for example D:
Type dir and you should see the VMware tools install files. Type setup.exe to start the installation.

image


Continue as usually and restart the guest when done.

 



How to set the computername on Windows 2008 Server Core

clock June 3, 2009 14:34 by author Osterberg

 

type:

netdom renamecomputer %computername% /newname:serversnewname

answer Y to the following question. Voila!

Restart the server by: shutdown /r /f /t 0 /c “Changed computername”



About the author

Work with computers as a dayjob, done it for quite some time. Still likes it.
Mostly Microsoft products but some FreeBSD and varius Linux flavors.

Sign in