返回列表 發帖

Collection of VirtualBox commands via command line interface

本帖最後由 角色 於 2018-2-28 19:25 編輯

add/detele interface(s) Link

备用帖子2

TOP

备用帖子3

TOP

本帖最後由 角色 於 2018-2-28 19:47 編輯

The VirtualBox GUI allows you to create 4 interfaces in maximum. In order to create another four interfaces, you need to have the following commands:

Create another 7 interfaces
  1. VBoxManage modifyvm R4 --nic5 intnet
  2. VBoxManage modifyvm R4 --nic6 intnet
  3. VBoxManage modifyvm R4 --nic7 intnet
  4. VBoxManage modifyvm R4 --nic8 intnet
複製代碼
where R4 is the vm name. If the vm name has space in between, then you have to use "", for example "RouterOS 1". "intnet" is the name of "internal network". The internal network may be thought as a hub which connect each device. In general, there are only two device connected to this internal network. This internal network may become a Ethernet cable connecting the two devices.

Delete one interface
  1. VBoxManage modifyvm R4 --nic3 none
複製代碼

TOP

本帖最後由 角色 於 2018-2-28 19:34 編輯

Show the properties of Router (R4)
  1. VBoxManage showvminfo R4
複製代碼

TOP

本帖最後由 角色 於 2018-2-28 23:22 編輯

Change (setup) the interface type (e.g, Internal network designed by intnet)
  1. VBoxManage modifyvm R4 --nic2 intnet
複製代碼
#

Define the internal network "network name" (e.g. Cable X)
  1. VBoxManage modifyvm R4 --intnet2 CableX
複製代碼
#

Set the interface as a bridged adaptor
  1. VBoxManage modifyvm SW1 --nic1 bridged
複製代碼
The above command to set the SW1 NIC 1 as a bridged adaptor to the host network.#

Disconnect the cable between the virtual machine and network
  1. VBoxManage modifyvm SW1 --cableconnected2 off
  2. VBoxManage modifyvm SW1 --cableconnected3 off
  3. VBoxManage modifyvm SW1 --cableconnected4 off
  4. VBoxManage modifyvm SW1 --cableconnected5 off
  5. VBoxManage modifyvm SW1 --cableconnected6 off
  6. VBoxManage modifyvm SW1 --cableconnected7 off
  7. VBoxManage modifyvm SW1 --cableconnected8 off
複製代碼

TOP

备用帖子7

TOP

备用帖子8

TOP

备用帖子9

TOP

备用帖子10

TOP

备用帖子11

TOP

备用帖子12

TOP

备用帖子13

TOP

备用帖子14

TOP

备用帖子15

TOP

返回列表