電訊茶室's Archiver

角色 發表於 2018-2-28 18:46

Collection of VirtualBox commands via command line interface

[i=s] 本帖最後由 角色 於 2018-2-28 19:25 編輯 [/i]

add/detele interface(s) [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7138&pid=44588]Link[/url]

角色 發表於 2018-2-28 18:46

备用帖子2

角色 發表於 2018-2-28 18:47

备用帖子3

角色 發表於 2018-2-28 18:47

[i=s] 本帖最後由 角色 於 2018-2-28 19:47 編輯 [/i]

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[code]
VBoxManage modifyvm R4 --nic5 intnet
VBoxManage modifyvm R4 --nic6 intnet
VBoxManage modifyvm R4 --nic7 intnet
VBoxManage modifyvm R4 --nic8 intnet
[/code]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[code]VBoxManage modifyvm R4 --nic3 none[/code]

角色 發表於 2018-2-28 18:47

[i=s] 本帖最後由 角色 於 2018-2-28 19:34 編輯 [/i]

Show the properties of Router (R4)[code]VBoxManage showvminfo R4[/code]

角色 發表於 2018-2-28 18:47

[i=s] 本帖最後由 角色 於 2018-2-28 23:22 編輯 [/i]

Change (setup) the interface type (e.g, Internal network designed by intnet)[code]VBoxManage modifyvm R4 --nic2 intnet[/code]#

Define the internal network "network name" (e.g. Cable X)[code]VBoxManage modifyvm R4 --intnet2 CableX[/code]#

Set the interface as a bridged adaptor[code]VBoxManage modifyvm SW1 --nic1 bridged[/code]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[code]VBoxManage modifyvm SW1 --cableconnected2 off
VBoxManage modifyvm SW1 --cableconnected3 off
VBoxManage modifyvm SW1 --cableconnected4 off
VBoxManage modifyvm SW1 --cableconnected5 off
VBoxManage modifyvm SW1 --cableconnected6 off
VBoxManage modifyvm SW1 --cableconnected7 off
VBoxManage modifyvm SW1 --cableconnected8 off[/code]

角色 發表於 2018-2-28 18:47

备用帖子7

角色 發表於 2018-2-28 18:48

备用帖子8

角色 發表於 2018-2-28 18:48

备用帖子9

角色 發表於 2018-2-28 18:48

备用帖子10

角色 發表於 2018-2-28 18:48

备用帖子11

角色 發表於 2018-2-28 18:49

备用帖子12

角色 發表於 2018-2-28 18:49

备用帖子13

角色 發表於 2018-2-28 18:49

备用帖子14

角色 發表於 2018-2-28 18:49

备用帖子15

角色 發表於 2018-2-28 18:49

备用帖子16

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.