From 31b106a67ad4f2a821785fbf1e61dbab224203a2 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Wed, 18 Jan 2023 11:58:21 -0500 Subject: [PATCH] Move FAQ to documentation website (#383) Also reworked most of the questions and add new one about accessing services running on host. --- .gitignore | 3 +++ README.md | 66 ----------------------------------------------------- docs/faq.md | 56 +++++++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 4 files changed, 60 insertions(+), 66 deletions(-) create mode 100644 docs/faq.md diff --git a/.gitignore b/.gitignore index b7d59ac..37dfdb0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ tart.xcodeproj/ # GoReleaser dist/ + +# mkdocs +.cache diff --git a/README.md b/README.md index e9e34ba..5d93bc1 100644 --- a/README.md +++ b/README.md @@ -50,69 +50,3 @@ tart run ventura-base Please check the [official documentation](https://tart.run) for more information and/or feel free to use [discussions](https://github.com/cirruslabs/tart/discussions) for remaining questions. - -## FAQ - -
- How Tart is different from Anka - - Under the hood Tart is using the same technology as Anka 3.0 so there should be no real difference in performance - or features supported. If there is some feature missing please don't hesitate to [create a feature request](https://github.com/cirruslabs/tart/issues). - - Instead of Anka Registry, Tart can work with any OCI-compatible container registry. - - Tart doesn't yet have an analogue of Anka Controller for managing long living VMs. Please take a look at [CI integration](#ci-integration) - section for an option to run ephemeral VMs for your needs. -
- -
- Why Tart is free and open sourced? - - Apple did all the heavy lifting with their `Virtualization.Framework` and it just felt right to develop Tart in the open. - Please consider [becoming a sponsor](https://github.com/sponsors/cirruslabs) if you find Tart saving a substantial amount of money on licensing and engineering hours for your company. -
- -
- How to change VM's disk size? - - You can choose disk size upon creation of a virtual machine: - - ```bash - tart create --from-ipsw=latest --disk-size=25 monterey-vanilla - ``` - - For an existing VM please use [Packer Plugin](https://github.com/cirruslabs/packer-plugin-tart) which can increase - disk size for new virtual machines. Here is an example of [how to change disk size in a Packer template](https://github.com/cirruslabs/macos-image-templates/blob/fb0bcf68e0b093129136875c050205a66729b596/templates/base.pkr.hcl#L15). -
- -
- VM location on disk - - Tart stores all it's files in `~/.tart/` directory. Local images that you can run are stored in `~/.tart/vms/`. - Remote images are pulled into `~/.tart/cache/OCIs/`. -
- -
- Nested virtualization support? - - Tart is limited by functionality of Apple's `Virtualization.Framework`. At the moment `Virtualization.Framework` - doesn't support nested virtualization. -
- -
- Changing the default NAT subnet - - To change the default network to `192.168.77.1`: - - ```bash - sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address -string 192.168.77.1 - ``` - - Note that even through a network would normally be specified as `192.168.77.0`, the [vmnet framework](https://developer.apple.com/documentation/vmnet) seems to treat this as a starting address too and refuses to pick up such network-like values. - - The default subnet mask `255.255.255.0` should suffice for most use-cases, however, you can also change it to `255.255.0.0`, for example: - - ```bash - sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Mask -string 255.255.0.0 - ``` -
diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000..7749d6f --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,56 @@ +--- +hide: + - navigation +--- + +## How Tart is different from Anka? + +Under the hood Tart is using the same technology as Anka 3.0 so there should be no real difference in performance +or features supported. If there is some feature missing please don't hesitate to [create a feature request](https://github.com/cirruslabs/tart/issues). + +Instead of Anka Registry, Tart can work with any OCI-compatible container registry. This provides a much more consistent +and scalable experience for distributing virtual machines. + +Tart doesn't yet have an analogue of Anka Controller for managing long living VMs but [soon will be](https://github.com/cirruslabs/tart/issues/372). + +## VM location on disk + +Tart stores all it's files in `~/.tart/` directory. Local images that you can run are stored in `~/.tart/vms/`. +Remote images are pulled into `~/.tart/cache/OCIs/`. + +## Nested virtualization support? + +Tart is limited by functionality of Apple's `Virtualization.Framework`. At the moment `Virtualization.Framework` +doesn't support nested virtualization. + +## Connecting to a service running on host + +To connect from within a virtual machine to a service running on the host machine +please first make sure that the service is binded to `0.0.0.0`. + +Then from within a virtual machine you can access the service using the router's IP address that you can get either from `Preferences -> Network` +or by running the following command in the Terminal: + +```bash +netstat -nr | grep default | head -n 1 | awk '{print $2}' +``` + +Note: that accessing host is only possible with the default NAT network. If you are running your virtual machines with +[Softnet](https://github.com/cirruslabs/softnet) (via `tart run --net-softnet )`, then the network isolation +is stricter and it's not only possible to access the host. + +## Changing the default NAT subnet + +To change the default network to `192.168.77.1`: + +```bash +sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address -string 192.168.77.1 +``` + +Note that even through a network would normally be specified as `192.168.77.0`, the [vmnet framework](https://developer.apple.com/documentation/vmnet) seems to treat this as a starting address too and refuses to pick up such network-like values. + +The default subnet mask `255.255.255.0` should suffice for most use-cases, however, you can also change it to `255.255.0.0`, for example: + + ```bash + sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Mask -string 255.255.0.0 + ``` diff --git a/mkdocs.yml b/mkdocs.yml index 448bca6..812f713 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -83,6 +83,7 @@ nav: - "GitHub Actions": github-actions.md - "Self-hosted CI": cirrus-cli.md - "Managing VMs": vm-management.md + - "FAQ": faq.md extra: analytics: