mheese / vz

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

Home Page:https://pkg.go.dev/github.com/Code-Hex/vz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vz - Go binding with Apple Virtualization.framework

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.

TODO

LICENSE

MIT License

About

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

https://pkg.go.dev/github.com/Code-Hex/vz

License:MIT License


Languages

Language:Go 62.8%Language:Objective-C 37.0%Language:Makefile 0.2%