运行qemu虚拟机报错Could not initialize SDL(No available video device)
·
运行代码:
qemu-system-x86_64 -pflash bios.bin -hda fat:rw:hda-contents -net none
报错:
vvfat hda-contents chs 1024,16,63
WARNING: Image format was not specified for 'json:{"fat-type": 0, "dir": "hda-contents", "driver": "vvfat", "floppy": false, "rw": true}' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Could not initialize SDL(No available video device) - exiting
原因:
由于 QEMU 需要一个视频设备来显示其图形输出,而在一个没有图形界面的服务器上(如大多数 Ubuntu 服务器),这个需求无法满足。
解决办法:
解决这个问题的一个方法是使用 QEMU 的无头模式(headless mode),这意味着 QEMU 将运行在没有图形输出的模式下。可以通过添加 -nographic 选项来启用这个模式。
qemu-system-x86_64 -pflash bios.bin -hda fat:rw:hda-contents -net none -nographic
附
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)