Skip to content

Commit

Permalink
action: manual export
Browse files Browse the repository at this point in the history
Add dummy export action, which just shows how to export UTM VM manually
  • Loading branch information
naveenrajm7 committed Jul 21, 2024
1 parent 618f410 commit 44754e6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/vagrant_utm/action/export.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module VagrantPlugins
module Utm
module Action
# This action destroys the running machine.
class Export
def initialize(app, _env)
@app = app
end

def call(env)
# UTM 'Share' feature in UI will Export the virtual machine and all its data.
# Till 'Share' is exposed via API, show a message to manually export.
env[:ui].info I18n.t("vagrant_utm.actions.vm.export.manual_exporting",
name: env[:machine].provider_config.name)
@app.call(env)
end
end
end
end
end
27 changes: 27 additions & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ en:
MacOS is required to run this provider
utm_import_failed: |-
UTM virtual machine import failed.
utmctl_error: |-
There was an error while executing `utmctl`, a CLI used by vagrant-utm
for controlling UTM. The command and stderr is shown below.
Command: %{command}
Stderr: %{stderr}
messages:
importing_utm_file: |-
Expand Down Expand Up @@ -54,4 +61,24 @@ en:
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.
utm:
checking_guest_additions: |-
Checking for guest additions in VM...
actions:
vm:
check_guest_additions:
detected: |-
Guest additions detected
not_detected: |-
No guest additions were detected for this VM! Guest
additions are required for forwarded ports, shared folders, host only
networking, and more. If SSH fails on this machine, please install
the guest additions and retry
export:
manual_exporting: |-
UTM 'Share' feature in UI will Export the virtual machine and all its data.
Till 'Share' is exposed via API, this plugin shows manual steps to export VM.
1. Headover to UTM.
2. Open the action menu of VM by a secondary click on a virtual machine %{name} in the list.
3. Select 'Share' and save the file to a location.

0 comments on commit 44754e6

Please sign in to comment.