golden_adopt
Record an existing VirtualBox VM as a golden image for env_fork, updating credentials on re-run. Supports adding SSH user, password, or key later without modifying the VM.
Instructions
Record a VirtualBox VM that already exists on this machine as a golden image env_fork can use. The VM itself is not modified unless take_snapshot is set. Re-running it updates the record, which is how credentials are added later: adopt a machine with no user or password, fork it, read its login prompt with env_screenshot, try a guess with env_type, then adopt again with what worked. Records nothing about the guest that was not observed - never invent a user or password here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | Yes | name of the existing VirtualBox VM, as shown by env_list or terrarium ls | |
| key | No | path to an SSH private key for the guest, if there is one | |
| user | No | SSH user inside the guest, if it is known | |
| image | No | golden image name to record it under (default: the VM name) | |
| shell | No | what an SSH session lands in: posix, cmd or powershell; Windows guests are probed on first exec when unset | |
| password | No | SSH password inside the guest, if it is known | |
| snapshot | No | snapshot to fork from (default terrarium-base) | |
| transport | No | how to reach the guest: ssh (default), or guestcontrol for a Windows with no SSH server, which talks through VirtualBox Guest Additions and needs user and password | |
| take_snapshot | No | create the snapshot if the VM does not have it yet; this modifies the user's VM |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | No | ||
| golden | Yes |