Talk:VirtualBox

From SME Server
Jump to navigationJump to search

to resize a vmdk virtual hard disk file

  • shutdown the VM
 VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 51200

if you want to keep vmdk : then

VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk


you will need in fact two, if you are with a degraded array

 VBoxManage clonehd "cloned.vdi" "cloned2.vdi"

The above will resize the hard disk up to 50GB (50 * 1024MB).

  • Then you have to resize the drive inside the VM, so add your new drives and start the VM
  • you will have to play with the array by first resize partition of the second disk ( if you are a degraded array mod, then first resize the partitions, add to array, sync, then remove old)
  • then simply resize the file system


if you are using a raid only mode : resize2fs /dev/md3

if you have no raid no lvm resize2fs /dev/sda2

if you are using a raid lvm mode

 pvresize /dev/md1
pvresize /dev/md2
 lvresize -l +$(vgdisplay -c vg_primary | cut -d: -f16) vg_primary/lv_root
 ext2online -C0 /dev/mapper/vg_primary-lv_root

Unnilennium (talk) 17:03, 7 January 2014 (MST)