macOS上开启kvm硬件accel加速虚拟化功能

本文解答了如何在Mac上使用QEMU时正确启用KVM加速的问题。指出KVM是Linux特有的虚拟化技术,并不适用于MacOS。对于Mac用户,推荐使用hvf(hypervisor.framework)作为加速选项。

https://stackoverflow.com/questions/53778106/how-to-enable-kvm-on-a-mac-for-qemu

How to enable KVM on a Mac for Qemu?

I'm virtualizing a machine for the first time on my Mac with Qemu (for an university assignment, so it's not possible to change the tool).
We have to compare some measurements between a VM running on KVM and one without KVM.
I tried to start the KVM machine by calling qemu-system-x86_64 my.qcow2 -enable-kvm but I'm getting this error:
qemu-system-x86_64: -machine accel=kvm: No accelerator found

I checked sysctl -a | grep machdep.cpu.features and that`s my output: 

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C

As there is VMX listed I assume my Macbook supports KVM and by default it should be enabled as far as I understood.
So why am I getting this error and does anybody have a solution to that?
Btw. my Macbook Pro is a Retina, 13' Mid 2014 version running 10.14.1 (18B75). 

 

asked Dec 14 '18 at 10:41

  • KVM is a Linux thing. Boot Linux. Or ask your instructor what they meant for you to do. 

kvm is the linux hypervisor implementation, that isn't going to work. Recent qemu version have support for the macos hypervisor framework, use accel=hvf for that.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值