scripting : add vm registry suite #6977
Open
+128
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6899
The registry suite is used to read and update vm registry.
All configs saved to disk is exposed by Configuration suite, similarly those that are not saved to disk are stored in RegistryEntry of a VM, they will now be exposed by Registry suite.
Users will now be able to give UTM→QEMU access to their custom path by updating registry, which can then be used in qemu additional args.
Added
UTMScriptingRegistryEntryImpl will control what will be exposed from RegistryEntry to scripting bridge, currently only shared directory is exposed in the form of [URL].
Since we have a separate suite for handling registry , this suite can grow on what will be exposed. Eg: externalDrives (Not everything in RegistryEntry is suitable to be exposed)
Added file urls to qemu addtional args, QEMU launcher looks at file urls of args to collect required resources. These files urls are not stored to the disk, meaning they will be lost .
However, they exists only for QEMU to figure out permission for these resources. Since the permission should actually come from registry, it is okay to lose these entries in qemu args.
Usage: Registry Suite
registry_add.applescript
osascript registry_add.applescript testVM
Example use-case for registry: directory share
Mount inside VM