FreeBSD下使用vncviewer登录bhyve Ubuntu虚拟机无显示-原来是VNC密码错误

问题:vncviewer登录Ubuntu无显示

在"运行程序"里输入vncviewer 192.168.1.5:5900之后,什么显示也没有 ,ps看也没有vncviewer相关进程。

复制代码
cbsd bls
JNAME  JID    VM_RAM  VM_CURMEM  VM_CPUS  PCPU  VM_OS_TYPE  IP4_ADDR         STATUS  VNC
bub12  87023  3072    712        2        2     linux       192.168.1.12/24  On      0.0.0.0:5900  

因为没有任何输出信息,无法查找问题,于是使用命令行执行vncviewer

在命令行输入:

复制代码
vncviewer 192.168.1.5:5900

显示

vncviewer 192.168.1.5:5900

Connected to RFB server, using protocol version 3.8

Performing standard VNC authentication

Password:

Auth Failed: Invalid Password.

问题还是比较严重的,因为要VNC登录的是一台hbyve虚拟机,如果哪一天ssh服务出了问题,VNC再不能登录,这台服务器就彻底登不进去了。所以才会花大力气去寻求解决方案。

问题解决:原来是密码错误

按照这里的修改vnc密码:CBSD bhyve Ubuntu 配置vnc登录管理-CSDN博客

问题搞定。

也可以重启bhyve Ubuntu,重启的时候会显示出vnc密码。

重启命令:

复制代码
cbsd brestart  bub12

cbsd brestart bub12 
Send SIGTERM to bub12. Soft timeout is 30 sec. 13 seconds left [................Send SIGTERM to bub12. Soft timeout is 30 sec. 12 seconds left [.................Send SIGTERM to bub12. Soft timeout is 30 sec. 0 seconds left [..............................]
bstop done in 16 seconds
VRDP is enabled. VNC bind/port: 192.168.1.5:5901
For attach VM console, use: vncviewer 192.168.1.5:5901
Resolution: 1024x768.
VNC pass: 123

Warning!!! You are running a system with open VNC port to the world wich is not secure
Please use IP filter or balancer with password to restrict VNC port access
Or change vnc_bind params to 127.0.0.1 and reboot VM after maintenance work

bhyve renice: 1
Waiting for PID.
PID: 87023
CBSD setup: bhyve ipfw counters num: 103/104
bstart done in 7 seconds

FreeBSD下登录VNC 软件包

在FreeBSD下登录VNC使用的是tightvnc软件包,这个软件包小巧实用,安装简单方便。在FreeBSD下使用pkg install tightvnc 安装,使用vncviewer IP:5900 来远程登录VNC server。

在尝试解决问题过程中,怀疑tightvnc软件包有问题,查看包信息发现没啥问题。

查看tightvnc包信息

pkg info tightvnc

tightvnc-1.3.10_9

Name : tightvnc

Version : 1.3.10_9

Installed on : Sat Jan 20 20:11:07 2024 CST

Origin : net/tightvnc

Architecture : FreeBSD:13:amd64

Prefix : /usr/local

Categories : net java

Licenses : GPLv2

Maintainer : dinoex@FreeBSD.org

WWW : https://www.tightvnc.com/

Comment : Enhanced version of VNC

Options :

JVNC_VIEWER : off

Shared Libs required:

libjpeg.so.8

libXt.so.6

libXpm.so.4

libXmu.so.6

libXext.so.6

libXaw.so.7

libX11.so.6

libSM.so.6

libICE.so.6

Annotations :

FreeBSD_version: 1302001

build_timestamp: 2024-01-14T22:59:22+0000

built_by : poudriere-git-3.4.0

cpe : cpe:2.3:a:tightvnc:tightvnc:1.3.10:::::freebsd13:x64:9

port_checkout_unclean: no

port_git_hash : bcee2795289

ports_top_checkout_unclean: no

ports_top_git_hash: 4a7e52dfb9d

repo_type : binary

repository : FreeBSD

Flat size : 2.33MiB

Description :

Enhanced version of VNC, called TightVNC (grown from the VNC Tight Encoder

project), which is optimized to work over slow network connections such as

low-speed modem links. While original VNC may be very slow when your

connection is not fast enough, with TightVNC you can work remotely almost

in real time in most environments. Besides bandwidth optimizations,TightVNC

also includes many other improvements, optimizations and bugfixes over VNC.

Note that TightVNC is free, cross-platform and compatible with the standard

VNC.

还尝试了安装其它vnc view软件调试

尝试安装tigervnc-viewer失败

pkg install tigervnc-viewer

安装的时候显示

pkg: cached package tigervnc-viewer-1.13.1_2: missing or size mismatch, cannot continue

Consider running 'pkg update -f'

Fetching tigervnc-viewer-1.13.1_2.pkg: 100% 296 KiB 303.6kB/s 00:01

pkg: cached package tigervnc-viewer-1.13.1_2: missing or size mismatch, fetching from remote

Fetching tigervnc-viewer-1.13.1_2.pkg: 100% 296 KiB 303.6kB/s 00:01

pkg: cached package tigervnc-viewer-1.13.1_2: missing or size mismatch, cannot continue

Consider running 'pkg update -f'

不明白怎么回事....

好几个vnc客户端安装的时候都报:

pkg: cached package wlvncc-s20240407: missing or size mismatch, cannot continue

Consider running 'pkg update -f'

这是怎么回事呢?

总结

FreeBSD下使用vncviewer登录bhyve虚拟机Ubuntu无显示,原来是VNC密码错误(忘记密码了),重设vnc密码搞定。注意重设密码后需要重启虚拟机。

另外即使不重设密码,重启时也能看到输出密码......果然重启大法非常管用!

到目前为止其它的一些vnc客户端安装没成功,先不管了,只要tightvnc能用就行。

相关推荐
噜啦噜啦嘞好2 分钟前
Linux——网络概念
linux·网络
欢喜躲在眉梢里4 分钟前
基于 openFuyao 社区的无硬件 UB 开发实战指南
运维·数据库·人工智能·vscode·ai·开发工具·go开发
博语小屋5 分钟前
简单线程池实现(单例模式)
linux·开发语言·c++·单例模式
import_random9 分钟前
[环境变量]export命令的作用是什么
linux
何妨呀~10 分钟前
Linux在VMware上添加磁盘与扩展分区
linux·运维·服务器
Wang's Blog16 分钟前
RabbitMQ: 全面安装与运维指南之从基础部署到高级配置
运维·分布式·rabbitmq
CIb0la17 分钟前
Linux 6.19-rc1 释出,龙芯为内核加入 32 位架构支持
linux·运维
牛奶咖啡1317 分钟前
Linux常见系统故障案例说明并修复解决(上)
linux·linux云计算·如何恢复linux中误删的数据·linux数据删除后的解决方法·分析修复linux无法启动故障·分析修复系统配置错误故障·linux系统资源配置错误修复
南棱笑笑生21 分钟前
20251215给飞凌OK3588-C开发板适配Rockchip原厂的Buildroot【linux-6.1】系统时统计eth1的插拔次数
linux·c语言·开发语言·rockchip
model200529 分钟前
Web 服务和 SFTP 用户 操作目录
linux·运维·服务器