我遇到一些问题,VirtualBox Host-Only 适配器无法在 Debian 主机上工作。
我的主机上有以下网络配置。
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 74:e5:f9:ec:75:66 brd ff:ff:ff:ff:ff:ff
inet 10.165.130.183/20 brd 10.165.143.255 scope global dynamic noprefixroute wlp2s0
valid_lft 642sec preferred_lft 642sec
inet6 fe80::76e5:f9ff:feec:7566/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
4: vboxnet1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff
vboxnet 接口没有启动,即使我手动启动它们,它们也无法获得应有的 IP 地址。
我已将我的用户添加到 vboxusers,这些是虚拟机的配置。
Name: Projectos
Groups: /
Guest OS: Ubuntu (64-bit)
UUID: d4f1d9be-148d-4718-a48c-90c365c6f8bf
Config file: /home/rickinho/VirtualBox VMs/Projects/Projectos/Projectos.vbox
Snapshot folder: /home/rickinho/VirtualBox VMs/Projects/Projectos/Snapshots
Log folder: /home/rickinho/VirtualBox VMs/Projects/Projectos/Logs
Hardware UUID: d4f1d9be-148d-4718-a48c-90c365c6f8bf
Memory size: 512MB
Page Fusion: off
VRAM size: 12MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
PAE: off
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): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
BIOS APIC mode: APIC
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Nested Paging: on
Large Pages: off
VT-x VPID: on
VT-x unr. exec.: on
Paravirt. Provider: Legacy
Effective Paravirt. Provider: None
State: powered off (since 2018-05-13T02:19:17.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
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
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): /home/rickinho/VirtualBox VMs/Projects/Projectos/Projectos.vdi (UUID: 0c1ba5de-0a07-46ff-9340-8110bc557afc)
NIC 1: MAC: 080027D54208, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: USB Tablet
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: PulseAudio, Controller: AC97, Codec: STAC9700)
Audio playback: enabled
Audio capture: enabled
Clipboard Mode: disabled
Drag and drop Mode: disabled
VRDE: disabled
USB: enabled
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/rickinho/VirtualBox VMs/Projects/Projectos/Projectos.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25
Capture options: ac_enabled=false
Description:
VM for wordpress projects
Guest:
Configured memory balloon size: 0 MB
主机运行的内核版本4.16.0-1-amd64。
答案1
package
通过安装网络工具解决了该问题。显然系统缺少ifconfig
VirtualBox 用于设置网络接口的工具。