vagrant_utm 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +11 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +59 -0
- data/Rakefile +12 -0
- data/docs/.gitignore +15 -0
- data/docs/Gemfile +10 -0
- data/docs/Gemfile.lock +276 -0
- data/docs/README.md +174 -0
- data/docs/_config.yml +76 -0
- data/docs/_includes/footer_custom.html +3 -0
- data/docs/_sass/gallery.scss +64 -0
- data/docs/_virtual_machines/archlinux-arm.md +13 -0
- data/docs/assets/images/favicon.ico +0 -0
- data/docs/assets/images/logo.png +0 -0
- data/docs/assets/images/screens/archlinux-logo.png +0 -0
- data/docs/assets/images/screens/debian-11-xfce-arm64.png +0 -0
- data/docs/boxes/creating_utm_box.md +70 -0
- data/docs/boxes/index.md +6 -0
- data/docs/boxes/utm_box_gallery.md +117 -0
- data/docs/commands.md +156 -0
- data/docs/configuration.md +51 -0
- data/docs/features/index.md +5 -0
- data/docs/features/synced_folders.md +28 -0
- data/docs/index.md +103 -0
- data/docs/internals/actions.md +20 -0
- data/docs/internals/index.md +5 -0
- data/docs/internals/status.md +25 -0
- data/docs/internals/utm_api.md +31 -0
- data/docs/known_issues.md +24 -0
- data/lib/vagrant_utm/action/boot.rb +22 -0
- data/lib/vagrant_utm/action/boot_disposable.rb +22 -0
- data/lib/vagrant_utm/action/check_accessible.rb +33 -0
- data/lib/vagrant_utm/action/check_created.rb +24 -0
- data/lib/vagrant_utm/action/check_guest_additions.rb +37 -0
- data/lib/vagrant_utm/action/check_qemu_img.rb +21 -0
- data/lib/vagrant_utm/action/check_running.rb +25 -0
- data/lib/vagrant_utm/action/check_utm.rb +30 -0
- data/lib/vagrant_utm/action/clear_forwarded_ports.rb +26 -0
- data/lib/vagrant_utm/action/created.rb +26 -0
- data/lib/vagrant_utm/action/customize.rb +50 -0
- data/lib/vagrant_utm/action/destroy.rb +25 -0
- data/lib/vagrant_utm/action/download_confirm.rb +19 -0
- data/lib/vagrant_utm/action/export.rb +22 -0
- data/lib/vagrant_utm/action/forced_halt.rb +28 -0
- data/lib/vagrant_utm/action/forward_ports.rb +90 -0
- data/lib/vagrant_utm/action/import.rb +63 -0
- data/lib/vagrant_utm/action/is_paused.rb +26 -0
- data/lib/vagrant_utm/action/is_running.rb +26 -0
- data/lib/vagrant_utm/action/is_stopped.rb +26 -0
- data/lib/vagrant_utm/action/message_already_running.rb +22 -0
- data/lib/vagrant_utm/action/message_not_created.rb +22 -0
- data/lib/vagrant_utm/action/message_not_running.rb +22 -0
- data/lib/vagrant_utm/action/message_not_stopped.rb +22 -0
- data/lib/vagrant_utm/action/message_will_not_create.rb +23 -0
- data/lib/vagrant_utm/action/message_will_not_destroy.rb +23 -0
- data/lib/vagrant_utm/action/prepare_forwarded_port_collision_params.rb +43 -0
- data/lib/vagrant_utm/action/resume.rb +24 -0
- data/lib/vagrant_utm/action/set_id.rb +20 -0
- data/lib/vagrant_utm/action/set_name.rb +62 -0
- data/lib/vagrant_utm/action/snapshot_delete.rb +34 -0
- data/lib/vagrant_utm/action/snapshot_restore.rb +28 -0
- data/lib/vagrant_utm/action/snapshot_save.rb +34 -0
- data/lib/vagrant_utm/action/suspend.rb +23 -0
- data/lib/vagrant_utm/action/wait_for_running.rb +28 -0
- data/lib/vagrant_utm/action.rb +413 -0
- data/lib/vagrant_utm/cap.rb +40 -0
- data/lib/vagrant_utm/config.rb +141 -0
- data/lib/vagrant_utm/disposable.rb +16 -0
- data/lib/vagrant_utm/driver/base.rb +358 -0
- data/lib/vagrant_utm/driver/meta.rb +132 -0
- data/lib/vagrant_utm/driver/version_4_5.rb +307 -0
- data/lib/vagrant_utm/errors.rb +77 -0
- data/lib/vagrant_utm/model/forwarded_port.rb +75 -0
- data/lib/vagrant_utm/model/list_result.rb +77 -0
- data/lib/vagrant_utm/plugin.rb +65 -0
- data/lib/vagrant_utm/provider.rb +139 -0
- data/lib/vagrant_utm/scripts/add_port_forwards.applescript +72 -0
- data/lib/vagrant_utm/scripts/clear_port_forwards.applescript +56 -0
- data/lib/vagrant_utm/scripts/customize_vm.applescript +59 -0
- data/lib/vagrant_utm/scripts/downloadVM.sh +1 -0
- data/lib/vagrant_utm/scripts/list_vm.js +32 -0
- data/lib/vagrant_utm/scripts/open_with_utm.js +30 -0
- data/lib/vagrant_utm/scripts/read_forwarded_ports.applescript +27 -0
- data/lib/vagrant_utm/scripts/read_guest_ip.applescript +9 -0
- data/lib/vagrant_utm/scripts/read_network_interfaces.applescript +12 -0
- data/lib/vagrant_utm/util/compile_forwarded_ports.rb +43 -0
- data/lib/vagrant_utm/version.rb +9 -0
- data/lib/vagrant_utm.rb +40 -0
- data/locales/en.yml +154 -0
- data/sig/vagrant_utm.rbs +4 -0
- data/vagrantfile_examples/Vagrantfile +27 -0
- metadata +140 -0
data/docs/README.md
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
# just-the-docs-template
|
2
|
+
|
3
|
+
This is a *bare-minimum* template to create a [Jekyll] site that:
|
4
|
+
|
5
|
+
- uses the [Just the Docs] theme;
|
6
|
+
- can be built and published on [GitHub Pages];
|
7
|
+
- can be built and previewed locally, and published on other platforms.
|
8
|
+
|
9
|
+
More specifically, the created site:
|
10
|
+
|
11
|
+
- uses a gem-based approach, i.e. uses a `Gemfile` and loads the `just-the-docs` gem;
|
12
|
+
- uses the [GitHub Pages / Actions workflow] to build and publish the site on GitHub Pages.
|
13
|
+
|
14
|
+
To get started with creating a site, simply:
|
15
|
+
|
16
|
+
1. click "[use this template]" to create a GitHub repository
|
17
|
+
2. go to Settings > Pages > Build and deployment > Source, and select GitHub Actions
|
18
|
+
|
19
|
+
If you want to maintain your docs in the `docs` directory of an existing project repo, see [Hosting your docs from an existing project repo](#hosting-your-docs-from-an-existing-project-repo).
|
20
|
+
|
21
|
+
After completing the creation of your new site on GitHub, update it as needed:
|
22
|
+
|
23
|
+
## Replace the content of the template pages
|
24
|
+
|
25
|
+
Update the following files to your own content:
|
26
|
+
|
27
|
+
- `index.md` (your new home page)
|
28
|
+
- `README.md` (information for those who access your site repo on GitHub)
|
29
|
+
|
30
|
+
## Changing the version of the theme and/or Jekyll
|
31
|
+
|
32
|
+
Simply edit the relevant line(s) in the `Gemfile`.
|
33
|
+
|
34
|
+
## Adding a plugin
|
35
|
+
|
36
|
+
The Just the Docs theme automatically includes the [`jekyll-seo-tag`] plugin.
|
37
|
+
|
38
|
+
To add an extra plugin, you need to add it in the `Gemfile` *and* in `_config.yml`. For example, to add [`jekyll-default-layout`]:
|
39
|
+
|
40
|
+
- Add the following to your site's `Gemfile`:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
gem "jekyll-default-layout"
|
44
|
+
```
|
45
|
+
|
46
|
+
- And add the following to your site's `_config.yml`:
|
47
|
+
|
48
|
+
```yaml
|
49
|
+
plugins:
|
50
|
+
- jekyll-default-layout
|
51
|
+
```
|
52
|
+
|
53
|
+
Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`.
|
54
|
+
|
55
|
+
## Publishing your site on GitHub Pages
|
56
|
+
|
57
|
+
1. If your created site is `YOUR-USERNAME/YOUR-SITE-NAME`, update `_config.yml` to:
|
58
|
+
|
59
|
+
```yaml
|
60
|
+
title: YOUR TITLE
|
61
|
+
description: YOUR DESCRIPTION
|
62
|
+
theme: just-the-docs
|
63
|
+
|
64
|
+
url: https://YOUR-USERNAME.github.io/YOUR-SITE-NAME
|
65
|
+
|
66
|
+
aux_links: # remove if you don't want this link to appear on your pages
|
67
|
+
Template Repository: https://github.com/YOUR-USERNAME/YOUR-SITE-NAME
|
68
|
+
```
|
69
|
+
|
70
|
+
2. Push your updated `_config.yml` to your site on GitHub.
|
71
|
+
|
72
|
+
3. In your newly created repo on GitHub:
|
73
|
+
- go to the `Settings` tab -> `Pages` -> `Build and deployment`, then select `Source`: `GitHub Actions`.
|
74
|
+
- if there were any failed Actions, go to the `Actions` tab and click on `Re-run jobs`.
|
75
|
+
|
76
|
+
## Building and previewing your site locally
|
77
|
+
|
78
|
+
Assuming [Jekyll] and [Bundler] are installed on your computer:
|
79
|
+
|
80
|
+
1. Change your working directory to the root directory of your site.
|
81
|
+
|
82
|
+
2. Run `bundle install`.
|
83
|
+
|
84
|
+
3. Run `bundle exec jekyll serve` to build your site and preview it at `localhost:4000`.
|
85
|
+
|
86
|
+
The built site is stored in the directory `_site`.
|
87
|
+
|
88
|
+
## Publishing your built site on a different platform
|
89
|
+
|
90
|
+
Just upload all the files in the directory `_site`.
|
91
|
+
|
92
|
+
## Customization
|
93
|
+
|
94
|
+
You're free to customize sites that you create with this template, however you like!
|
95
|
+
|
96
|
+
[Browse our documentation][Just the Docs] to learn more about how to use this theme.
|
97
|
+
|
98
|
+
## Hosting your docs from an existing project repo
|
99
|
+
|
100
|
+
You might want to maintain your docs in an existing project repo. Instead of creating a new repo using the [just-the-docs template](https://github.com/just-the-docs/just-the-docs-template), you can copy the template files into your existing repo and configure the template's Github Actions workflow to build from a `docs` directory. You can clone the template to your local machine or download the `.zip` file to access the files.
|
101
|
+
|
102
|
+
### Copy the template files
|
103
|
+
|
104
|
+
1. Create a `.github/workflows` directory at your project root if your repo doesn't already have one. Copy the `pages.yml` file into this directory. GitHub Actions searches this directory for workflow files.
|
105
|
+
|
106
|
+
2. Create a `docs` directory at your project root and copy all remaining template files into this directory.
|
107
|
+
|
108
|
+
### Modify the GitHub Actions workflow
|
109
|
+
|
110
|
+
The GitHub Actions workflow that builds and deploys your site to Github Pages is defined by the `pages.yml` file. You'll need to edit this file to that so that your build and deploy steps look to your `docs` directory, rather than the project root.
|
111
|
+
|
112
|
+
1. Set the default `working-directory` param for the build job.
|
113
|
+
|
114
|
+
```yaml
|
115
|
+
build:
|
116
|
+
runs-on: ubuntu-latest
|
117
|
+
defaults:
|
118
|
+
run:
|
119
|
+
working-directory: docs
|
120
|
+
```
|
121
|
+
|
122
|
+
2. Set the `working-directory` param for the Setup Ruby step.
|
123
|
+
|
124
|
+
```yaml
|
125
|
+
- name: Setup Ruby
|
126
|
+
uses: ruby/setup-ruby@v1
|
127
|
+
with:
|
128
|
+
ruby-version: '3.1'
|
129
|
+
bundler-cache: true
|
130
|
+
cache-version: 0
|
131
|
+
working-directory: '${{ github.workspace }}/docs'
|
132
|
+
```
|
133
|
+
|
134
|
+
3. Set the path param for the Upload artifact step:
|
135
|
+
|
136
|
+
```yaml
|
137
|
+
- name: Upload artifact
|
138
|
+
uses: actions/upload-pages-artifact@v1
|
139
|
+
with:
|
140
|
+
path: "docs/_site/"
|
141
|
+
```
|
142
|
+
|
143
|
+
4. Modify the trigger so that only changes within the `docs` directory start the workflow. Otherwise, every change to your project (even those that don't affect the docs) would trigger a new site build and deploy.
|
144
|
+
|
145
|
+
```yaml
|
146
|
+
on:
|
147
|
+
push:
|
148
|
+
branches:
|
149
|
+
- "main"
|
150
|
+
paths:
|
151
|
+
- "docs/**"
|
152
|
+
```
|
153
|
+
|
154
|
+
## Licensing and Attribution
|
155
|
+
|
156
|
+
This repository is licensed under the [MIT License]. You are generally free to reuse or extend upon this code as you see fit; just include the original copy of the license (which is preserved when you "make a template"). While it's not necessary, we'd love to hear from you if you do use this template, and how we can improve it for future use!
|
157
|
+
|
158
|
+
The deployment GitHub Actions workflow is heavily based on GitHub's mixed-party [starter workflows]. A copy of their MIT License is available in [actions/starter-workflows].
|
159
|
+
|
160
|
+
----
|
161
|
+
|
162
|
+
[^1]: [It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll#creating-your-site).
|
163
|
+
|
164
|
+
[Jekyll]: https://jekyllrb.com
|
165
|
+
[Just the Docs]: https://just-the-docs.github.io/just-the-docs/
|
166
|
+
[GitHub Pages]: https://docs.github.com/en/pages
|
167
|
+
[GitHub Pages / Actions workflow]: https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/
|
168
|
+
[Bundler]: https://bundler.io
|
169
|
+
[use this template]: https://github.com/just-the-docs/just-the-docs-template/generate
|
170
|
+
[`jekyll-default-layout`]: https://github.com/benbalter/jekyll-default-layout
|
171
|
+
[`jekyll-seo-tag`]: https://jekyll.github.io/jekyll-seo-tag
|
172
|
+
[MIT License]: https://en.wikipedia.org/wiki/MIT_License
|
173
|
+
[starter workflows]: https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml
|
174
|
+
[actions/starter-workflows]: https://github.com/actions/starter-workflows/blob/main/LICENSE
|
data/docs/_config.yml
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
title: Vagrant UTM
|
2
|
+
description: >-
|
3
|
+
vagrant_utm is a Vagrant plugin which adds UTM provider to Vagrant,
|
4
|
+
allowing Vagrant to control and provision machines via UTM's API
|
5
|
+
baseurl: "/docs" # the subpath of your site, e.g. /blog
|
6
|
+
# theme: just-the-docs
|
7
|
+
|
8
|
+
url: "https://naveenrajm7.github.io/vagrant_utm"
|
9
|
+
github_username: naveenrajm7
|
10
|
+
repository: naveenrajm7/vagrant_utm
|
11
|
+
|
12
|
+
# Build settings
|
13
|
+
remote_theme: just-the-docs/just-the-docs@v0.8.2
|
14
|
+
plugins:
|
15
|
+
- jekyll-remote-theme
|
16
|
+
|
17
|
+
# Website settings
|
18
|
+
|
19
|
+
logo: "/assets/images/logo.png"
|
20
|
+
# Set a path/url to a favicon that will be displayed by the browser
|
21
|
+
favicon_ico: "/assets/images/logo.png"
|
22
|
+
|
23
|
+
heading_anchors: true
|
24
|
+
|
25
|
+
nav_external_links:
|
26
|
+
- title: Vagrant
|
27
|
+
url: https://www.vagrantup.com
|
28
|
+
- title: UTM for macOS
|
29
|
+
url: https://mac.getutm.app
|
30
|
+
- title: Packer plugin for UTM
|
31
|
+
url: https://github.com/naveenrajm7/packer-plugin-utm
|
32
|
+
# - title: GitHub
|
33
|
+
# url: https://github.com/naveenrajm7/vagrant_utm
|
34
|
+
|
35
|
+
|
36
|
+
# Aux links for the upper right navigation
|
37
|
+
aux_links:
|
38
|
+
"Vagrant UTM on GitHub":
|
39
|
+
- "//github.com/naveenrajm7/vagrant_utm"
|
40
|
+
|
41
|
+
# Edit on Github
|
42
|
+
gh_edit_link: true
|
43
|
+
gh_edit_link_text: "Edit this page on GitHub"
|
44
|
+
gh_edit_repository: "https://github.com/naveenrajm7/vagrant_utm"
|
45
|
+
gh_edit_branch: "main"
|
46
|
+
gh_edit_source: "docs"
|
47
|
+
gh_edit_view_mode: "tree"
|
48
|
+
|
49
|
+
|
50
|
+
# callouts
|
51
|
+
callouts_level: quiet
|
52
|
+
callouts:
|
53
|
+
highlight:
|
54
|
+
color: yellow
|
55
|
+
important:
|
56
|
+
title: Important
|
57
|
+
color: blue
|
58
|
+
new:
|
59
|
+
title: New
|
60
|
+
color: green
|
61
|
+
note:
|
62
|
+
title: Note
|
63
|
+
color: purple
|
64
|
+
warning:
|
65
|
+
title: Warning
|
66
|
+
color: red
|
67
|
+
|
68
|
+
# For copy button on code
|
69
|
+
enable_copy_code_button: true
|
70
|
+
|
71
|
+
# Back to top link
|
72
|
+
back_to_top: true
|
73
|
+
back_to_top_text: "Back to top"
|
74
|
+
|
75
|
+
# Footer
|
76
|
+
footer_content: "Copyright © 2024 Naveenraj Muthuraj. Distributed by an <a href=\"https://github.com/naveenrajm7/vagrant_utm/tree/main/LICENSE.txt\">MIT license.</a>"
|
@@ -0,0 +1,64 @@
|
|
1
|
+
.gallery {
|
2
|
+
display: flex;
|
3
|
+
flex-flow: row wrap;
|
4
|
+
justify-content: center;
|
5
|
+
align-items: center;
|
6
|
+
}
|
7
|
+
|
8
|
+
.gallery .gallery-item {
|
9
|
+
padding: 5px;
|
10
|
+
width: 20em;
|
11
|
+
}
|
12
|
+
|
13
|
+
.gallery-item a {
|
14
|
+
text-decoration: none;
|
15
|
+
color: black;
|
16
|
+
}
|
17
|
+
|
18
|
+
.gallery h3, .gallery h4 {
|
19
|
+
text-align: center;
|
20
|
+
overflow: hidden;
|
21
|
+
text-overflow: ellipsis;
|
22
|
+
white-space: nowrap;
|
23
|
+
}
|
24
|
+
|
25
|
+
.gallery h3 {
|
26
|
+
font-size: 1.2em;
|
27
|
+
}
|
28
|
+
|
29
|
+
.gallery h4 {
|
30
|
+
margin: 10px 0 10px 0;
|
31
|
+
font-size: 0.8em;
|
32
|
+
font-weight: normal;
|
33
|
+
}
|
34
|
+
|
35
|
+
.gallery .image {
|
36
|
+
width: 20em;
|
37
|
+
}
|
38
|
+
|
39
|
+
.gallery .screenshot {
|
40
|
+
max-width: 100%;
|
41
|
+
height: auto;
|
42
|
+
display: block;
|
43
|
+
box-shadow: 0 1px 0 #ccc, 0 1px 0 1px #eee;
|
44
|
+
border-radius: 2px;
|
45
|
+
margin-left: auto;
|
46
|
+
margin-right: auto;
|
47
|
+
background: #DDD url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2244%22%20height%3D%2212%22%20viewBox%3D%220%200%2044%2012%22%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3C%2Fsvg%3E') 4px 4px no-repeat;
|
48
|
+
padding: 20px 0 0 0;
|
49
|
+
position: relative;
|
50
|
+
}
|
51
|
+
|
52
|
+
.gallery .placeholder {
|
53
|
+
padding-top: 75%;
|
54
|
+
}
|
55
|
+
|
56
|
+
.gallery li {
|
57
|
+
padding: 5px 0 5px 0;
|
58
|
+
}
|
59
|
+
|
60
|
+
.gallery .button {
|
61
|
+
padding-bottom: 5px;
|
62
|
+
margin: 20px 0 20px 0;
|
63
|
+
font-size: 1.5em;
|
64
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
title: ArchLinux ARM
|
3
|
+
architecture: ARM64
|
4
|
+
memory: 2048 MiB
|
5
|
+
disk: 10 GiB
|
6
|
+
display: Console
|
7
|
+
spice_installed: false
|
8
|
+
username: root
|
9
|
+
password: root
|
10
|
+
screenshot: archlinux-logo.png
|
11
|
+
download: https://github.com/utmapp/vm-downloads/releases/download/archlinux-arm64/archlinux-arm64-utm4.zip
|
12
|
+
utm_link: true
|
13
|
+
---
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,70 @@
|
|
1
|
+
---
|
2
|
+
title: Creating a UTM box
|
3
|
+
parent: UTM Box
|
4
|
+
nav_order: 2
|
5
|
+
---
|
6
|
+
|
7
|
+
# Creating a UTM Base Box
|
8
|
+
|
9
|
+
As with [every Vagrant Provider](https://developer.hashicorp.com/vagrant/docs/providers/basic_usage), the Vagrant UTM provider has a custom box format that is required to work with Vagrant and the UTM plugin.
|
10
|
+
|
11
|
+
{: .important }
|
12
|
+
The UTM bundle (.utm file) is the box format for Vagrant UTM provider.
|
13
|
+
Because the current UTM API does not support importing utm file, we do not use vagrant box format (.box file).
|
14
|
+
We currently use `utm://downloadVM?url=` to import VM to UTM.
|
15
|
+
|
16
|
+
|
17
|
+
{: .note }
|
18
|
+
However, once UTM supports import, we should be able to package UTM files into box format and use the benefits of Vagrant boxes . For example, downloading the box once to spin up multiple VMs and using vagrant cloud to publish custom UTM boxes.
|
19
|
+
|
20
|
+
|
21
|
+
{: .warning }
|
22
|
+
This is a reasonably advanced topic that a beginning user of Vagrant does not need to understand. If you are just getting started with Vagrant, skip this and use an [available box](/utm_box_gallery.md). If you are an experienced user of Vagrant and want to create your own custom boxes, this is for you.
|
23
|
+
|
24
|
+
## Virtual Machine
|
25
|
+
|
26
|
+
The virtual machine created in UTM can use any configuration you would like, but Vagrant has some hard requirements:
|
27
|
+
|
28
|
+
* The second network interface (adapter 1 or index 1) must be a `Emulated VLAN` adapter. Vagrant uses this to connect the first time.
|
29
|
+
|
30
|
+
* Use can use the first network interface (adapter 0 or index 0) to be `Shared Network`, which is recommended for new virtual machines.
|
31
|
+
|
32
|
+
Other than the above, you are free to customize the base virtual machine as you see fit.
|
33
|
+
|
34
|
+
## Additional Software
|
35
|
+
|
36
|
+
In addition to the software that should be installed based on the [general guide to creating base boxes](https://developer.hashicorp.com/vagrant/docs/boxes/base), UTM base boxes require some additional software.
|
37
|
+
|
38
|
+
### UTM Guest Support
|
39
|
+
|
40
|
+
In order to take full advantage of all the features UTM has to offer, you need to install some software in the virtual machine guest.
|
41
|
+
|
42
|
+
Check the [UTM Guide on Guest Support](https://docs.getutm.app/guest-support/guest-support/) to install software based on your guest operating system.
|
43
|
+
|
44
|
+
## Building your own UTM boxes
|
45
|
+
|
46
|
+
By satisfying the [general guidance on creating vagrant boxes](https://developer.hashicorp.com/vagrant/docs/boxes/base) and the above [Virtual Machine](#virtual-machine) requirements you can use your VM with Vagrant UTM plugin.
|
47
|
+
|
48
|
+
Apart from manually building the boxes, you can also use the semi-automated way of building these boxes using [packer plugin for UTM](https://github.com/naveenrajm7/packer-plugin-utm).
|
49
|
+
The packer plugin has a builder and a post processor, which uses an existing UTM file, adds Vagrant specific stuff and packs the UTM file as a zip so it can be used by UTM Vagrant plugin.
|
50
|
+
|
51
|
+
Checkout [UTM Box Guide](https://github.com/naveenrajm7/utm-box/blob/main/HowToBuild/DebianUTM.md) to know how to build Box using packer.
|
52
|
+
|
53
|
+
## Using your own UTM boxes
|
54
|
+
|
55
|
+
Due to the limitation of UTM API, the plugin can only take a url pointing to the zip file.
|
56
|
+
So, you can use a local python server to host your UTM bundle in zip file
|
57
|
+
|
58
|
+
```bash
|
59
|
+
python3 -m http.server
|
60
|
+
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
|
61
|
+
```
|
62
|
+
|
63
|
+
Use in Vagrantfile
|
64
|
+
```ruby
|
65
|
+
Vagrant.configure("2") do |config|
|
66
|
+
config.vm.provider :utm do |utm|
|
67
|
+
utm.utm_file_url = "http://localhost:8000/debian_vagrant_utm.zip"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
```
|
data/docs/boxes/index.md
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
title: UTM box gallery
|
3
|
+
# layout: default
|
4
|
+
parent: UTM Box
|
5
|
+
nav_order: 1
|
6
|
+
---
|
7
|
+
|
8
|
+
# UTM Box Gallery
|
9
|
+
|
10
|
+
To work with Vagrant, a base VM (box) must have
|
11
|
+
[certain features](https://developer.hashicorp.com/vagrant/docs/boxes/base), like a ssh user for vagrant to connect.
|
12
|
+
|
13
|
+
To help you get started with Vagrant UTM provider, couple of pre-built VMs from the [UTM Gallery](https://mac.getutm.app/gallery/) are modified to work with Vagrant and are made available to use.
|
14
|
+
|
15
|
+
|
16
|
+
* Debian 11 (Xfce):
|
17
|
+
```ruby
|
18
|
+
u.utm_file_url = https://github.com/naveenrajm7/utm-box/releases/download/debian-11/debian_vagrant_utm.zip
|
19
|
+
```
|
20
|
+
|
21
|
+
<!-- * ArchLinux ARM -->
|
22
|
+
|
23
|
+
|
24
|
+
{: .new}
|
25
|
+
To enable building reproducible and easily sharable UTM VM bundle a [packer plugin for UTM](https://github.com/naveenrajm7/packer-plugin-utm) has been developed.
|
26
|
+
Please see the [UTM Box Guide](https://github.com/naveenrajm7/utm-box/blob/main/HowToBuild/DebianUTM.md) on how these UTM Vagrant boxes were built using packer.
|
27
|
+
|
28
|
+
|
29
|
+
Check out [Creating UTM Box](/boxes/creating_utm_box.md) to build your own Vagrant compatible UTM box.
|
30
|
+
|
31
|
+
## Corresponding VMs from UTM Gallery
|
32
|
+
|
33
|
+
<div class="content">
|
34
|
+
<section class="gallery">
|
35
|
+
<!-- <div class="gallery-item">
|
36
|
+
<a href="{{ vm.url }}">
|
37
|
+
<h3>ArchLinux ARM</h3>
|
38
|
+
<h4><i class="fas fa-microchip"></i> ARM64 </h4>
|
39
|
+
<img src="{{ site.baseurl }}/assets/images/screens/archlinux-logo.png" alt="Screenshot" class="screenshot" />
|
40
|
+
</a>
|
41
|
+
</div> -->
|
42
|
+
<div class="gallery-item">
|
43
|
+
<a href="">
|
44
|
+
<h3>Debian 11 (Xfce)</h3>
|
45
|
+
<h4><i class="fas fa-microchip"></i> ARM64 </h4>
|
46
|
+
<img src="{{ site.baseurl }}/assets/images/screens/debian-11-xfce-arm64.png" alt="Screenshot" class="screenshot" />
|
47
|
+
</a>
|
48
|
+
</div>
|
49
|
+
</section>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<style>
|
53
|
+
.gallery {
|
54
|
+
display: flex;
|
55
|
+
flex-flow: row wrap;
|
56
|
+
justify-content: center;
|
57
|
+
align-items: center;
|
58
|
+
}
|
59
|
+
|
60
|
+
.gallery .gallery-item {
|
61
|
+
padding: 5px;
|
62
|
+
width: 20em;
|
63
|
+
}
|
64
|
+
|
65
|
+
.gallery-item a {
|
66
|
+
text-decoration: none;
|
67
|
+
color: black;
|
68
|
+
}
|
69
|
+
|
70
|
+
.gallery h3, .gallery h4 {
|
71
|
+
text-align: center;
|
72
|
+
overflow: hidden;
|
73
|
+
text-overflow: ellipsis;
|
74
|
+
white-space: nowrap;
|
75
|
+
}
|
76
|
+
|
77
|
+
.gallery h3 {
|
78
|
+
font-size: 1.2em;
|
79
|
+
}
|
80
|
+
|
81
|
+
.gallery h4 {
|
82
|
+
margin: 10px 0 10px 0;
|
83
|
+
font-size: 0.8em;
|
84
|
+
font-weight: normal;
|
85
|
+
}
|
86
|
+
|
87
|
+
.gallery .image {
|
88
|
+
width: 20em;
|
89
|
+
}
|
90
|
+
|
91
|
+
.gallery .screenshot {
|
92
|
+
max-width: 100%;
|
93
|
+
height: auto;
|
94
|
+
display: block;
|
95
|
+
box-shadow: 0 1px 0 #ccc, 0 1px 0 1px #eee;
|
96
|
+
border-radius: 2px;
|
97
|
+
margin-left: auto;
|
98
|
+
margin-right: auto;
|
99
|
+
background: #DDD url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2244%22%20height%3D%2212%22%20viewBox%3D%220%200%2044%2012%22%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3Ccircle%20cx%3D%2222%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%226%22%20r%3D%224%22%20fill%3D%22%23eee%22%20%2F%3E%3C%2Fsvg%3E') 4px 4px no-repeat;
|
100
|
+
padding: 20px 0 0 0;
|
101
|
+
position: relative;
|
102
|
+
}
|
103
|
+
|
104
|
+
.gallery .placeholder {
|
105
|
+
padding-top: 75%;
|
106
|
+
}
|
107
|
+
|
108
|
+
.gallery li {
|
109
|
+
padding: 5px 0 5px 0;
|
110
|
+
}
|
111
|
+
|
112
|
+
.gallery .button {
|
113
|
+
padding-bottom: 5px;
|
114
|
+
margin: 20px 0 20px 0;
|
115
|
+
font-size: 1.5em;
|
116
|
+
}
|
117
|
+
</style>
|
data/docs/commands.md
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
title: Commands (CLI)
|
4
|
+
nav_order: 2
|
5
|
+
---
|
6
|
+
|
7
|
+
# Commands (CLI)
|
8
|
+
{: .no_toc }
|
9
|
+
|
10
|
+
This page lists all the supported Vagrant commands which depend on the UTM provider. Eg. `up`, `suspend`, `resume`, `halt`.
|
11
|
+
|
12
|
+
Adds note to the command which are not yet available. Eg. `package`.
|
13
|
+
|
14
|
+
The Vagrant commands that do not depend on provider are not listed and will continue to work. Eg. `global-status`
|
15
|
+
|
16
|
+
## Table of contents
|
17
|
+
{: .no_toc .text-delta }
|
18
|
+
|
19
|
+
1. TOC
|
20
|
+
{:toc}
|
21
|
+
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## **Box**
|
26
|
+
|
27
|
+
**Command: `vagrant box`**
|
28
|
+
|
29
|
+
UTM provider uses .utm file as VM bundle .
|
30
|
+
|
31
|
+
Box support is not yet available.
|
32
|
+
|
33
|
+
## **Destroy**
|
34
|
+
|
35
|
+
**Command: `vagrant destroy [name|id]`**
|
36
|
+
|
37
|
+
```utmctl delete```
|
38
|
+
|
39
|
+
## **Halt**
|
40
|
+
|
41
|
+
**Command: `vagrant halt [name|id]`**
|
42
|
+
|
43
|
+
```utmctl stop```
|
44
|
+
|
45
|
+
## **Package**
|
46
|
+
|
47
|
+
**Command: `vagrant package [name|id]`**
|
48
|
+
|
49
|
+
Currently prompts to manually export (Share) the VM
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
## **Port**
|
54
|
+
|
55
|
+
**Command: `vagrant port [name|id]`**
|
56
|
+
|
57
|
+
The port command displays the full list of guest ports mapped to the host machine ports:
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
## **Provision**
|
62
|
+
|
63
|
+
**Command: `vagrant provision [vm-name]`**
|
64
|
+
|
65
|
+
Runs any configured [provisioners](https://developer.hashicorp.com/vagrant/docs/provisioning) against the running Vagrant managed machine
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
## **Reload**
|
70
|
+
|
71
|
+
**Command: `vagrant reload [name|id]`**
|
72
|
+
|
73
|
+
The equivalent of running a [halt](https://developer.hashicorp.com/vagrant/docs/cli/halt) followed by an[up](https://developer.hashicorp.com/vagrant/docs/cli/up).
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
## **Resume**
|
78
|
+
|
79
|
+
**Command: `vagrant resume [name|id]`**
|
80
|
+
|
81
|
+
This resumes a Vagrant managed machine that was previously suspended, perhaps with the [suspend command](https://developer.hashicorp.com/vagrant/docs/cli/suspend).
|
82
|
+
|
83
|
+
```utmctl start```
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
## **Snapshot**
|
88
|
+
|
89
|
+
**Command: `vagrant snapshot`**
|
90
|
+
|
91
|
+
{: .warning }
|
92
|
+
Snapshot feature is not available in UTM.
|
93
|
+
The plugin just provides experimental feature using qemu-img
|
94
|
+
|
95
|
+
Vagrant UTM provider supports offline snapshots using
|
96
|
+
qemu-img. Hence only VM with single qcow2 file is supported.
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
## **SSH**
|
101
|
+
|
102
|
+
**Command: `vagrant ssh [name|id] [-- extra_ssh_args]`**
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
## **SSH Config**
|
107
|
+
|
108
|
+
**Command: `vagrant ssh-config [name|id]`**
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
## **Status**
|
113
|
+
|
114
|
+
**Command: `vagrant status [name|id]`**
|
115
|
+
|
116
|
+
`utmctl status`
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
## **Suspend**
|
121
|
+
|
122
|
+
**Command: `vagrant suspend [name|id]`**
|
123
|
+
|
124
|
+
`utmctl suspend`
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
## **Up**
|
129
|
+
|
130
|
+
**Command: `vagrant up [name|id]`**
|
131
|
+
|
132
|
+
Import VM (if not created)
|
133
|
+
|
134
|
+
`utmctl start`
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
## **Upload**
|
139
|
+
|
140
|
+
**Command: `vagrant upload source [destination] [name|id]`**
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
# **Custom Commands**
|
145
|
+
|
146
|
+
These are the commands not available in vagrant but specific to UTM provider.
|
147
|
+
|
148
|
+
## Disposable
|
149
|
+
|
150
|
+
**Command: `vagrant disposable [name|id]`**
|
151
|
+
|
152
|
+
`utmctl start --disposable`
|
153
|
+
|
154
|
+
Start virtual machine in disposable mdoe, which allows you to run a virtual machine without saving any persistent changes to the drive.
|
155
|
+
|
156
|
+
Read about Disposable mode in [UTM docs](https://docs.getutm.app/advanced/disposable/)
|