Thursday, January 31, 2013

How to safely remove a USB disk from a windows server core installation

  • On command prompt type "diskpart" and wait for the next prompt and then type "list volume". Take note of the number of your desired volume by watching its drive letter
  • Type "select volume x", where x is the number of your USB storage.
  • Then type "remove all dismount". 
  • Type "exit" to leave diskpart.

Wednesday, January 30, 2013

How to show Windows Update dialog in Windows 8

From a command line or from Run dialog box (Windows Key + R) enter this command
wuauclt /ShowWU

Tuesday, January 29, 2013

How to change your MTU size under Vista or Windows 7

  • Find your MTU
From an elevated command prompt enter the following command:

netsh interface ipv4 show subinterfaces

  • Find out what it should be
ping www.google.com -f -l 1472

The host name should be a site you can not reach, -f denotes that icmp packets should not be fragmented, the -l 1472 sets the size of the packet (1472 = Ethernet Default MTU – Packet Header, where the Ethernet Default MTU is 1500 and the Packet Header is 28 bytes).
If the packet can’t be sent because it would need to be fragmented you will get something similar to this:

Packet needs to be fragmented but DF set.

Keep trying lowering packet sizes by 10 (i.e. -l 1460, 1450, 1440, etc.) until you get a successful ping request. Raise your packet sizes by one until you get a "Packet needs to be fragmented but DF set.". The last successful value plus 28 will be your MTU value.
In my case a packet size of 1464 succeeds but 1463 fails, so 1464 + 28 = 1492.

  • Set your MTU
netsh interface ipv4 set subinterface "Local Area Connection" mtu=1492 store=persistent

For more information you can read the following link.

Monday, January 28, 2013

How to remove the icon "Safely remove hardware" from the statusbar of a VM

  • Power off the virtual machine
  • Open "Edit settings"
  • Select the "Options" Tab
  • Select "General" –-> "Configuration Parameters"
  • Click "Add Row"
  • Add a field named: devices.hotplug with value: FALSE
  • Power on VM
For more information read the article Remove the icon "Safely remove hardware"

Monday, January 21, 2013

How to reset root password in ESXi 4.x & 5.x

This guide is unsupported from VMware, so do it on your own risk.
First download a live Linux boot CD. In my case I downloaded Knoppix.
Then you can burn the ISO to make a bootable cdrom or use a tool like Live Linux USB Creator to make a bootable Linux USB stick.
Boot with above Linux boot CD or USB and enter
# fdisk -l
to find the disks resident on the server.
Find the partition holding the file state.tgz and mount it. In my case it was /dev/sdb5 so I used the commands:
# mkdir /mnt/disk
# mount /dev/sdb5 /mnt/disk
# cd /mnt/disk
# ls -al
# cp state.tgz state.tgz.bak
# cd /ramdisk
# mkdir temp
# cd temp
# tar zxf /mnt/disk/state.tgz
# ls -al
# tar zxf local.tgz
# cd etc
# vi shadow

Use the above command to edit the shadow file holding the root password.
Delete all characters between the first and second : character so that you erase the root password.
Write back the shadow file and quit vi using the command :wq
Finally put everything back using the commands:
# cd ..
# rm -rf local.tgz
# tar zcf local.tgz *
# chmod 755 local.tgz
# rm -rf /mnt/disk/state.tgz
# tar zcf /mnt/disk/state.tgz local.tgz
# ls -al /mnt/disk/
# umount /mnt/disk
# shutdown -r now

Friday, January 11, 2013

How to install Dell OpenManage Administrator in Linux CentOS 6.3

Edit /etc/yum.conf and ensure that exist the line
plugins=1
If not then create or amend that line so that it looks as above
Setup the Dell OpenManage  repository using the command
wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
Install Dell OpenManage Administrator using the command
yum install srvadmin-all
If you only want to install Dell OpenManager Web Interface and not the full package then use the command
yum install srvadmin-webserver
instead of the previous one

Thursday, January 3, 2013

How to install .NET Framework 3.5 in Windows 8

In Windows 8 or Windows Server 2012, open a Command Prompt window with administrative credentials (that is, choose Run as administrator).
To install the .NET Framework 3.5 from installation media located in the D:\sources\sxs directory, use the following command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs
Use /All to enable all parent features of the .NET Framework 3.5.
Use /LimitAccess to prevent DISM from contacting Windows Update.
Use /Source to specify the location of the files needed to restore the feature.