Battery passthrough for virtual machines on Apple Silicon?

Ever since virtualization changed when Apple transitioned to their own Apple silicon chips, I’m curious whether there is anyway to make virtual machines read the host battery? Asking this because VMs in general always assuming it’s on AC adapter makes battery drain a lot faster it seems like so I’m curious whether adding it or some workaround to add battery reporting w/ power efficiency is possible to match with VMs is possible on Apple Silicon so users on Apple silicon MacBooks don’t have to worry about huge battery power consumption drain with adding some sort of feature or pass through to make VMs read host battery. Hope this makes sense.

Answered by DTS Engineer in 887353022

So I’m asking by a perspective as a consumer level of using VM apps built by other developers.

Thanks for that clarification.

The Apple Developer Forums are primarily focused on helping developer with code-level questions, so you’re not really in the right place. Having said that, I can provide some insight.

macOS has two virtualisation APIs:

  • Virtualization is a high-level API that makes it very easy to run a VM.
  • Hypervisor is a low-level API for developers who need a lot of control.

Neither has support for battery pass through. It’s feasible for a developer using Hypervisor to support battery pass through to guests that aren’t running macOS. Doing that for macOS guests would almost certainly require a bunch of unsupported reverse engineering.

If you were a developer using these APIs then I’d recommend that you file an enhancement request for this feature. However, as a user of VM apps then that’s probably not the best path forward. It’s fine for users to file ERs for user-level stuff, but in this case you’d be asking for developer-level feature, and it’d be hard for you to write that ER in a meaningful way.

So, my advice is that you connect up with the developers of your favourite VM software and suggest that they file an enhancement request for the APIs necessary to make this work.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Are you asking about this from the perspective of someone using VM apps built by other developers? Or as someone who’s building a VM app themselves?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So I’m asking by a perspective as a consumer level of using VM apps built by other developers.

Thanks for that clarification.

The Apple Developer Forums are primarily focused on helping developer with code-level questions, so you’re not really in the right place. Having said that, I can provide some insight.

macOS has two virtualisation APIs:

  • Virtualization is a high-level API that makes it very easy to run a VM.
  • Hypervisor is a low-level API for developers who need a lot of control.

Neither has support for battery pass through. It’s feasible for a developer using Hypervisor to support battery pass through to guests that aren’t running macOS. Doing that for macOS guests would almost certainly require a bunch of unsupported reverse engineering.

If you were a developer using these APIs then I’d recommend that you file an enhancement request for this feature. However, as a user of VM apps then that’s probably not the best path forward. It’s fine for users to file ERs for user-level stuff, but in this case you’d be asking for developer-level feature, and it’d be hard for you to write that ER in a meaningful way.

So, my advice is that you connect up with the developers of your favourite VM software and suggest that they file an enhancement request for the APIs necessary to make this work.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Battery passthrough for virtual machines on Apple Silicon?
 
 
Q