The cl-virtualbox Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-virtualbox Reference Manual

This is the cl-virtualbox Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:21:40 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-virtualbox is a library that allows you to control VirtualBox from Common Lisp, by calling the vboxmanage command.

Usage

Listing VMs

Examples:

virtualbox> (list-vms)
((:uuid "68fdde1a-a009-4c6f-af6e-250ef879e3e7" :name
  "crane_ubuntu_1410013141185_11153")
 (:uuid "b0ebec92-85cb-408c-b32c-c969e6392d5f" :name
  "vm_ubuntu_1410966111913_95217")
 (:uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7" :name
  "trivial-ssh_default_1411575480546_50302")
 (:uuid "5d287f3c-9b17-4a66-990a-80d4db3167ae" :name "windows"))
virtualbox> (list-running-vms)
nil

Finding VMs

Examples:

virtualbox> (find-by-name "crane_ubuntu_1410013141185_11153")
(:uuid "68fdde1a-a009-4c6f-af6e-250ef879e3e7" :name
 "crane_ubuntu_1410013141185_11153")
virtualbox> (find-by-uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7")
(:uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7" :name
 "trivial-ssh_default_1411575480546_50302")

Creating and Modifying VMs

Network Configuration

Controlling VM State

Managing Hard Drives

Managing DVDs

License

Copyright (c) 2014 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the MIT License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-virtualbox

Author

Fernando Borretti

Home Page

https://github.com/eudoxia0/cl-virtualbox

License

MIT

Description

Control VirtualBox from Common Lisp

Long Description

‘cl-virtualbox‘ is a library that allows you to control VirtualBox from Common Lisp, by calling the ‘vboxmanage‘ command.

# Usage

## Listing VMs

* ‘list-vms ()‘: Return a list of plists with the :name and :uuid of every virtual machine.

* ‘list-running-vms ()‘: Like ‘list-vms‘, but only return the VMs that are running.

Examples:

~~~lisp
virtualbox> (list-vms)
((:uuid "68fdde1a-a009-4c6f-af6e-250ef879e3e7" :name "crane_ubuntu_1410013141185_11153")
(:uuid "b0ebec92-85cb-408c-b32c-c969e6392d5f" :name "vm_ubuntu_1410966111913_95217")
(:uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7" :name "trivial-ssh_default_1411575480546_50302")
(:uuid "5d287f3c-9b17-4a66-990a-80d4db3167ae" :name "windows")) virtualbox> (list-running-vms)
nil
~~~

## Finding VMs

* ‘find-by-name (name)‘: Find a virtual machine by name.

* ‘find-by-uuid (uuid)‘: Find a virtual machine by UUID.

Examples:

~~~lisp
virtualbox> (find-by-name "crane_ubuntu_1410013141185_11153")
(:uuid "68fdde1a-a009-4c6f-af6e-250ef879e3e7" :name "crane_ubuntu_1410013141185_11153")
virtualbox> (find-by-uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7")
(:uuid "9ad98045-5109-4233-8b82-4c9a49b4cab7" :name "trivial-ssh_default_1411575480546_50302")
~~~

## Creating and Modifying VMs

* ‘create-vm (name)‘: Create a new virtual machine named ‘name‘.

* ‘set-vm-memory (name memory)‘: Set the VM’s memory (In megabytes)

* ‘set-vm-vram (name memory)‘: The the VM’s video memory (In megabytes).

* ‘set-vm-cpu-count (name count)‘: Set the number of virtual CPUs the VM has.

* ‘set-vm-acpi (name state)‘: Turn ACPI support on/off.

* ‘set-vm-ioapic (name state)‘: Turn IOAPIC support on/off.

* ‘set-vm-pae (name state)‘: Enable/disable PAE.

* ‘set-vm-longmode (name state)‘: Enable/disable longmode.

* ‘set-vm-hpet (name state)‘: Enable/disable the High-Precision Event Timer (HPET).

* ‘set-vm-3d-acceleration (name state)‘: Enable/disable 3D acceleration.

## Network Configuration

* ‘map-vm-ports (name host-port guest-port)‘: Map TCP traffic from ‘host-port‘ to ‘guest-ip:guest-port‘ in the guest.

## Controlling VM State

* ‘start-vm (name &key (type headless))‘: Start the virtual machine.

* ‘pause-vm (name)‘: Pause the virtual machine.

* ‘resume-vm (name)‘: Resume the virtual machine after pausing it.

* ‘cold-reboot-vm (name)‘: Reboot the virtual machine.

* ‘poweroff-vm (name)‘: Power off the virtual machine.

## Managing Hard Drives

* ‘create-hd (path &key size (format vdi))‘: Create a virtual hard drive on ‘path‘, with size ‘size‘ (In megabytes) and type ‘type‘ (:vdi by default).

## Managing DVDs

* ‘mount-dvd (name path)‘: Mount a DVD to the virtual machine.

* ‘unmount-dvd (name)‘: Remove the DVD from the virtual DVD drive.

# License

Copyright (c) 2014 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the MIT License.

Version

0.1

Dependencies
Source

cl-virtualbox.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-virtualbox/src

Parent

cl-virtualbox (system)

Location

src/

Component

cl-virtualbox.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-virtualbox.asd

Location

cl-virtualbox.asd

Systems

cl-virtualbox (system)

Packages

cl-virtualbox-asd


Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-virtualbox/src/cl-virtualbox.lisp

Parent

src (module)

Location

src/cl-virtualbox.lisp

Packages

cl-virtualbox

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 cl-virtualbox-asd

Source

cl-virtualbox.asd

Use List

Previous: , Up: Packages   [Contents][Index]

5.2 cl-virtualbox

Source

cl-virtualbox.lisp (file)

Nickname

virtualbox

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *vboxmanage-path*

The path to the VBoxManage command.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: attach-hd NAME PATHNAME &optional CONTROLLER DEVICE PORT
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: cold-reboot-vm NAME

Reboot the virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: configure-network NAME NETWORK-NAME IP-ADDRESS LOWER-IP UPPER-IP &optional NETWORK-MASK

The hard way to set an IP address.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: create-hd PATH &key SIZE FORMAT

Create a virtual hard drive on ‘path‘, with size ‘size‘ (In megabytes) and type ‘type‘ (:vdi by default).

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: create-vm NAME

Create a new virtual machine named ‘name‘.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: execute NAME IMAGE USERNAME PASSWORD &key WAIT-STDOUT

Execute ‘image‘ on the virtual machine ‘name‘, under the account ‘username‘ and ‘password‘. If ‘wait-stdout‘ is true, wait for the program to finish and print its output.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: find-by-name NAME

Find a virtual machine by name.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: find-by-uuid UUID

Find a virtual machine by UUID.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: import-vm OVF-PATH &optional NAME

Import a virtual machine from an OVF file.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: list-host-only-ifs ()

List host only interfaces.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: list-running-vms ()

Like ‘list-vms‘, but only return the VMs that are running.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: list-vms ()

Return a list of plists with the :name and :uuid of every virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: map-vm-ports NAME HOST-PORT GUEST-IP GUEST-PORT

Map TCP traffic from ‘host-port‘ to ‘guest-ip:guest-port‘ in the guest.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: mount-dvd NAME PATH

Mount a DVD to the virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: pause-vm NAME

Pause the virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: poweroff-vm NAME

Power off the virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: resume-vm NAME

Resume the virtual machine after pausing it.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: send-virtual-input NAME INPUT-LIST
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-3d-acceleration NAME STATE

Enable/disable 3D acceleration.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-acpi NAME STATE

Turn ACPI support on/off.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-cpu-count NAME COUNT

Set the number of virtual CPUs the VM has.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-hpet NAME STATE

Enable/disable the High-Precision Event Timer (HPET).

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-ioapic NAME STATE

Turn IOAPIC support on/off.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-ip NAME NETWORK-NAME IP-ADDRESS

The easy way to set an IP address.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-longmode NAME STATE

Enable/disable longmode.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-memory NAME MEMORY

Set the VM’s memory (In megabytes)

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-pae NAME STATE

Enable/disable PAE.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: set-vm-vram NAME MEMORY

The the VM’s video memory (In megabytes).

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: start-vm NAME &key TYPE

Start the virtual machine.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: unmount-dvd NAME

Remove the DVD from the virtual DVD drive.

Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: +character-scancode-map+
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Special Variable: +special-scancode-map+
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: bool->str BOOL
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: cmd COMMAND-FORMAT &rest ARGS
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: keyword->scancodes KEYWORD
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: keyword->str KEYWORD
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: parse-key-value STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: parse-list-line LINE
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: parse-report STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: parse-vm-list STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: run-cmd COMMAND
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: send-scancodes NAME SCANCODES
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: split-by-double-newlines STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: split-by-newlines STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)

Function: string->scancodes STRING
Package

cl-virtualbox

Source

cl-virtualbox.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-virtualbox.asd: The cl-virtualbox<dot>asd file
cl-virtualbox/src: The cl-virtualbox/src module
cl-virtualbox/src/cl-virtualbox.lisp: The cl-virtualbox/src/cl-virtualbox<dot>lisp file

F
File, Lisp, cl-virtualbox.asd: The cl-virtualbox<dot>asd file
File, Lisp, cl-virtualbox/src/cl-virtualbox.lisp: The cl-virtualbox/src/cl-virtualbox<dot>lisp file

L
Lisp File, cl-virtualbox.asd: The cl-virtualbox<dot>asd file
Lisp File, cl-virtualbox/src/cl-virtualbox.lisp: The cl-virtualbox/src/cl-virtualbox<dot>lisp file

M
Module, cl-virtualbox/src: The cl-virtualbox/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   B   C   E   F   I   K   L   M   P   R   S   U  
Index Entry  Section

A
attach-hd: Exported functions

B
bool->str: Internal functions

C
cmd: Internal functions
cold-reboot-vm: Exported functions
configure-network: Exported functions
create-hd: Exported functions
create-vm: Exported functions

E
execute: Exported functions

F
find-by-name: Exported functions
find-by-uuid: Exported functions
Function, attach-hd: Exported functions
Function, bool->str: Internal functions
Function, cmd: Internal functions
Function, cold-reboot-vm: Exported functions
Function, configure-network: Exported functions
Function, create-hd: Exported functions
Function, create-vm: Exported functions
Function, execute: Exported functions
Function, find-by-name: Exported functions
Function, find-by-uuid: Exported functions
Function, import-vm: Exported functions
Function, keyword->scancodes: Internal functions
Function, keyword->str: Internal functions
Function, list-host-only-ifs: Exported functions
Function, list-running-vms: Exported functions
Function, list-vms: Exported functions
Function, map-vm-ports: Exported functions
Function, mount-dvd: Exported functions
Function, parse-key-value: Internal functions
Function, parse-list-line: Internal functions
Function, parse-report: Internal functions
Function, parse-vm-list: Internal functions
Function, pause-vm: Exported functions
Function, poweroff-vm: Exported functions
Function, resume-vm: Exported functions
Function, run-cmd: Internal functions
Function, send-scancodes: Internal functions
Function, send-virtual-input: Exported functions
Function, set-vm-3d-acceleration: Exported functions
Function, set-vm-acpi: Exported functions
Function, set-vm-cpu-count: Exported functions
Function, set-vm-hpet: Exported functions
Function, set-vm-ioapic: Exported functions
Function, set-vm-ip: Exported functions
Function, set-vm-longmode: Exported functions
Function, set-vm-memory: Exported functions
Function, set-vm-pae: Exported functions
Function, set-vm-vram: Exported functions
Function, split-by-double-newlines: Internal functions
Function, split-by-newlines: Internal functions
Function, start-vm: Exported functions
Function, string->scancodes: Internal functions
Function, unmount-dvd: Exported functions

I
import-vm: Exported functions

K
keyword->scancodes: Internal functions
keyword->str: Internal functions

L
list-host-only-ifs: Exported functions
list-running-vms: Exported functions
list-vms: Exported functions

M
map-vm-ports: Exported functions
mount-dvd: Exported functions

P
parse-key-value: Internal functions
parse-list-line: Internal functions
parse-report: Internal functions
parse-vm-list: Internal functions
pause-vm: Exported functions
poweroff-vm: Exported functions

R
resume-vm: Exported functions
run-cmd: Internal functions

S
send-scancodes: Internal functions
send-virtual-input: Exported functions
set-vm-3d-acceleration: Exported functions
set-vm-acpi: Exported functions
set-vm-cpu-count: Exported functions
set-vm-hpet: Exported functions
set-vm-ioapic: Exported functions
set-vm-ip: Exported functions
set-vm-longmode: Exported functions
set-vm-memory: Exported functions
set-vm-pae: Exported functions
set-vm-vram: Exported functions
split-by-double-newlines: Internal functions
split-by-newlines: Internal functions
start-vm: Exported functions
string->scancodes: Internal functions

U
unmount-dvd: Exported functions

Jump to:   A   B   C   E   F   I   K   L   M   P   R   S   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
S  
Index Entry  Section

*
*vboxmanage-path*: Exported special variables

+
+character-scancode-map+: Internal special variables
+special-scancode-map+: Internal special variables

S
Special Variable, *vboxmanage-path*: Exported special variables
Special Variable, +character-scancode-map+: Internal special variables
Special Variable, +special-scancode-map+: Internal special variables

Jump to:   *   +  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-virtualbox: The cl-virtualbox system
cl-virtualbox: The cl-virtualbox package
cl-virtualbox-asd: The cl-virtualbox-asd package

P
Package, cl-virtualbox: The cl-virtualbox package
Package, cl-virtualbox-asd: The cl-virtualbox-asd package

S
System, cl-virtualbox: The cl-virtualbox system

Jump to:   C   P   S