Tag Archives: esx

howto resize a disk in Vmware ESX

update : this is an outdated article.  You really should consider upgrading to the latest versions of vsphere with new features such as storage vmotion, thin provisioning, and soon storage drs.

There are multiple ways to resize or enlarge a disk in Vmware ESX.

One way would be by using the vmware converter.  Easy!  This enlarges your disk both on the ESX as on Windows.

If you’re using ESX 3.5, you can resize the disk using the VI client, while the VM is online!  After this, you still have to resize the disk in Windows.  (or *nix.)

If you’re using a previous version of ESX, you can resize the disk with this command.

  • vmkfstools –X 20000M /vmfs/volumes/volumename/machinename/xxx.vmdk
    where 20000M is the new size, not the amount you’re adding!

After this you still have to resize the volume by using a disk management / partition utility.  You could also boot with Bartpe and use diskpart, or add the disk to another VM, and run diskpart from there.

  • diskpart
  • list volume
  • select volume X (x being the volume)
  • extend

However you cannot resize the active boot volume.  In this case, boot with a BartPE cd of add the disk to another machine).

Another way is to resize the disk with vmkfstools, as described above, and then resize the disk in windows using extpart (tool from dell).  works on VM’s http://ftp.dell.com/app/ExtPart.exe

Another solution, would be to resize the disk with vmkfstools, and then resize the disk with Gparted.  You can download a bootcd here : http://gparted.sourceforge.net/

Doesn’t matter how you do it, just always take a good backup!!!!

Advertisements

Howto get a list of port groups in VMWARE

I recently added an article on how to change the ipaddress of the service console.

But what if the service console has another name then service console?

you can get a list of all port groups by typing this command :

esxcfg-vswitch -l

howto change the ipaddress of an ESX server from the server console

from the service console

  • login with or su to root
  • esxcfg-vswif -d vswif0
    this will delete the existing vswif0, will give an error about nothing to flush
  • esxcfg-vswif -a vswif0 -p Service\ Console -i xx.xx.xx.xx -n 255.255.255.0 -b xx.xx.xx.255
    replace the xx after -i with the new ipaddress, and the xx after -b with the broadcast address.  So not the default gateway, but the broadcast address!
    example: esxcfg-vswif -a vswif0 -p Service\ Console -i 192.168.1.22 -n 255.255.255.0 -b 192.168.1.255
  • for the default gateway
    edit the file /etc/sysconfig/network .  You can edit this file with vi or nano (I prefer nano).
  • after that, reboot the ESX.  You can already connect to the ESX without rebooting, but virtual center reacts funny without a reboot.  Or connect to virtual center and check the network configuration 🙂