Wednesday, August 10, 2016

Resizing disk space in Virtualbox virtual machine

If you need to increase your disk space in a virtual machine, if your disk is in vmdk format then you need to execute the following steps:

First you need to convert your disk to vdi by cloning.
Vdi can be resized and replace the vmdk disk in place. Just remove the vmdk in the settings
Internal partition needs to be resized this can be done by using the gparted iso:

Add the gparted as a cd iso and boot from it, resize the partition. In the next boot the system will recognize the new capacity

Vdi cloning and disk increase can be done with the following two commands:
  • VBoxManage clonehd "/home/nickapos/VirtualBox VMs/NCRWin7/NCRWin7-2016-06-27-disk1.vmdk" "/home/nickapos/VirtualBox VMs/NCRWin7/win7clone.vdi" --format vdi
  • VBoxManage modifyhd "/home/nickapos/VirtualBox VMs/NCRWin7/win7clone.vdi" --resize 100000

After that we are ready to boot. This will work with windows as well as linux. If you need to export your vm, there is a chance that Virtualbox will convert the image back to vmdk

Monday, August 1, 2016

Ubuntu ufw and docker

If you are using a system with ufw and at the same time are using docker, please keep in mind that docker manipulates the iptables rules in order to allow access to its services.

That means that it will open ports that you never intended to open to the world.
In order to disable this, you need to add the  --iptables=false in its arguments and restart it.