Page 1 of 1

Adding a nic to a VM

Posted: 8. Sep 2018, 21:55
by frepie
Hi,
Newbie here.
I am trying to add a host only NIC card to a virtual machine.

I ran the command

Code: Select all

VBoxManage hostonlyif create
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface 'vboxnet0' was successfully created
then

Code: Select all

VBoxManage modifyvm "u_16.04_router" --nic2 hostonly --nictype1 82543GC --hostonlyadapter1 vboxnet0
With no error detected in the previous command

but when I trying to start the vm I get

Code: Select all

VBoxHeadless --startvm "u_16.04_router"
Oracle VM VirtualBox Headless Interface 5.2.18
(C) 2008-2018 Oracle Corporation
All rights reserved.

VRDE server is listening on port 3389.
Error: failed to start machine. Error message: Nonexistent host networking interface, name '' (VERR_INTERNAL_ERROR)
I guess there is a syntax error in the commands entered above but I can't find them.

Vm infos are:

Code: Select all

VBoxManage showvminfo "u_16.04_router"
Name:            u_16.04_router
Groups:          /
Guest OS:        Other/Unknown
UUID:            2337575b-4183-477a-926f-e1695f68b519
Config file:     /home/frepie/VirtualBox VMs/u_16.04_router/u_16.04_router.vbox
Snapshot folder: /home/frepie/VirtualBox VMs/u_16.04_router/Snapshots
Log folder:      /home/frepie/VirtualBox VMs/u_16.04_router/Logs
Hardware UUID:   2337575b-4183-477a-926f-e1695f68b519
Memory size:     2048MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             on
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: None
State:           powered off (since 2018-09-08T19:50:09.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE Controller (0, 0): /home/frepie/VirtualBox VMs/u_16.04_router_hdd/u_16.04_router.vdi (UUID: d1a689a9-4169-46dd-a7c3-206d518fecaf)
IDE Controller (1, 0): Empty
NIC 1:           MAC: 080027AD12E1, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82543GC, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           MAC: 080027B03CEE, Attachment: Host-only Interface '', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: ALSA, Controller: AC97, Codec: STAC9700)
Audio playback:  disabled
Audio capture: disabled
Clipboard Mode:  disabled
Drag and drop Mode: disabled
VRDE:            enabled (Address 0.0.0.0, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE property: TCP/Ports  = "3389"
VRDE property: TCP/Address = <not set>
VRDE property: VideoChannel/Enabled = <not set>
VRDE property: VideoChannel/Quality = <not set>
VRDE property: VideoChannel/DownscaleProtection = <not set>
VRDE property: Client/DisableDisplay = <not set>
VRDE property: Client/DisableInput = <not set>
VRDE property: Client/DisableAudio = <not set>
VRDE property: Client/DisableUSB = <not set>
VRDE property: Client/DisableClipboard = <not set>
VRDE property: Client/DisableUpstreamAudio = <not set>
VRDE property: Client/DisableRDPDR = <not set>
VRDE property: H3DRedirect/Enabled = <not set>
VRDE property: Security/Method = <not set>
VRDE property: Security/ServerCertificate = <not set>
VRDE property: Security/ServerPrivateKey = <not set>
VRDE property: Security/CACertificate = <not set>
VRDE property: Audio/RateCorrectionMode = <not set>
VRDE property: Audio/LogPath = <not set>
USB:             disabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

Capturing:          not active
Capture audio:      not active
Capture screens:    0
Capture file:       /home/frepie/VirtualBox VMs/u_16.04_router/u_16.04_router.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25
Capture options:    

Guest:

Configured memory balloon size:      0 MB

Re: Adding a nic to a VM

Posted: 9. Sep 2018, 07:55
by andyp73
frepie wrote:VBoxManage modifyvm "u_16.04_router" --nic2 hostonly --nictype1 82543GC --hostonlyadapter1 vboxnet0
This doesn't look right to me. Shouldn't you be specifying --nictype2 and --hostonlyadapter2?

-Andy.