Friday, June 05, 2009

Change Hostname of Ubuntu Machine

To change hostname of Ubuntu machine use following commands

Edit file /etc/hostname and change the hostname in that file

run the command sudo /etc/init.d/hostname.sh start

run the command sudo sysctl kernel.hostname=newHostname

Change UUID of Virtual Box Disk (VDI)

In order to change UUID of Virtual Box Disk Image (VDI) use following command from DOS command prompt.

VBoxManage internalcommands sethduuid "c:\diskName.vdi".

VBoxManage is command is located at C:\Program Files\Sun\xVM VirtualBox. You can add it to Environmental variable and then execute above command from the directory where VDI file is located