无法通过 Windows RDP 连接到我的 Ubuntu 服务器上的 Vbox 虚拟机

无法通过 Windows RDP 连接到我的 Ubuntu 服务器上的 Vbox 虚拟机

我有一台 ubuntu 18.x 服务器。我在服务器上安装了 virtualbox,并使用以下配置了一个新的 VM:这些说明。当我尝试最后一步时,出现错误窗口 在此处输入图片描述

我还注意到,当我运行 netstat 时,与我的虚拟机端口关联的 IP 是 0.0.0.0

但是当我nmap在我的服务器 IP 上运行时我得到了这个

PORT     STATE SERVICE
22/tcp   open  ssh
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
5001/tcp open  commplex-link

最后一行是我的虚拟机的端口号,这是输出$ VboxManage showvmdetails tails(比教程示例详细得多)


Name:                        tails
Groups:                      /
Guest OS:                    Linux 2.6 / 3.x / 4.x (32-bit)
UUID:                        7107a87f-4ffb-4c80-9cf9-0bc3ff6c6b4c
Config file:                 /var/vbox/tails/tails.vbox
Snapshot folder:             /var/vbox/tails/Snapshots
Log folder:                  /var/vbox/tails/Logs
Hardware UUID:               7107a87f-4ffb-4c80-9cf9-0bc3ff6c6b4c
Memory size                  1024MB
Page Fusion:                 disabled
VRAM size:                   8MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              1
PAE:                         enabled
Long Mode:                   disabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
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:                        enabled
IOAPIC:                      disabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardw. virt.ext:             enabled
Nested Paging:               enabled
Large Pages:                 disabled
VT-x VPID:                   enabled
VT-x unr. exec.:             enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       running (since 2019-12-11T04:49:39.483000000)
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:          
Teleporter Password:         
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:       
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:            
Storage Controller Name (0):            tails_SATA
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
tails_SATA (0, 0): /tmp/tails-amd64-4.1.iso (UUID: b48d5261-170d-4bc8-a1d6-2ee18c29051f)
tails_SATA (1, 0): /var/box/tails.vdi (UUID: 94e4ba64-b33d-4cdf-a37f-959ccd3dcffb)
NIC 1:                       MAC: 080027B4FB40, 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 2:                       disabled
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
Session name:                headless
Video mode:                  720x400x0 at 0,0 enabled
VRDE:                        enabled (Address 0.0.0.0, Ports 5001, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
VRDE port:                   5001
Video redirection:           disabled
VRDE property               : TCP/Ports  = "5001"
VRDE property               : TCP/Address = <not set>
OHCI USB:                    disabled
EHCI USB:                    disabled
xHCI USB:                    disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:<none>

VRDE Connection:             not active
Clients so far:              0

Capturing:                   not active
Capture audio:               not active
Capture screens:             
Capture file:                /var/vbox/tails/tails.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             

Guest:

Configured memory balloon size: 0MB
OS type:                     Linux26
Additions run level:         0

Guest Facilities:

No active facilities.



我该如何修复此问题以通过 RDP 连接到我的 VM?我真的不知道从哪里开始。我是一名软件开发人员,通常我可以从错误中推断出一些信息,但这并没有告诉我任何事情。问题出在服务器端吗?在主机端?我的网络配置?虚拟盒设置?我的 Windows 权限?我到处寻找一条可遵循的路径。我对网络了解不够,所以我来这里寻求帮助。我也在 Superuser 和 Serverfault 上发过帖子,但没有收到任何回复

答案1

遇到了同样的问题导游你使用了。执行以下操作来修复问题:


启用多连接

sudo VBoxManage modifyvm ubuntu16 --vrdemulticon on

允许端口 5001

sudo ufw allow 5001/tcp

重启

sudo VBoxManage controlvm ubuntu16 savestate
sudo reboot
sudo VBoxManage startvm ubuntu16 --type headless

最后就可以打开微软远程桌面输入IP地址和端口了

PC name: 192.107.123.12:5001

连接到远程桌面的屏幕截图

上述操作在装有 Virtual Box 5.2.44 的 Ubuntu 18.04 服务器上对我有效。我认为在装有 Virtual Box 6.1 的 Ubuntu 16.04 上也应该有效。

希望它能有所帮助!

答案2

事实证明,您使用的是 vbox 扩展包的旧版本,且存在错误。您必须更新它。这里是下载页面的链接。

下载页面

相关内容