VirtualBox
(重定向自Virtualbox)
网络
NAT 方式接入时,guest 访问 host 系统时使用10.0.x.2。
声音
Win10 找不到录音设备
VirtualBox 部分版本(如 5.1.18)下,Windows 10 使用「Intel HD」声音设备时系统无法找到录音设备。[1]可以这样解决:[2]
清理磁盘空间
为虚拟机的存储控制器开启 discard 和 nonrotational:
VBoxManage storageattach WinXP --storagectl "IDE 控制器" --port 0 --device 0 --discard on --nonrotational on
进入虚拟机,使用 fstrim 命令清理。[5]
存储控制器的名字可以由以下命令查看:
VBoxManage showvminfo WinXP --details --machinereadable | grep storagecontrollername
注意
迁移
迁移文件后休眠的虚拟机无法唤醒,需要硬关机。

对于 Windows 系统,从 AMD CPU 迁移到 Intel CPU 后,需要进入安全模式禁用几个驱动。将以下注册表项下的Start值从1改为4即可:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\amdk8 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Intelppm HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Processor
驱动的名字可以通过VGA模式启动后的蓝屏来判断(见右图)。
CPU
没有虚拟化支持的 CPU 无法在 32 位 host 系统中运行 64 位 guest 系统。
部分 CPU 特性会传给虚拟机,这导致了 Windows 系统难以使用 ghost 安装及迁移。自行编译的内核可能也会无法启动(如从 AMD CPU 迁移到 Intel CPU 后,自行编译的内核因为没有 3dnow 特性而无法启动)。
VirtualBox(以及 VMware)默认忽略 flush 请求,因此会频繁损坏 btrfs 文件系统。[6]
参见
- VBoxManage
- Windows网络#多网卡设置
- vdfuse: 使用 FUSE 读取虚拟机镜像文件
外部链接
- Win7 + VirtualBox安装Mac OS X雪豹操作系统图文详解 - 老赵点滴 - 追求编程之美
- 升级VirtualBox虚拟机到4.0新存储格式 - Keep It Simple and Stupid - Terry, TAOTAO & Twins;-)
- VirtualBoxes – Free VirtualBox® Images
- VMware三种网络连接模式(bridged, NAT, host-only) - graybull's Blog
- How to mount a VirtualBox VDI image - Be the signal
脚注与参考资料
- ↑ #15802 ([Regression] No microphone, Windows Guest, Linux Host.) – Oracle VM VirtualBox
- ↑ microphone in windows 10 in virtualbox - Stack Overflow
- ↑ 以管理员身份执行
bcdedit /set testsigning on即可。 - ↑ 从这里下载「Vista/Win7 (32/64 bits) Driver only (ZIP file)」。
- ↑ Shrinking VirtualBox vdi files · (-:
- ↑ #4649 (SATA emulation seems to ignore the flush() request) – Oracle VM VirtualBox