Recovering a VirtualBox mess after changing network settings

After switching a virtual machine from NAT to BRIDGED mode, I ran in the following issue: related to NAT forwards.

I wasn’t able to restore the original settings via GUI – which didn’t ever show the forwards.

I solved simply removing the nats with vboxmanage.

# for svc in {apache,proftpd}/{HostPort,GuestPort,Protocol}; do
vboxmanage setextradata ubuntu VBoxInternal/Devices/pcnet/0/LUN#0/Config/$svc;

Share a folder with VirtualBox

A common issue with virtual environments (rdesktop, virtualbox, &co) is to have a common storage between real and virtual systems.

With vbox you can easily share a folder between guest and real host once you have installed Guest Additions. So

  1. install guest additions
  2. create a shared folder
  3. # mount -t vboxsf mySharedFolder /mnt/

With rdesktop simply add the following parameter to

share a local directory with your remote host

# rdesktop winhost -r disk:Home=/home/rpolli