Appendix A: Cheat Sheet
Everything at a glance, sorted by topic.
Addresses in the lab
| What | Where |
|---|---|
| Sunstone | http://<VM-IP>/ (redirects to
/fireedge/sunstone) |
| XML-RPC API | http://localhost:2633/RPC2 |
| OneFlow REST | http://localhost:2474/service |
| OneGate (from VMs) | http://169.254.16.9:5030 |
Network vnet |
192.168.150.0/24, gateway and DNS 192.168.150.1, NAT |
Network intern |
10.10.10.10–29, without gateway, database fixed at 10.10.10.20 |
| Login | oneadmin / lab-one-pass-123, CLI via
~/.one/one_auth |
| Logs | /var/log/one/oned.log,
/var/log/one/<VM-ID>.log,
rank_sched.log |
Commands by object
| Object | Common |
|---|---|
| Host | onehost list, show, disable,
enable, update --append |
| Image | oneimage create --type DATABLOCK --size … [--persistent],
list, chmod, delete,
restore |
| Template | onetemplate create, update,
instantiate --name … --user-inputs …, chmod,
delete --recursive |
| VM | onevm list, show, poweroff,
resume, resize,
terminate [--hard] |
| VM disks | onevm disk-attach --image, disk-detach,
disk-snapshot-create/-revert, disk-saveas |
| VM backup | onevm backup -d backup [--schedule … --weekly …] |
| Network | onevnet create, show, hold,
release, update --append |
| Security group | onesecgroup create, chmod,
commit |
| Users, groups | oneuser create, chgrp, umask;
onegroup create, quota;
oneacl list |
| Service | oneflow-template create/update/instantiate,
oneflow list/show/scale/recover [--delete] |
| Hook | onehook create, show [-e <n>],
delete |
| Database | sudo -u oneadmin onedb version,
onedb backup <datei> |
Template building blocks
NAME = "…"
CPU = "0.5" # share for the scheduler
VCPU = "1" # cores in the VM
MEMORY = "256" # MB
DISK = [ IMAGE = "…", IMAGE_UNAME = "oneadmin" ]
NIC = [ NETWORK = "…", NETWORK_UNAME = "oneadmin", IP = "…" ]
GRAPHICS = [ TYPE = "vnc", LISTEN = "0.0.0.0" ]
USER_INPUTS = [ NAME = "M|password|Beschreibung", X = "O|text|Beschreibung||Standard" ]
CONTEXT = [
NETWORK = "YES", TOKEN = "YES", REPORT_READY = "YES",
SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]", SET_HOSTNAME = "$NAME",
START_SCRIPT_BASE64 = "…" ]
Inside the VM: . /run/one-context/one_env loads all
context values.
States
| STAT | STATE / LCM_STATE | Meaning |
|---|---|---|
pend |
PENDING | waiting for a host, reason in SCHED_MESSAGE |
prol |
ACTIVE / PROLOG | disks are being copied |
boot |
ACTIVE / BOOT | libvirt is starting |
runn |
ACTIVE / RUNNING | running |
poff |
POWEROFF | off, disks stay in the system datastore |
shut |
ACTIVE / SHUTDOWN | shutting down |
Messages and what they mean
| Message | Cause | Day |
|---|---|---|
ONE_AUTH file not present |
~/.one/one_auth is missing |
1 |
server can't find …: REFUSED (inside the VM) |
dnsmasq without upstream | 1, 15 |
Not enough MEMORY on hosts |
template requests more than is free | 2 |
Cannot acquire image …, it is persistent and already in use |
persistent image used twice | 3 |
Could not terminate VM …, wrong state PROLOG/BOOT |
VM is just being started | 5 |
Cannot get IP/MAC lease from virtual network |
address taken or on hold | 5, 9 |
crun: invalid file system type on /sys/fs/cgroup |
Alpine without the cgroups service |
6 |
could not access the server configuration file |
Postgres configuration was on the system disk | 6, 15 |
wrong state RUNNING on
disk-snapshot-revert |
revert only when poff |
7 |
Not authorized to perform USE SECGROUP/IMAGE […] |
part of the VM not shared | 8, 15 |
limit of … reached for VMS quota |
quota reached | 8 |
FAILED_SCALING |
role cannot grow, only recover --delete helps |
9 |
Maximum cardinality is … |
max_vms applies |
9 |
Unkown state condition |
hook without ON |
11 |
$ID empty in hook |
only $TEMPLATE is replaced |
11, 15 |
RESERVED_MEM has no effect |
value must be given in KB | 14, 15 |
Sequences
- Appliance with data: data disk persistent, configuration on the data disk, startup script idempotent (runs on every start).
- Sharing with a team: template, all images, all networks, all security groups.
- Revert a snapshot:
poweroff,disk-snapshot-revert,resume. - Your own image: set up, clean up,
poweroff,disk-saveas, delete the build VM. - Upgrade: stop services,
onedb backup, packages,onedb upgrade, start services,onehost sync --force.