저는 Windows 10 노트북의 라우터로 VirtualBox의 Debian Buster VM을 사용하고 있습니다. [여기서 언급할 가치가 없는 이유]
며칠 동안은 잘 작동했지만 어제와 오늘 집에 있는 상대적으로 안정적인 네트워크에서는 트래픽이 엄청나게 느려지고 신뢰할 수 없게 되었습니다. 호스트를 포함한 다른 장치는 정상적으로 작동하고 있습니다. 가상 머신(및 가상 머신만)을 다시 시작하면 문제가 일시적으로 해결되지만 문제가 다시 나타나는 데는 오랜 시간이 걸리지 않습니다.
면밀히 조사한 결과 콘솔과 /var/log/syslog
.
가상 네트워크 인터페이스 카드인 eth0 및 eth1 인터페이스에 비슷한 문제/오류가 있습니다.
실제 장치 호스트는 Intel Dual Band Wireless-AC 3165를 갖춘 Lenovo ThinkPad E560 Intel i7이며, 이는 eth0 NAT 뒤에 있는 실제 NIC입니다.
그러나 eth1은 내부 네트워크를 위한 가상 네트워크 인터페이스로, Windows 호스트의 다른 가상 네트워크 인터페이스하고만 통신하며 실제 네트워크 인터페이스 카드나 외부 트래픽과는 아무런 관련이 없습니다. 따라서 문제는 (외부/실제) 네트워크나 호스트의 물리적 인터페이스와 관련된 것 같지 않습니다.
Virtual Box 버전은 5.2.12 r122591(Qt5.6.2)입니다. 또한 관련 가상 머신에 Virtual Box 도구를 설치했습니다.
뭐가 문제 야?
문제가 있는 인터페이스:
# ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:f6:32:22 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:82:0f:24 brd ff:ff:ff:ff:ff:ff
inet 4.1.1.1/24 brd 4.1.1.255 scope global eth1
valid_lft forever preferred_lft forever
lspci
연결된 가상 머신의 출력입니다.
$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:08.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)
eth0 오류. Eth1에서도 동일한 오류가 발생했습니다.
Jun 25 08:32:22 rui kernel: [31950.194099] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:32:25 rui kernel: [31952.306456] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:32:54 rui kernel: [31981.448886] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:32:59 rui kernel: [31987.206829] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 23 20:40:58 rui systemd[1]: Started ifup for eth0.
Jun 23 20:40:58 rui kernel: [ 1.671922] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 08:00:27:f6:32:22
Jun 23 20:40:58 rui kernel: [ 1.672229] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
Jun 23 20:40:59 rui ifup[570]: /sbin/ifup: waiting for lock on /run/network/ifstate.eth0
Jun 23 20:40:59 rui kernel: [ 4.760724] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 23 20:40:59 rui dhclient[581]: Listening on LPF/eth0/08:00:27:f6:32:22
Jun 23 20:40:59 rui sh[563]: Listening on LPF/eth0/08:00:27:f6:32:22
Jun 23 20:40:59 rui dhclient[581]: Sending on LPF/eth0/08:00:27:f6:32:22
Jun 23 20:40:59 rui sh[563]: Sending on LPF/eth0/08:00:27:f6:32:22
Jun 23 20:40:59 rui dhclient[581]: DHCPREQUEST of 10.0.2.15 on eth0 to 255.255.255.255 port 67 (xid=0x1211b42a)
Jun 23 20:40:59 rui sh[563]: DHCPREQUEST of 10.0.2.15 on eth0 to 255.255.255.255 port 67 (xid=0x1211b42a)
Jun 23 20:40:59 rui sh[563]: ifup: interface eth0 already configured
Jun 25 08:33:16 rui dhclient[644]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0xac0f1c44)
Jun 25 08:33:16 rui dhclient[644]: DHCPREQUEST of 10.0.2.15 on eth0 to 255.255.255.255 port 67 (xid=0x441c0fac)
Jun 25 08:33:45 rui kernel: [ 38.195899] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:34:23 rui kernel: [ 76.277453] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:34:37 rui kernel: [ 89.824132] NETDEV WATCHDOG: eth0 (e1000): transmit queue 0 timed out
Jun 25 08:34:37 rui kernel: [ 89.831381] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:34:39 rui kernel: [ 92.002061] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:37:59 rui kernel: [ 292.064298] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:38:01 rui kernel: [ 294.148491] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:38:12 rui kernel: [ 304.388066] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:38:37 rui kernel: [ 329.952311] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:38:39 rui kernel: [ 332.064828] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:38:56 rui kernel: [ 349.313777] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:39:01 rui kernel: [ 354.242015] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:39:03 rui kernel: [ 356.258135] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:39:04 rui kernel: [ 357.298945] e1000 0000:00:03.0 eth0: Detected Tx Unit Hang
Jun 25 08:39:05 rui kernel: [ 357.857091] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:39:07 rui kernel: [ 359.968627] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:40:45 rui kernel: [ 457.982736] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:40:47 rui kernel: [ 460.132984] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:41:28 rui kernel: [ 500.480653] e1000: eth0 NIC Link is Down
Jun 25 08:41:28 rui kernel: [ 500.480767] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:41:30 rui kernel: [ 502.755753] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:41:40 rui kernel: [ 512.834548] e1000: eth0 NIC Link is Down
Jun 25 08:41:40 rui kernel: [ 512.834570] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:41:42 rui kernel: [ 515.008848] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:41:52 rui kernel: [ 525.031738] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:41:55 rui kernel: [ 527.668391] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:42:21 rui kernel: [ 553.953056] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:42:23 rui kernel: [ 556.033233] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:42:38 rui kernel: [ 570.848721] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:42:40 rui kernel: [ 573.025803] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:42:55 rui kernel: [ 588.001188] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:42:58 rui kernel: [ 590.402069] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:43:18 rui kernel: [ 611.040602] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:43:20 rui kernel: [ 613.153379] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:43:41 rui kernel: [ 633.825059] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:43:43 rui kernel: [ 635.936611] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:43:58 rui kernel: [ 650.980297] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:44:01 rui kernel: [ 653.377622] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:44:06 rui kernel: [ 658.918888] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:44:09 rui kernel: [ 661.319139] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:44:24 rui kernel: [ 676.832703] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:44:26 rui kernel: [ 678.944975] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:44:46 rui kernel: [ 698.848483] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:44:48 rui kernel: [ 701.024837] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 08:44:52 rui kernel: [ 705.056365] e1000: eth0 NIC Link is Down
Jun 25 08:44:52 rui kernel: [ 705.056391] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 08:44:54 rui kernel: [ 707.174980] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:28:15 rui kernel: [ 3308.128693] e1000: eth0 NIC Link is Down
Jun 25 09:28:15 rui kernel: [ 3308.128863] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:28:17 rui kernel: [ 3310.241091] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:28:28 rui kernel: [ 3321.056739] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:28:30 rui kernel: [ 3323.297966] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:28:41 rui kernel: [ 3333.856657] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:28:43 rui kernel: [ 3336.001892] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:29:08 rui kernel: [ 3360.993029] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:29:10 rui kernel: [ 3363.105257] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:29:26 rui kernel: [ 3378.912149] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:29:28 rui kernel: [ 3381.007439] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:29:40 rui kernel: [ 3393.088355] e1000: eth0 NIC Link is Down
Jun 25 09:29:40 rui kernel: [ 3393.088381] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:29:42 rui kernel: [ 3395.170789] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:39:25 rui kernel: [ 3978.160481] e1000: eth0 NIC Link is Down
Jun 25 09:39:25 rui kernel: [ 3978.160521] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:39:28 rui kernel: [ 3980.353067] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:39:38 rui kernel: [ 3991.008647] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:39:40 rui kernel: [ 3993.184977] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:40:02 rui kernel: [ 4015.073022] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:40:04 rui kernel: [ 4017.249472] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:40:15 rui kernel: [ 4027.872558] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:40:17 rui kernel: [ 4029.956157] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:40:42 rui kernel: [ 4055.008653] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:40:44 rui kernel: [ 4057.091571] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:41:06 rui kernel: [ 4079.074864] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:41:08 rui kernel: [ 4081.191157] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:41:29 rui kernel: [ 4101.856291] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:41:31 rui kernel: [ 4103.968708] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:41:51 rui kernel: [ 4123.872855] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:41:53 rui kernel: [ 4125.985169] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:42:13 rui kernel: [ 4145.888157] e1000 0000:00:03.0 eth0: Reset adapter
Jun 25 09:42:15 rui kernel: [ 4147.968831] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jun 25 09:43:10 rui kernel: [ 4202.976829] e1000 0000:00:03.0 eth0: Reset adapter
VirtualBox 가상 머신 구성 매개변수
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe showvminfo 9806a7eb-0045-4373-bf64-1f5d6c895041
Name: Debian
Groups: /
Guest OS: Debian (64-bit)
UUID: 9806a7eb-0045-4373-bf64-1f5d6c895041
Config file: C:\Users\Rui\VirtualBox VMs\Debian\Debian.vbox
Snapshot folder: C:\Users\Rui\VirtualBox VMs\Debian\Snapshots
Log folder: C:\Users\Rui\VirtualBox VMs\Debian\Logs
Hardware UUID: 9806a7eb-0045-4373-bf64-1f5d6c895041
Memory size: 8192MB
Page Fusion: off
VRAM size: 10MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 2
PAE: on
Long Mode: on
Triple Fault Reset: off
APIC: on
X2APIC: on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): HardDisk
Boot Device (2): DVD
Boot Device (3): Not Assigned
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: on
VT-x VPID: on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State: powered off (since 2018-06-27T15:10:06.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): SATA
Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 30
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): IDE
Storage Controller Type (1): PIIX4
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 2
Storage Controller Port Count (1): 2
Storage Controller Bootable (1): on
SATA (0, 0): C:\Users\Rui\VirtualBox VMs\Debian\Debian.vmdk (UUID: 934dc586-67a5-45c9-b548-90b4f1f7bda0)
NIC 1: MAC: 080027F63222, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM , Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 1 Rule(0): name = Rule 1, protocol = tcp, host ip = , host port = 22, guest ip = , guest port = 22
NIC 2: MAC: 080027820F24, Attachment: Host-only Interface 'VirtualBox Host-Only Ethernet Adapter #2', Cable connected: on, Trace: off (file: none), Type: 82540EM, 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: 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: disabled
Audio playback: disabled
Audio capture: enabled
Clipboard Mode: Bidirectional
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: C:\Users\Rui\VirtualBox VMs\Debian\Debian.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25
Capture options: ac_enabled=false
Guest:
Configured memory balloon size: 0 MB
가상 머신 메모리 사용량:
$ free -m
total used free shared buff/cache available
Mem: 7976 68 7780 2 128 7711
Swap: 2047 0 2047
가상 머신 로드:
xxxx@rui:~$ uptime
16:28:27 up 17 min, 1 user, load average: 0,00, 0,00, 0,00
답변1
마지막으로, 운 좋게도 "vbox의 무작위 연결 손실 및 오류"를 검색하면서 우연히 사람들이 제안하는 것을 발견했습니다.기본Intel NIC 에뮬레이션으로 인해 불안정성과 성능 문제가 발생합니다. 너무 많은 무작위 사람들이 이후에 기본 Intel VNIC 변경만 제안합니다.다른 것을 위해불안정성이 사라졌습니다. (슬프게도 왜 이런 일이 발생하는지에 대한 제안은 없습니다).
그래서 살펴보니 실제로 "VM Virtualbox Manager" 인터페이스->VM 이름->설정->네트워크->고급->어댑터 유형"에 기본값이 있습니다.가상네트워크 카드 "Intel Pro 1000 MT Desktop(8254OEM)".
따라서 문제가 되는 가상 머신을 종료했습니다.
VBox 도구가 이미 설치되어 있다는 것을 알고 반가상화 NIC가 더 높은 성능을 제공하고 CPU 작업이 덜 필요한 다른 가상 환경에서의 경험을 바탕으로 기본 NIC 유형을 사용하는 두 인터페이스를 "반가상화"virtio-net"으로 변경했습니다.
VirtIO는 과거 VirtualBox의 버그로 유명했지만, 제가 테스트한 결과 성능이 좋은 것 같았습니다.
라우팅된 트래픽의 속도 차이는 크며 오류는 완전히 사라집니다.
추신. 나는 이것이 "물리적" 인텔 NIC 카드 에뮬레이션의 vbox 버그라고 생각하며 실제 하드웨어와는 아무 관련이 없습니다. 실제로 eth0을 먼저 변경했는데, eth1에도 문제가 발생하기 시작했고, 그 다음 둘 다 다시 변경했습니다. Intel VNIC 에뮬레이션이 eth0과 eth1 모두에 문제가 있는 것 같습니다. 제가 질문에서 말했듯이지금, eth1은 물리적 NIC와 아무런 연관이 없습니다.
PS2. 예, 반가상화가 일반적으로 향상된다는 것을 알고 있습니다. 여기서 핵심 문제는 심각한 불안정성을 제거하는 것입니다.