Vbox 下虚拟机第二次崩溃了, 我也崩溃了

27 天前
 KINGWAY

家中 32G 内存 mini pc 上 win11 装了个 vbox, 然后虚拟了 debian12, 通过 docker 部署了以下服务, 并通过 cf 的 tunnel 实现了外部访问(虽然速度慢点, 但是还挺稳定)

portainer reminder Kasm syncthing immich nextcloud vraya bitwarden wg-easy gitea

关键是莫名其妙崩溃了 2 次, 每次都是显示 initramfs 运行 fsck, 大概 10 次可以正常重启,但来不及做复制/快照就彻底崩溃了, 无论如何运行都会显示大量的 drdy err, 以及 I/O error, dev sda, sector 0 op 0x1:(write) flags 0x800 phys_seg 0 prio class 2. 导致都要重装.

现在累了,想请教下除了 vbox, win11 内置的 linux 子系统值得考虑吗? 前提是万一崩溃,是否可以进入镜像读取内部资料?

2303 次点击
所在节点    程序员
23 条回复
winson030
27 天前
Vbox 是 virtual box 吗?我觉得 VMware 值得一用,很稳定。我的是 win10 ltsc
wheat0r
27 天前
该不会是你硬盘有问题吧
KINGWAY
27 天前
@wheat0r #2 应该不是我的硬盘有问题, 因为宿主机 win11 完全正常.
KINGWAY
27 天前
刚最后一次尝试了 fsck, 结果系统起来了, 然后进去后发现 docker 服务起不来, apt update 了下出现了下面各种提示, chown/chmod 都无法解决.
root@Kingwayer:~# apt update
Hit:1 https://mirrors.aliyun.com/debian bookworm InRelease
Err:1 https://mirrors.aliyun.com/debian bookworm InRelease
Couldn't create temporary file /tmp/apt.conf.p4zeLu for passing config to apt-key
Ign:2 https://mirrors.aliyun.com/debian bookworm-updates InRelease
Ign:3 https://mirrors.aliyun.com/debian bookworm-backports InRelease
Ign:4 https://mirrors.aliyun.com/debian-security bookworm-security InRelease
Ign:5 https://download.webmin.com/download/newkey/repository stable InRelease
Err:6 https://mirrors.aliyun.com/debian bookworm-updates Release
Could not open file /var/lib/apt/lists/partial/mirrors.aliyun.com_debian_dists_bookworm-updates_Release - open (30: Read-only file system) [IP: 118.253.168.243 443]
Hit:7 https://download.webmin.com/download/newkey/repository stable Release
Err:8 https://download.webmin.com/download/newkey/repository stable Release.gpg
Couldn't create temporary file /tmp/apt.conf.SYbPnO for passing config to apt-key
Err:9 https://mirrors.aliyun.com/debian bookworm-backports Release
Could not open file /var/lib/apt/lists/partial/mirrors.aliyun.com_debian_dists_bookworm-backports_Release - open (30: Read-only file system) [IP: 218.77.199.221 443]
Err:10 https://mirrors.aliyun.com/debian-security bookworm-security Release
Could not open file /var/lib/apt/lists/partial/mirrors.aliyun.com_debian-security_dists_bookworm-security_Release - open (30: Read-only file system) [IP: 106.227.100.203 443]
Ign:11 https://download.docker.com/linux/debian bookworm InRelease
Err:12 https://apt.syncthing.net syncthing InRelease
416 Requested Range Not Satisfiable [IP: 143.244.196.6 443]
Err:13 https://download.docker.com/linux/debian bookworm Release
Could not open file /var/lib/apt/lists/partial/download.docker.com_linux_debian_dists_bookworm_Release - open (30: Read-only file system) [IP: 108.138.7.18 443]
can't create /var/cache/apt-show-versions/apackages-multiarch: Read-only file system at /usr/bin/apt-show-versions line 280.
Reading package lists... Done
W: Not using locking for read only lock file /var/lib/apt/lists/lock
W: chmod 0755 of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chown to _apt:root of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.88taf3 - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.DSaK7h - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.t5lnUU - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.UHCUu7 - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.07rXLV - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.AtS26j - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.Sl8MaR - IsAccessibleBySandboxUser (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/partial/apt.syncthing.net_dists_syncthing_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/partial/apt.syncthing.net_dists_syncthing_InRelease failed - Item::QueueURI (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/mirrors.aliyun.com_debian_dists_bookworm_InRelease - PrepareFiles (30: Read-only file system)
W: chown to _apt:root of file /var/lib/apt/lists/mirrors.aliyun.com_debian_dists_bookworm_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chmod 0600 of file /var/lib/apt/lists/mirrors.aliyun.com_debian_dists_bookworm_InRelease failed - Item::QueueURI (30: Read-only file system)
W: chown to root:root of file /var/lib/apt/lists/mirrors.aliyun.com_debian_dists_bookworm_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/mirrors.aliyun.com_debian_dists_bookworm_InRelease failed - 400::URIFailure (30: Read-only file system)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://mirrors.aliyun.com/debian bookworm InRelease: Couldn't create temporary file /tmp/apt.conf.p4zeLu for passing config to apt-key
tux
27 天前
win 自带的 hyper-v 就很够用,跑 debian 几个月稳定
ysc3839
27 天前
为什么不用 Hyper-V 呢?
KINGWAY
27 天前
@tux #5 #ysc3839 hper-v 没问题啊, 关键是如果虚拟机死了, 镜像文件能进去吗? 或者有完善的修复轮子吗?

此外, 听说 hpver-v 比较耗费资源?
buaacss
27 天前
镜像文件当然要用对应的软件来读取解析,如果需要读取,最好的办法是专门划分一个逻辑分区然后直通给虚拟机。这样宿主和虚拟机都可以读写这个分区。

hyper-v 是 1 类虚拟机,不会更消耗资源。
rsy
27 天前
VirtualBox 7.0.16 版本不要升级,会导致 Windows 蓝屏
/t/1033367
ntedshen
27 天前
卡 fsck 不是盘有问题就是 virtio 有问题。。。

现有的数据恢复或者提取工具如果能处理 vitrualbox 的 vdi 那么他一定可以处理微软的 vhd 或 vhdx ,毕竟后者显然更加通用。。。
Akkuman
27 天前
@KINGWAY vhdx 可以直接挂载成磁盘到你的 Windows 系统,访问方式和普通磁盘分区没差
KINGWAY
27 天前
@buaacss #8 开启了 hyper-V, 有个问题新检查的 VM 拿不到内网 ip 地址, 已经为它启用了个交换机, 使用的是外部网络且和 win11 宿主机同样的网卡, 请问会是哪些地方问题呢?
KINGWAY
27 天前
@buaacss #8 搞定了, 原来 hyper-V 的虚拟机需要指定交换机/网卡.
flynaj
26 天前
你这个错误是硬盘 IO 错误,virtual box 一直用,小 bug 有,但还是算稳定,你这个要把硬盘控制器配置成 virtio,如果主机是固态硬盘,一定要把虚拟机也配置成固态。
kenvix
26 天前
如果你没有 GUI 和特定硬件需求首先考虑 hyper-v
kenvix
26 天前
@KINGWAY #7 说反了吧,hyper-v 是裸金属虚拟化,效率是最高的
Admstor
26 天前
hyper-v 会让 host 效率降低没错就是

但是对于日常用,vmware 是更好的选择
vbox 真的不建议用
livepps
26 天前
无桌面需求,hyper-v 在 win 上面是最好的,会有点影响宿主机内存速度,其他影响不大,以前用过开 ubuntu 服务器,运行了几个月都没出过问题
billccn
26 天前
Win11 默认开启基于虚拟化的安全( https://learn.microsoft.com/zh-cn/windows-hardware/design/device-experiences/oem-vbs ),其实你整个系统都是运行在 Hyper-V 里面,不管你有没有开启它。这个时候第三方的虚拟机软件都是在使用 Hyper-V 兼容 API ,就是在 Hyper-V 引擎上套壳,而不是他们自己的虚拟化引擎,所以不管 VMware 还是 Virtualbox 的 bug 都挺多。你不需要 Virtualbox 的特定功能的话,就用 Hyper-V 好了。
petercui
25 天前
装个 esxi 然后再虚拟机器吧 ………… win 11 本身就不一定稳定 …………

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1034217

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX