#Boot Commands
A boot command types keystrokes into the VM's VNC console in order. Use it to drive boot loaders, ISO menus, and any pre-SSH setup. The communicator handles everything after SSH is up; boot commands fill in the gap before that.
#In the editor
Boot commands belong to a VM whose source is an ISO install. Open the VM, expand the Source section, pick ISO Install, and use the Boot Command textarea. Type one keystroke string per line.
Each line is a string mixing literal text with bracketed special tokens (<enter>, <wait5>, etc.). The build types them into the VM's VNC console in order, one line at a time.
For VMs whose source is Existing Image or Disk Image URL, boot commands do not apply: those VMs boot directly into a working OS.
#Reference
bootCommand:
- '<wait20>'
- '<down><down><enter>'
- '<wait>'
- 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg'
- '<enter>'
#Syntax
Each list element is a string mixing literal text with bracketed special tokens.
| Token | Effect |
|---|---|
<enter>, <return> | Enter key |
<tab> | Tab |
<esc> | Escape |
<bs>, <backspace> | Backspace |
<del>, <delete> | Delete |
<spacebar>, <space> | Spacebar |
<up>, <down>, <left>, <right> | Arrow keys |
<home>, <end>, <pageUp>, <pageDown> | Navigation |
<insert> | Insert |
<f1> through <f12> | Function keys |
<wait> | Wait 1 second (default) |
<wait5>, <wait20>, <waitNs> | Wait N seconds |
<leftCtrlOn>x<leftCtrlOff> | Press Ctrl, type x, release Ctrl |
<leftAltOn>, <leftShiftOn>, etc. | Other modifiers (with matching Off) |
| Any other character | Typed literally |
#Template variables
{{ .HTTPIP }} and {{ .HTTPPort }} are substituted before the keystrokes are typed. They point at the build's HTTP server (see Files and the File Delivery matrix in the VM's Source section).
#Common patterns
Wait for the boot menu, navigate to a menu item, type a URL:
bootCommand:
- '<wait20>' # let GRUB appear
- '<down><down><enter>' # navigate to "Advanced"
- '<wait><down><down><enter>' # navigate to "Automated install"
- '<wait70>' # let installer load
- '<leftCtrlOn>a<leftCtrlOff>' # Ctrl+A to clear field
- 'http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg'
- '<enter>'
For Windows, the boot command typically just dismisses "Press any key to boot from CD": a few <enter> lines with short waits. Autounattend.xml on the floppy drives the rest of setup.