Shrink a VM Disk

Fonte: ARDITI - WIKI
Revisão em 15h57min de 31 de julho de 2018 por Hvasanth (discussão | contribs) (Criou a página com "* Defrag drive: e4defrag / * Zero out free space: dd if=/dev/zero bs=1048576 of=/zero ; sync ; rm /zero * Punch holes on zeros: vmkfstools -K /vmfs/volumes/datastor...")
(dif) ← Revisão anterior | Revisão atual (dif) | Revisão seguinte → (dif)
Saltar para a navegação Saltar para a pesquisa
  • Defrag drive:
 e4defrag /
  • Zero out free space:
 dd if=/dev/zero bs=1048576 of=/zero ; sync ; rm /zero

  • Punch holes on zeros:
 vmkfstools -K /vmfs/volumes/datastore1/arditi/arditi_1.vmdk

  • Create a new disk with smaller disk space:
 ESXi (thin provisioned disk)

  • Create partition table for the new smaller disk and shrink the drive size and get rid of swap partition:
 GParted Live CD (smaller disk with msdos partition table, resize the larger disk to small form factor and delete the swap partition)

  • Clone the bigger disk to smaller disk ignoring disk addresses:
 Clonezilla (drive-to-drive, Expert mode using -icds operator)

  • Change the SCSI order:
 ESXi (SCSI 0:0 assigned to the newly cloned disk to boot from)