Skip to content

Commit 238a11b

Browse files
committed
added documents
1 parent 3bb2ef8 commit 238a11b

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 codehex
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
vz - Go binding with Apple [Virtualization.framework](https://developer.apple.com/documentation/virtualization?language=objc)
2+
=======
3+
4+
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.
5+
6+
> 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.
7+
8+
## USAGE
9+
10+
Please see the example directory.
11+
12+
## REQUIREMENTS
13+
14+
- Higher or equal to macOS Big Sur (11.0.0)
15+
- Higher or equal to Go 1.16 in Apple M1 Users
16+
17+
## IMPORTANT
18+
19+
For binaries used in this package, you need to create an entitlements file like the one below and apply the following command.
20+
21+
<details>
22+
<summary>vz.entitlements</summary>
23+
24+
```
25+
<?xml version="1.0" encoding="UTF-8"?>
26+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
27+
<plist version="1.0">
28+
<dict>
29+
<key>com.apple.security.virtualization</key>
30+
<true/>
31+
</dict>
32+
</plist>
33+
```
34+
35+
</details>
36+
37+
```sh
38+
$ codesign --entitlements vz.entitlements -s - <YOUR BINARY PATH>
39+
```
40+
41+
> A process must have the com.apple.security.virtualization entitlement to use the Virtualization APIs.
42+
43+
If you want to use [`VZBridgedNetworkDeviceAttachment`](https://developer.apple.com/documentation/virtualization/vzbridgednetworkdeviceattachment?language=objc), you need to add also `com.apple.vm.networking` entitlement.
44+
45+
## TODO
46+
47+
- [ ] [VZMACAddress](https://developer.apple.com/documentation/virtualization/vzmacaddress?language=objc)
48+
49+
## LICENSE
50+
51+
MIT License

example/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Example
2+
=======
3+
4+
You can get knowledge build and codesign process in Makefile.
5+
6+
## Build
7+
8+
```sh
9+
make all
10+
```
11+
12+
## Setup Hints
13+
14+
- I used `ubuntu-20.04.1-live-server-arm64.iso` in this example
15+
- [The Unarchiver](https://apps.apple.com/us/app/the-unarchiver/id425424353?mt=12) can extracts some important files from iso.
16+
- `vmlinuz` and `initrd` in `/casper`
17+
- Need to rename vmlinuz to vmlinuz.gz and unarchive it.
18+
- https://forums.macrumors.com/threads/ubuntu-linux-virtualized-on-m1-success.2270365/

0 commit comments

Comments
 (0)