Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.53 KB

virtualbox.md

File metadata and controls

63 lines (38 loc) · 1.53 KB

Virtual Box

Networking

a good blog

  • When you want to create a vm in your host, choose NAT + Host-only network. NAT network for accessing the internet, Host-only network for accessing from your host.

  • When you want to create a vm on your lan, choose bridged network.

vbox network

Reference Page

Vboxmanage Usage

Reference Page

List VM

vboxmanage list vms
vboxmanage list runningvms

Control VM

vboxmanage startvm <vm> [--type gui|headless]           # default: gui
vboxmanage controlvm <vm> <acpipowerbutton|poweroff>    # recommend: acpipowerbutton

Import VM

vboxmanage import <vm.ova> --vsys 0 --vmname <vm> --cpus <cpu_num> --memory <mem_MB> [--dry-run]

Delete VM

vboxmanage unregistervm <vm> --delete

Modify VM

vboxmanage modifyvm <vm> --nic1 bridged --bridgeadapter1 eno1  # change nic1 to bridged mode and to eno1 interface
vboxmanage modifyvm <vm> --nic1 hostonly --hostonlyadapter1 vboxnet0  # change nic1 to hostonly mode and to vboxnet0 interface

VM Infos

You may need to install virtualbox extension pack from website.

vboxmanage guestproperty enumerate <vm>
vboxmanage guestproperty get <vm> <property>