Page 1 of 1
Error while setting the bridge interface
Posted: 1. Sep 2018, 20:50
by PazDim
Hello. I'm trying to configure a virtual machine's access to the Internet. The computer has the CentOS operating system installed. The version of VirtualBox is 5.1 (also tried 5.2). The computer has two interfaces: ethernet and WI-FI. I need to configure the bridge connection. With ethernet, everything works fine: the virtual machine gets the address from the router and has access to the Internet. But the target interface is WI-FI. When I configure a bridge connection with WI-FI and start the virtual machine, an error occurs:
Code: Select all
VBoxManage: error: Failed to open/create the internal network 'HostInterfaceNetworking-wlsl' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
I read that in Windows it is necessary to enable the NDIS driver for the network interface. But how to do it in Linux?
Re: Error while setting the bridge interface
Posted: 2. Sep 2018, 10:00
by mpack
Please provide a VM log file. With the VM fully shut down, right click it in the GUI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
Re: Error while setting the bridge interface
Posted: 2. Sep 2018, 10:47
by PazDim
mpack wrote:Please provide a VM log file. With the VM fully shut down, right click it in the GUI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
Thanks for the answer. Sorry, I have no GUI (CentOS minimal). In the virtual machine directory there is a directory called Logs, it contains VBuxHardening.log, VBox.log, VBox.log.1, VBox.log.2... files. Which of these files is needed?
Re: Error while setting the bridge interface
Posted: 2. Sep 2018, 15:13
by andyp73
PazDim wrote:Which of these files is needed?
I would go with the one called VBox.log as that is the one mpack asked for!
-Andy.
Re: Error while setting the bridge interface
Posted: 2. Sep 2018, 15:52
by PazDim
I made a backup of the old files and started a new log file. The name of the Wi-Fi network interface is "wlsl".
Re: Error while setting the bridge interface
Posted: 3. Sep 2018, 08:34
by mpack
The error seems to indicate that you're bridging to a network which doesn't exist. Why not try changing the networking type to NAT? (in the VM settings).
Other things I see:
- 5.1.38 is rather old, consider upgrading.
- 3GB is way too much to be giving to the VM on your host, which only has 3.3GB free, and needs to run other stuff besides your VM. I'd reduce to 2GB.
- 27MB is not much graphics RAM for a desktop OS. I'd increase to 64MB.
- 1 core will give poor performance, you could have afforded 2.
Re: Error while setting the bridge interface
Posted: 3. Sep 2018, 17:10
by PazDim
Thanks for the answer. The network exists - through Wi-Fi, I control the computer. I tried to configure NAT, but I could not create a virtual adapter. A virtual machine must have Internet access, and other computers should be able to join it. With a bridge connection, the router assigns an address to the virtual machine and it is visible to other computers. In the case of NAT, I need to configure iptables, but this requires a virtual adapter, right?
1. I tried version 5.2. The error was different (I do not remember which one), but it also did not start;
2. The host has 4 GB of RAM, the virtual machine is used for the game server - it needs more memory. Yesterday I tested the whole day through another network interface, everything worked fine;
3. I do not think that there is a need for this - the computer does not have a display;
4. Thank you, I'll try.
Re: Error while setting the bridge interface
Posted: 5. Sep 2018, 06:01
by PazDim
Increased the number of cores, it seems to be better. So what can you do with the network?
Re: Error while setting the bridge interface
Posted: 15. Sep 2018, 20:20
by socratis
Please read the following: User Manual, ch.
6.2. Introduction to networking modes including the Overview table, which shows quickly what kind of connection is required to achieve what you want. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
Re: Error while setting the bridge interface
Posted: 16. Sep 2018, 09:01
by PazDim
socratis wrote:Please read the following: User Manual, ch.
6.2. Introduction to networking modes including the Overview table, which shows quickly what kind of connection is required to achieve what you want. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
Thank you. I understand correctly, I need NAT (not NAT network) and port forwarding? I'll try to do so.
Re: Error while setting the bridge interface
Posted: 16. Sep 2018, 14:24
by PazDim
So, everything worked on Windows. I configured NAT and port forwarding and tried to connect to 127.0.0.1. The connection was redirected to the virtual machine. But on Linux host port forwarding does not work. Virtual Machine Configuration File:
Code: Select all
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.14-linux">
<Machine uuid="{cc6cf85b-e2b2-4a73-ba9b-c6cb3e7327d8}" name="W7SE" OSType="Windows7_64" snapshotFolder="Snapshots" lastStateChange="2018-09-16T11:49:02Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{ffea4469-1347-4585-ad6b-54657e8376a0}" location="W7SE.vdi" format="VDI" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{148649ec-5f66-4b4e-88fa-3e2447903054}" location="G:/Архивы/OS/Win7.SP1.x86-x64.Rus-Eng.18in1.Activated.v5/ru-en_win7_sp1_x86-x64_18in1_activated_v5.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="SaveState"/>
<ExtraDataItem name="GUI/LastGuestSizeHint" value="800,600"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="374,142,1024,810"/>
</ExtraData>
<Hardware>
<CPU count="3">
<PAE enabled="false"/>
<LongMode enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="3072"/>
<HID Pointing="USBTablet"/>
<Display VRAMSize="27"/>
<RemoteDisplay enabled="false"/>
<BIOS>
<IOAPIC enabled="true"/>
</BIOS>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="080027261A0C" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<BridgedInterface name="ens5f5"/>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="080027D37A0F" cable="true" type="82540EM">
<DisabledModes>
<BridgedInterface name="ens5f5"/>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<Forwarding name="RD0" proto="0" hostport="3389" guestport="3389"/>
<Forwarding name="RD1" proto="1" hostport="3389" guestport="3389"/>
<Forwarding name="SE" proto="0" hostport="27016" guestport="27016"/>
</NAT>
</Adapter>
<Adapter slot="2" MACAddress="0800274A4297" cable="true" type="82540EM"/>
<Adapter slot="3" MACAddress="08002736C16A" cable="true" type="82540EM"/>
<Adapter slot="4" MACAddress="0800272152AB" cable="true" type="82540EM"/>
<Adapter slot="5" MACAddress="080027E570C1" cable="true" type="82540EM"/>
<Adapter slot="6" MACAddress="080027612942" cable="true" type="82540EM"/>
<Adapter slot="7" MACAddress="08002765C84F" cable="true" type="82540EM"/>
</Network>
<LPT>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
</LPT>
<AudioAdapter controller="HDA" driver="ALSA" enabled="true"/>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="ru_RU" timestamp="1536078602316540500" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
<AttachedDevice passthrough="false" type="DVD" port="1" device="0"/>
</StorageController>
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" port="0" device="0">
<Image uuid="{ffea4469-1347-4585-ad6b-54657e8376a0}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>
In network connections, a second network interface appeared. How do I know if port forwarding works?
...
netstat -nap | grep VBox output:
Code: Select all
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 3341/VBoxHeadless
tcp 0 0 10.10.10.101:49666 2.19.120.26:443 ESTABLISHED 3341/VBoxHeadless
udp 0 0 0.0.0.0:35193 0.0.0.0:* 3341/VBoxHeadless
udp 0 0 0.0.0.0:27016 0.0.0.0:* 3341/VBoxHeadless
udp 0 0 0.0.0.0:46135 0.0.0.0:* 3341/VBoxHeadless
udp 0 0 0.0.0.0:3389 0.0.0.0:* 3341/VBoxHeadless
udp 0 0 0.0.0.0:54818 0.0.0.0:* 3341/VBoxHeadless
udp 0 0 0.0.0.0:34377 0.0.0.0:* 3341/VBoxHeadless
raw 0 0 0.0.0.0:1 0.0.0.0:* 7 3341/VBoxHeadless
Yes! I did it! Just turned off the CentOS firewall. Thank you all for your help!