Skip to content
forked from Code-Hex/vz

Create virtual machines and run Linux-based operating systems in Go using Apple Virtualization.framework.

License

Notifications You must be signed in to change notification settings

kata-container/vz

 
 

Repository files navigation

vz - Go binding with Apple Virtualization.framework

Build

vz provides the power of the Apple Virtualization.framework in Go. Put here is block quote of overreview which is written what is Virtualization.framework from the document.

The Virtualization framework provides high-level APIs for creating and managing virtual machines on Apple silicon and Intel-based Mac computers. Use this framework to boot and run a Linux-based operating system in a custom environment that you define. The framework supports the Virtio specification, which defines standard interfaces for many device types, including network, socket, serial port, storage, entropy, and memory-balloon devices.

USAGE

Please see the example directory.

REQUIREMENTS

  • Higher or equal to macOS Big Sur (11.0.0)
  • If you're M1 Mac User need higher or equal to Go 1.16

IMPORTANT

For binaries used in this package, you need to create an entitlements file like the one below and apply the following command.

vz.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.virtualization</key>
	<true/>
</dict>
</plist>
$ codesign --entitlements vz.entitlements -s - <YOUR BINARY PATH>

A process must have the com.apple.security.virtualization entitlement to use the Virtualization APIs.

If you want to use VZBridgedNetworkDeviceAttachment, you need to add also com.apple.vm.networking entitlement.

LICENSE

MIT License

About

Create virtual machines and run Linux-based operating systems in Go using Apple Virtualization.framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 62.5%
  • Objective-C 37.1%
  • Other 0.4%