On this page:
top
up next →

3Managing VirtualBox MachinesπŸ”— i

The remote-shell/vbox library provides support for working with VirtualBox instances. The library is a fairly thin wrapper on the VBoxManage command, which is located via find-executable-path .

procedure

( start-vbox-vm name
[ #:max-vmsmax-vms
#:log-statuslog-status
#:pause-secondspause-seconds
#:dry-run?dry-run?])void?
name:string?
max-vms:real? =1
log-status:(string? #:restany/c . -> .any )=printf
pause-seconds:real? =3
dry-run?:any/c =#f
Starts a VirtualBox virtual machine name that is in a saved, powered off, or running state (where a running machine continues to run).

The start will fail if max-vms virtual machines are already currently running. This limit is a precaution against starting too many virtual-machine instances, which can overwhelm the host operating system.

The log-status argument is used to report actions and status information.

After the machine is started, start-vbox-vm pauses for the amount of time specified by pause-seconds, which gives the virtual machine time to find its bearings.

If dry-run is #t, then the machine is not actually started, but status information is written using log-status to report the action that would have been taken.

procedure

( stop-vbox-vm name
[ #:save-state?save-state?
#:log-statuslog-status
#:dry-run?dry-run?])void?
name:string?
save-state?:any/c =#t
log-status:(string? #:restany/c . -> .any )=printf
dry-run?:any/c =#f
Stops a VirtualBox virtual machine name that is in a running state. If save-state? is true, then the machine is put into saved state, otherwise the current machine state is discarded and the machine is powered off.

The log-status argument is used to report actions and status information.

If dry-run is #t, then the machine is not actually started, but status information is written using log-status to report the action that would have been taken.

procedure

( take-vbox-snapshot namesnapshot-name)void?

name:string?
snapshot-name:string?
Takes a snapshot of a virtual machine (which may be running), creating the snapshot named snapshot-name.

procedure

( restore-vbox-snapshot namesnapshot-name)void?

name:string?
snapshot-name:string?
Changes the current state of a virtual machine to be the one recorded as snapshot-name. The virtual machine must not be running.

procedure

( delete-vbox-snapshot namesnapshot-name)void?

name:string?
snapshot-name:string?
Deletes snapshot-name for the virtual machine name.

procedure

( exists-vbox-snapshot? namesnapshot-name)boolean?

name:string?
snapshot-name:string?
Reports whether snapshot-name exists for the virtual machine name.

procedure

( get-vbox-snapshot-uuid namesnapshot-name)(or/c #fstring? )

name:string?
snapshot-name:string?
Returns the UUID of snapshot-name for the virtual machine name.

Added in version 1.1 of package remote-shell-lib.

procedure

[ #:namename
#:cpuscpus
#:memorymemory])void?
Imports a VirtualBox VM from the OVF file at path.

When provided, name specifies what the VM’s alias (as seen in the GUI and in the output of commands like VBoxManage list vms) ought to be.

The cpus argument can be used to override the number of processors the VM has access to.

The memory argument can be used to override the amount of RAM (in MB) the VM has access to.

Added in version 1.4 of package remote-shell-lib.

top
up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /