import ova file in virtualbox

Decompress the .ova file

tar -xvf file.ova 

Import the extracted .ovf file to virtualbox

Advertisements

recalculate disk size of a VM on virtualbox

1 – Boot the VM in runlevel 1 editing boot options on grub

2 – Remount each partition as readonly and run the command below for each them

mount -n -o remount,ro -t ext4 /dev/sda1 /

3 – Create zero blocks for each partition that was remounted as redonly

zerofree /dev/sda1

4 – Power off the VM

init 0

5 – On Virtualbox Host make the proccess to recalculate the size of a disk

vboxmanage modifymedium /path/to/virtual-disk-file.vdi --compact

make virtualbox vms communicate with host, vms, lan and internet

create a host-only interface on virtualbox Host

vboxmanage hostonlyif create

configure ip to vboxnet0 interface that was created on Host

vboxmanage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1

See the vboxnet0 configuration

ifconfig vboxnet0

get name of your VMs (only VMs created with logged user will appear)

vboxmanage list vms

configure first network adapter to work with the same ip range of vboxnet0

vboxmanage modifyvm "InsertVmNameHere" --nic1 hostonly --nicpromisc1 allow-vms --bridgeadapter1 eth0

configure second network adapter to work with NAT

vboxmanage modifyvm "InsertVmNameHere" --nic2 nat

show network interfaces avaiable. maybe you need to get IP by dhcp

ip link show
dhclient eth1

to test, ping ip of your VM in virtualbox host

ping 192.168.56.101

more about virtualbox cli:
https://www.virtualbox.org/manual/ch08.html
http://www.oracle.com/technetwork/articles/servers-storage-admin/manage-vbox-cli-2264359.html

Criar Máquina Virtual com VirtualBox + Instalação RDP

Instale o VirtualBox e o VirtualBox Extension Pack em: http://virtualbox.org

VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register
VBoxManage createhd --filename "Windows_XP.vdi" --size 5000
VBoxManage storagectl "Windows XP" --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "Windows_XP.vdi"
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium  /full/path/to/iso.iso
VBoxHeadless --startvm "Windows XP" &
rdesktop -g 90% IP

fonte: http://www.virtualbox.org/manual/ch07.html