Thursday, June 14, 2012

Expand Proxmox VM

These are the steps I took to expand the hard drive of a Windows 2003 server running on Proxmox
I found these steps here.

  1. Shutdown server
  2. Create backup
  3. Expand disk in my case it was to 60GB which is 64424509440 bytes which you divide by the bit size for the "seek" option (125829120):
  4. ~# cd /var/lib/vz/images/101
    ~# dd if=/dev/zero of=vm-101-disk-1.raw bs=512 count=0 seek=125829120

  5. Restart pvedaemon:
  6. ~# /etc/init.d/pvedaemon restart

  7. Add GParted live CD to virtual CD drive and boot server
  8. Resize NTFS partition with GParted interface
  9. Reboot server (Windows will run a constistency check because of the new disk size)