User login

VirtualBox on ubuntu server

Create and run a headless VM

  • # register:
  • VBoxManage createvm --register --name VIPATH2.0_RC4

  • # create HD:
  • VBoxManage storagectl VIPATH2.0_RC4 --name "SATAHD" --add sata --controller IntelAhci

  • # set UUID on HD image:
  • VBoxManage internalcommands sethduuid /home/user/vm/V2.0-RC4.vdi

  • # attach HD to VM:
  • VBoxManage storageattach VIPATH2.0_RC4 --storagectl SATAHD --port 0 --device 0 --type hdd --medium /home/user/vm/V2.0-RC4.vdi

  • # Set VM properties (memory, NICs, etc.):
  • VBoxManage modifyvm VIPATH2.0_RC4 --pae on --ioapic on --memory 4096 --cpus 3 --nic1 bridged --nic2 bridged --bridgeadapter1 eth1 --bridgeadapter2 eth0 --boot1 disk --vrde on --vrdemulticon on --vrdeauthtype null --ostype Ubuntu

  • # Start VM headless:
  • VBoxHeadless --startvm "VIPATH2.0_RC4" -e "TCP/Ports=3389" -e "TCP/Address=192.168.1.2"&

    Detach HDD:

    VBoxManage storageattach VIPATH2.0-RC2 --storagectl SATAHD --port 0 --device 0 --type hdd --medium none

    Stop VM:

    VBoxManage controlvm "VIPATH2.0_RC3" poweroff

    Unregister VM:

    VBoxManage unregistervm -delete "VIPATH2.0_RC3"

    Create with hostonly network interfaces:

    sudo apt-get install bridge-utils
    sudo brctl addif br0 eth0:1 vboxnet0
    sudo ip link set dev br0 up
    VBoxManage dhcpserver modify --ifname vboxnet0 --ip 192.168.1.1 --netmask 255.255.255.0 --lowerip 192.168.1.10 --upperip 192.168.1.20 --enable
    sudo ifconfig vboxnet0 up
    VBoxManage modifyvm VIPATH2.0_RC3 --pae on --ioapic on --memory 4096 --cpus 3 --nic1 bridged --nic2 hostonly --bridgeadapter1 eth1 --hostonlyadapter2 eth0 --boot1 disk --vrde on --vrdemulticon on --vrdeauthtype null --ostype Ubuntu
    VBoxHeadless --startvm "VIPATH2.0_RC3" -e "TCP/Ports=3389" -e "TCP/Address=10.10.10.2"&