Skip to content

API

The gRPC API every client uses: the service dicerd.v1.DaemonService, and the messages and enums it takes and returns. It is generated from proto/dicerd/v1, whose generated code is what clients call; see Using the API.

DaemonService

DaemonService manages virtual machines on a single host.

There is no notion of a cluster, a node or placement: the daemon owns the machine it runs on. To manage several hosts, run a daemon on each and point a client at whichever one you mean.

Creating an instance records its definition; it does not boot it. Use StartInstance for that. The two are separate so a definition can be written, reviewed and version-controlled before anything runs.

Resources are addressed by name or ID wherever a request has a name field. Methods follow the resource-oriented design of https://google.aip.dev: standard methods return the resource they act on, and deletes return Empty.

A failed call ends with a status whose code says what kind of failure it was, and whose message says it for a person:

  • NOT_FOUND: the resource named does not exist.
  • ALREADY_EXISTS: a resource with that name exists already.
  • INVALID_ARGUMENT: the request is malformed, whatever the host’s state.
  • FAILED_PRECONDITION: the resource is in the wrong state for the call, such as deleting a running instance.
  • RESOURCE_EXHAUSTED: the host has too little left: CPU or memory for an instance, addresses on a network.
  • UNAVAILABLE: something the daemon needs cannot be reached: a registry, a guest’s agent. Trying again may work.
  • PERMISSION_DENIED: the call’s token does not have the scope it needs, or the guest refused, such as a file it protects.
  • UNAUTHENTICATED: a call to the daemon’s TCP listener had no token, or one the daemon does not know.
  • UNIMPLEMENTED: the daemon, or an instance’s guest agent, is too old for the call.
  • INTERNAL: anything else: the daemon failed.
MethodRequestResponseDescription
CreateInstanceCreateInstanceRequestInstanceCreateInstance records an instance definition without starting it, unless start is set. It first pulls the image as the request’s pull policy says, reporting no progress: to show a pull’s progress, call PullImage first. Nothing is recorded if the image cannot be had.
UpdateInstanceUpdateInstanceRequestInstanceUpdateInstance modifies the definition of a stopped or failed instance. Its image cannot be changed: an instance always boots the image it was created with.
RenameInstanceRenameInstanceRequestInstanceRenameInstance changes a stopped instance’s name. The instance keeps its ID, its disks and its address; only what people call it changes.
StartInstanceStartInstanceRequestInstanceStartInstance boots a defined instance, or resumes one on standby. It returns once the guest’s agent answers, or once its workload has ended, however it ended. A guest whose kernel panics, or whose agent does not answer within a minute, has not booted. It is ended as a failure for its restart policy to handle, and FAILED_PRECONDITION says why, quoting the console. UNAVAILABLE means the daemon shut down before the guest booted.
StopInstanceStopInstanceRequestInstanceStopInstance shuts a running instance down, keeping its definition, overlay disk and address.
PauseInstancePauseInstanceRequestInstancePauseInstance halts a running instance’s vCPUs, keeping it resident.
ResumeInstanceResumeInstanceRequestInstanceResumeInstance continues a paused instance.
StandbyInstanceStandbyInstanceRequestInstanceStandbyInstance freezes a running or paused instance to disk and ends its hypervisor, freeing the CPU and memory it held. It keeps its address, host ports and writable volumes. StartInstance resumes it where it was; StopInstance discards what was frozen.
ForkInstanceForkInstanceRequestInstanceForkInstance creates an instance as a copy of another. It is the same as CreateSnapshot followed by ForkSnapshot, except that no snapshot is kept. A running or paused instance is paused while its memory is written, and its fork runs. A stopped instance’s fork is stopped. An instance that can write to a volume can be forked only while it is stopped.
ResizeInstanceResizeInstanceRequestInstanceResizeInstance changes a running instance’s vCPUs and memory without restarting it, within its max_vcpus and max_memory_bytes, and its definition with them, so it keeps them when it next starts. Memory can be resized from what the instance booted with up to its maximum, in steps of 2 MiB, and waits for the guest where the hypervisor can tell: Firecracker can, Cloud Hypervisor cannot; Firecracker also needs a host CPU with at least 40 bits of physical address. vCPUs can be resized on Cloud Hypervisor only. The guest’s kernel must support virtio-mem and CPU hotplug. Growing needs room on the host (RESOURCE_EXHAUSTED). If the guest fails the resize, the instance holds the larger of the two sizes until it next starts.
DeleteInstanceDeleteInstanceRequestgoogle.protobuf.EmptyDeleteInstance removes an instance and its overlay disk. It refuses a running instance unless force is set.
ListInstancesListInstancesRequestListInstancesResponseListInstances returns every defined instance.
GetInstanceGetInstanceRequestInstanceGetInstance returns one instance.
WaitInstanceWaitInstanceRequeststream WaitInstanceResponseWaitInstance waits for an instance to stop, and sends how it ended, as the stream’s one message. A restart is not a stop, and nor is standby. The daemon sends the response headers once it is waiting, so a caller that reads them before starting the instance cannot miss how it ends, even if it is deleted as it stops. With WAIT_CONDITION_HEALTHY, it waits instead for the running instance’s health check to pass.
GetInstanceLogsGetInstanceLogsRequeststream InstanceLogChunkGetInstanceLogs streams an instance’s log. The guest’s console is kept with the instance, so it can be read after a stop to explain one.
GetInstanceStatsGetInstanceStatsRequeststream GetInstanceStatsResponseGetInstanceStats streams what running and paused instances use of the host, read from their hypervisor processes rather than asked of their guests: a batch a second while it follows, or a single batch. Each batch is read over a second, so the first comes a second after the call.
ListInstanceProcessesListInstanceProcessesRequestListInstanceProcessesResponseListInstanceProcesses returns the processes running in a running instance, as its guest sees them: kernel threads are left out, and PIDs are the ones a command run by ExecInstance sees. Like ExecInstance, it waits for a guest that is still booting.
CreateSnapshotCreateSnapshotRequestSnapshotCreateSnapshot freezes an instance to disk. Of a running or paused instance it takes a memory snapshot: its memory, its device state and a copy of its overlay disk, pausing a running one for as long as it takes. Of a stopped one it takes a disk snapshot, of its overlay disk alone. Volumes are never included, so an instance that can write to one cannot have a memory snapshot taken.
ListSnapshotsListSnapshotsRequestListSnapshotsResponseListSnapshots returns the snapshots, or one instance’s, oldest first.
GetSnapshotGetSnapshotRequestSnapshotGetSnapshot returns one snapshot.
DeleteSnapshotDeleteSnapshotRequestgoogle.protobuf.EmptyDeleteSnapshot removes a snapshot.
RestoreSnapshotRestoreSnapshotRequestInstanceRestoreSnapshot puts the instance a snapshot was taken from, which must be stopped, back as it was then, discarding whatever it has written to its disk since. A memory snapshot resumes the guest where it was, and is refused if the instance’s address or mounts have changed; a disk snapshot leaves the instance stopped.
ForkSnapshotForkSnapshotRequestInstanceForkSnapshot creates an instance as a copy of the one a snapshot was taken of, with its definition but an identity of its own: its own name, address and MAC, and no published ports unless given. A memory snapshot’s fork runs, resumed where the snapshot’s guest was and given that identity before it can reach the network; a disk snapshot’s fork is stopped. A fork that fails leaves no instance behind.
ExecInstancestream ExecInstanceRequeststream ExecInstanceResponseExecInstance runs a command inside a running instance. The first client message must be an ExecInstanceStart; subsequent messages carry stdin data or terminal resize events. If the guest is still booting, the call waits up to 30 seconds for its agent to answer before failing with UNAVAILABLE.
CopyToInstancestream CopyToInstanceRequestgoogle.protobuf.EmptyCopyToInstance writes a file or directory into a running instance. The first message must be a CopyToInstanceStart; the rest carry a tar archive of it, in chunks, which lands at the path as cp would put it. Like ExecInstance, it waits for a guest that is still booting.
CopyFromInstanceCopyFromInstanceRequeststream CopyFromInstanceResponseCopyFromInstance reads a file or directory out of a running instance, as a tar archive in chunks. Like ExecInstance, it waits for a guest that is still booting.
CreateNetworkCreateNetworkRequestNetworkCreateNetwork defines a host-local network and sets up its bridge. The daemon creates the network named “default” itself, which an instance joins when it names none.
ListNetworksListNetworksRequestListNetworksResponseListNetworks returns every network.
GetNetworkGetNetworkRequestNetworkGetNetwork returns one network.
DeleteNetworkDeleteNetworkRequestgoogle.protobuf.EmptyDeleteNetwork removes a network that no instance or snapshot references, with its bridge. The default network cannot be deleted.
ListNetworkAllocationsListNetworkAllocationsRequestListNetworkAllocationsResponseListNetworkAllocations reports which addresses are assigned on a network. Allocation itself is a side effect of starting an instance and has no separate RPC.
CreateVolumeCreateVolumeRequestVolumeCreateVolume provisions a persistent block volume.
ListVolumesListVolumesRequestListVolumesResponseListVolumes returns every volume.
GetVolumeGetVolumeRequestVolumeGetVolume returns one volume.
DeleteVolumeDeleteVolumeRequestgoogle.protobuf.EmptyDeleteVolume removes a volume that no instance or snapshot references.
PullImagePullImageRequeststream PullImageProgressPullImage fetches an OCI image and converts it to a bootable root filesystem, reporting progress as it goes. The last message carries the image, which is ready to boot.
ListImagesListImagesRequestListImagesResponseListImages returns every pulled image.
GetImageGetImageRequestImageGetImage returns one pulled image.
DeleteImageDeleteImageRequestgoogle.protobuf.EmptyDeleteImage removes a pulled image. It refuses an image an instance is defined to boot from, unless force is set.
PruneImagesPruneImagesRequestPruneImagesResponsePruneImages removes every image no instance is defined to boot from.
ImportKernelstream ImportKernelRequestKernelImportKernel puts a guest kernel the client sends on the host, and returns once it is there. The first message must be an ImportKernelStart, and the rest carry the kernel in chunks, at most 512 MiB. The kernel is verified against the start’s sha256 if that is set. Nothing is recorded if it does not match, or if the kernel is empty. The daemon carries the kernel named “default” itself, which an instance boots when it names none.
ListKernelsListKernelsRequestListKernelsResponseListKernels returns every kernel, the default one among them.
GetKernelGetKernelRequestKernelGetKernel returns one kernel.
DeleteKernelDeleteKernelRequestgoogle.protobuf.EmptyDeleteKernel removes a kernel that no instance or snapshot references. The default kernel cannot be deleted.
CreateTokenCreateTokenRequestIssuedTokenCreateToken makes a token for the daemon’s TCP listener. It returns the token’s value, which is never returned again: the daemon keeps only the SHA-256 of its secret. It fails with FAILED_PRECONDITION if the daemon is not served over TCP.
ListTokensListTokensRequestListTokensResponseListTokens returns every token, without their values.
GetTokenGetTokenRequestTokenGetToken returns one token, without its value.
RotateTokenRotateTokenRequestIssuedTokenRotateToken gives a token a new secret and returns its new value, as CreateToken does. The old value stops working at once.
DeleteTokenDeleteTokenRequestgoogle.protobuf.EmptyDeleteToken removes a token. A client using it is refused from its next call.
GetHostInfoGetHostInfoRequestGetHostInfoResponseGetHostInfo reports what the daemon is: its version, the hypervisors it carries, and how it is reached.
GetResourcesGetResourcesRequestGetResourcesResponseGetResources reports how much CPU and memory instances may be given, how much they hold, and how full the data directory’s disk is.
CheckHostCheckHostRequeststream HostCheckResultCheckHost checks that the host can run instances and that they can be reached: KVM, IPv4 forwarding, the firewall, the tools the daemon needs, the uplink and the free disk space. These checks change nothing. With test_instance, it then boots a small test instance, checks that the instance can run a command and reach the internet, and deletes it. Booting the test instance needs a token with instances:write. It sends each result as soon as it is known: the host’s results first, then the test instance’s, then whether the test instance reached the internet.
GetEventsGetEventsRequeststream GetEventsResponseGetEvents streams what has happened to the resources on this host: the history kept, oldest first, in batches, then, with follow, each new event as it happens, none missed between the two. A follower that does not keep up is disconnected with RESOURCE_EXHAUSTED rather than slowing the host.

Messages

CheckHostRequest

FieldTypeDescription
test_instanceboolBoot a test instance after checking the host. This creates and deletes an instance, and pulls the instance’s image if the host does not have it.
test_instance_imagestringThe test instance’s image, which must have sh and wget, as busybox does. If empty, docker.io/library/busybox:1.37 is used.
test_instance_hypervisorHypervisorTypeThe hypervisor to boot the test instance on. If unset, Cloud Hypervisor is used.
test_instance_hypervisor_versionstringThe version of the hypervisor to boot the test instance on. If empty, the hypervisor’s default version is used.
test_instance_timeoutgoogle.protobuf.DurationHow long the test instance may take to run its command. If unset, it may take 2 minutes.
keep_failed_test_instanceboolKeep a failed test instance for inspection, instead of deleting it.

CopyFromInstanceRequest

FieldTypeDescription
namestringThe instance to copy from.
pathstringThe file or directory to read. A relative path is taken from the guest’s root directory.

CopyFromInstanceResponse

FieldTypeDescription
databytesThe next chunk of the tar archive.

CopyToInstanceRequest

FieldTypeDescription
startCopyToInstanceStartOne of payload.
databytesOne of payload. The next chunk of the tar archive.

CopyToInstanceStart

CopyToInstanceStart is the first message on a CopyToInstance stream.

FieldTypeDescription
namestringThe instance to copy into.
pathstringWhere the archive’s contents go inside it: into it, if it is a directory; in its place, if it is a file; at it, if nothing is there. A relative path is taken from the guest’s root directory.

CreateInstanceRequest

FieldTypeDescription
namestringThe instance’s name. When it is empty, the daemon makes one from the image’s name, such as nginx-k3x9.
image_refstringThe image to boot, by tag or digest. It is resolved to a digest when the instance is created, and the instance boots that image from then on.
hypervisor_typeHypervisorTypeUnspecified means Cloud Hypervisor.
hypervisor_versionstringA version that hypervisor ships. Empty is its default version, which HypervisorInfo lists first.
kernel_namestringEmpty means the default kernel, “default”.
kernel_argsstring
vcpusint32
memory_bytesint64
max_vcpusint32The most ResizeInstance can give the running instance: it boots with room for them, which costs the host nothing until it is used. Zero leaves no room, so its vCPUs or memory cannot change while it runs. Only Cloud Hypervisor on x86_64 can add vCPUs to a running guest, so max_vcpus is refused anywhere else.
max_memory_bytesint64
disk_bytesint64
disk_bytes_per_secondint64The bytes and operations per second each of the instance’s disks is read and written at, its image, overlay and volumes each limited on its own. A snapshot restores the disk limits it was taken with.
disk_iopsint64
upload_bytes_per_secondint64The bytes per second the guest sends and receives on its network.
download_bytes_per_secondint64
network_namestringEmpty means the default network, “default”.
static_ipstring
mountsrepeated Mount
envrepeated CreateInstanceRequest.EnvEntry
cmdrepeated string
labelsrepeated CreateInstanceRequest.LabelsEntry
hostnamestring
restart_policyRestartPolicy
health_checkHealthCheck
init_modeInitModeHow the guest starts the command. Unspecified means auto.
userstringWho the workload runs as in the exec init mode: user, uid, user:group or uid:gid, looked up in the guest’s /etc/passwd and /etc/group. Empty means the image’s USER, or root if it has none. The systemd init mode runs as root, so it cannot be combined with a user.
pull_policyPullPolicyWhen the image is pulled; see PullPolicy.
startboolBoots the instance immediately after defining it. The call then returns when StartInstance would.
portsrepeated PortMapping
remove_on_exitboolDeletes the instance once it stops, whether its guest ended on its own or someone stopped it. The daemon does the deleting, so it happens even if whoever asked for it has gone. An instance that its restart policy will start again is not deleted.
standby_aftergoogle.protobuf.DurationHow long the instance may be idle, running with its guest using under 5% of a vCPU and its network carrying under a packet a second, before it is put on standby. At least a minute; unset is never.

CreateInstanceRequest.EnvEntry

FieldTypeDescription
keystring
valuestring

CreateInstanceRequest.LabelsEntry

FieldTypeDescription
keystring
valuestring

CreateNetworkRequest

FieldTypeDescription
namestring
subnetstring
gatewaystring
mtuint32
nameserversrepeated string
isolatedbool
internalboolSee Network.internal. An internal network takes no nameservers.

CreateSnapshotRequest

FieldTypeDescription
instancestringThe instance to snapshot.
namestringThe snapshot’s name. The instance’s and the time’s when empty, as in web-20260102t150405z.

CreateTokenRequest

FieldTypeDescription
namestring
scopesrepeated stringWhat the token allows, as Token.scopes says. Unset is “*”.
secretstringThe token’s secret: at least 32 letters and digits. Unset has the daemon make one, which is what you want unless a tool must know the secret before the token exists.

CreateVolumeRequest

FieldTypeDescription
namestring
size_bytesint64

DeleteImageRequest

FieldTypeDescription
refstring
forceboolRemoves the image even if an instance is defined to boot from it. That instance will pull it again on its next start.

DeleteInstanceRequest

FieldTypeDescription
namestring
forceboolStops a running instance before deleting it.

DeleteKernelRequest

FieldTypeDescription
namestring

DeleteNetworkRequest

FieldTypeDescription
namestring

DeleteSnapshotRequest

FieldTypeDescription
namestringThe snapshot’s name or ID.

DeleteTokenRequest

FieldTypeDescription
namestring

DeleteVolumeRequest

FieldTypeDescription
namestring

DiskUsage

DiskUsage is how full the filesystem holding the data directory is, and how much has been promised on it. Disks are sparse, so provisioned may be far more than the filesystem’s size without anything being wrong – until the guests fill them.

FieldTypeDescription
pathstringThe data directory.
total_bytesint64
free_bytesint64What can still be written.
provisioned_bytesint64The sizes of every instance’s overlay disk and every volume, added up.

Event

Event is one thing that happened to one resource on this host.

FieldTypeDescription
timegoogle.protobuf.Timestamp
kindEventKind
idstringThe resource’s ID, which tells apart resources that had the same name at different times. Empty for a resource known only by its name, such as an image.
namestring
actionEventAction
messagestringWhat happened, in a line, for a person.
attributesrepeated Event.AttributesEntryWhat happened, for a program: exit_code, restart_count, digest.

Event.AttributesEntry

FieldTypeDescription
keystring
valuestring

ExecInstanceRequest

FieldTypeDescription
startExecInstanceStartOne of payload.
stdinbytesOne of payload.
resizeExecInstanceResizeOne of payload.

ExecInstanceResize

ExecInstanceResize resizes the remote terminal window.

FieldTypeDescription
rowsuint32
colsuint32

ExecInstanceResponse

FieldTypeDescription
stdoutbytesOne of payload.
stderrbytesOne of payload.
exit_codeint32One of payload. The command’s exit status. Always the last message on the stream.

ExecInstanceStart

ExecInstanceStart is the first message on an ExecInstance stream.

FieldTypeDescription
namestringThe instance to run the command in.
commandrepeated stringThe command and its arguments. Defaults to /bin/sh.
ttyboolWhether to allocate a pseudo-terminal.
cwdstringThe working directory inside the guest.
timeout_secondsint32Kills the command after this many seconds. Zero means no limit.
rowsuint32The initial terminal size, when tty is set.
colsuint32
envrepeated ExecInstanceStart.EnvEntryEnvironment variables added to the command’s environment.
userstringThe user to run the command as, as user, uid, user:group or uid:gid, looked up in the guest’s /etc/passwd and /etc/group. Empty means the user the workload runs as, which is root in the systemd init mode. An unknown user fails the command with INVALID_ARGUMENT. So that a command never runs as root by mistake, an instance whose guest agent cannot switch users fails it with FAILED_PRECONDITION. Its agent is that old if it has run since before the daemon was upgraded, or was restored from a snapshot taken before then.

ExecInstanceStart.EnvEntry

FieldTypeDescription
keystring
valuestring

ForkInstanceRequest

FieldTypeDescription
namestringThe instance to fork.
fork_namestringThe new instance’s name. When it is empty, the daemon makes one from the instance’s name and a random suffix, such as web-k3x9.
network_namestringThe network the new instance joins, and its address on it. The instance’s network, and an address it assigns, when empty.
static_ipstring
portsrepeated PortMappingThe host ports the new instance publishes. The instance’s are not copied: two instances cannot publish the same host port.

ForkSnapshotRequest

FieldTypeDescription
namestringThe snapshot’s name or ID.
fork_namestringThe new instance’s name. When it is empty, the daemon makes one from the snapshot’s name and a random suffix, such as web-golden-k3x9.
network_namestringThe network the new instance joins, and its address on it. The snapshot’s network, and an address it assigns, when empty.
static_ipstring
portsrepeated PortMappingThe host ports the new instance publishes. The snapshot’s instance’s are not copied: two instances cannot publish the same host port.

GetEventsRequest

GetEventsRequest picks events: every one, unless narrowed.

FieldTypeDescription
kindEventKindUnspecified picks every kind.
idstring
namestringThe resource’s name. An image’s may be given as it is pulled: busybox:latest picks the events about docker.io/library/busybox:latest.
sincegoogle.protobuf.TimestampOnly events at or after this time.
limitint32Only the last this many events of the history. Zero means all of it.
followboolKeep streaming new events after the history.

GetEventsResponse

GetEventsResponse is a batch of events, oldest first.

FieldTypeDescription
eventsrepeated Event
caught_upboolSet on the last batch of the history, sent even if the history is empty: what follows, if the request follows, is new. A client can lay out the history as a whole before it shows any of it.

GetHostInfoRequest

GetHostInfoResponse

FieldTypeDescription
versionstring
hostnamestring
hypervisorsrepeated HypervisorInfoThe hypervisors this daemon can start instances with.
listener_addressesrepeated stringThe addresses clients reach the daemon’s TCP listener at. For a listener on all of the host’s addresses, they are the host’s own, with the default route’s first. Loopback, link-local and Dicer’s bridges’ addresses are left out. Empty if the API is not served over TCP.
fingerprintstringThe fingerprint of the daemon’s certificate on its TCP listener: the SHA-256 of its public key, hex-encoded. Empty if it is not served over TCP.
tokenstringThe name of the token this call was made with. Empty over the socket.

GetImageRequest

FieldTypeDescription
refstring

GetInstanceLogsRequest

FieldTypeDescription
namestring
sourceLogSource
tail_linesint32Limits the output to the last lines. Zero means all of it.
followboolKeeps the stream open, sending new output until the instance stops.

GetInstanceRequest

FieldTypeDescription
namestring

GetInstanceStatsRequest

FieldTypeDescription
namesrepeated stringThe instances to report on, by name or ID. Empty means every instance running or paused, as they come and go. A named instance is left out of a batch while it is not running or paused.
followboolKeeps the stream open, sending a batch a second until the client goes away. Otherwise a single batch is sent.

GetInstanceStatsResponse

FieldTypeDescription
read_timegoogle.protobuf.TimestampWhen the batch was read.
instancesrepeated InstanceStatsThe instances, in name order.

GetKernelRequest

FieldTypeDescription
namestring

GetNetworkRequest

FieldTypeDescription
namestring

GetResourcesRequest

GetResourcesResponse

FieldTypeDescription
cpuResourceCapacityvCPUs, counted in vCPUs.
memoryResourceCapacityGuest memory, counted in bytes.
diskDiskUsageThe filesystem holding the data directory. Reported, not enforced.
instancesrepeated InstanceResourcesThe instances that hold CPU and memory – those starting, running or paused – in name order.

GetSnapshotRequest

FieldTypeDescription
namestringThe snapshot’s name or ID.

GetTokenRequest

FieldTypeDescription
namestring

GetVolumeRequest

FieldTypeDescription
namestring

Health

Health is what an instance’s health check has found. If the instance’s restart policy restarts failures, an unhealthy instance is stopped as failed, and the policy restarts it or gives up. Otherwise it is left running.

FieldTypeDescription
statusHealthStatus
failing_streakint32How many probes in a row have failed.
last_check_timegoogle.protobuf.Timestamp
last_outputstringWhat the last probe said. Truncated.
checkHealthCheckThe check being run: the instance’s, or its image’s, with the defaults filled in.

HealthCheck

HealthCheck is how an instance’s health is checked: one probe, run inside the guest by its agent, and when to run it. Unset timings take the defaults: every 10s, a 5s timeout, no start period and 3 retries.

FieldTypeDescription
execHealthCheckExecOne of probe. Healthy when the command exits 0.
httpHealthCheckHTTPOne of probe. Healthy when a GET on the guest’s loopback address answers 2xx or 3xx.
tcpHealthCheckTCPOne of probe. Healthy when a connection to the guest’s loopback address opens.
intervalgoogle.protobuf.DurationThe time between the end of one probe and the start of the next.
timeoutgoogle.protobuf.DurationHow long a probe may take; one that overruns has failed.
start_periodgoogle.protobuf.DurationHow long after a start failures do not count.
retriesint32How many failures in a row make the instance unhealthy.
disabledboolSwitches health checking off, the image’s check included. Nothing else may be set with it.

HealthCheckExec

HealthCheckExec runs a command as the workload’s user.

FieldTypeDescription
commandrepeated string

HealthCheckHTTP

FieldTypeDescription
portuint32
pathstringDefaults to /.

HealthCheckTCP

FieldTypeDescription
portuint32

HostCheckResult

HostCheckResult is the result of one of CheckHost’s checks.

FieldTypeDescription
groupHostCheckGroupWhich part of the checks the result belongs to.
namestringWhat was checked. For the host, it is kvm, ip_forwarding, firewall, tools, uplink or disk. For the test instance, it is the hypervisor’s type for the boot, or internet.
statusHostCheckStatusWhat the check found.
detailstringWhat was found, in one line, for a person to read.
hintstringWhat to do about a problem, where there is something to do. Empty for a check that passed.
consolerepeated stringThe lines of a failed test instance’s console that most likely explain the failure: those leading up to a kernel panic, or else the last few.

HypervisorInfo

HypervisorInfo is a hypervisor the daemon carries, and the versions of it an instance may name.

FieldTypeDescription
typeHypervisorType
versionsrepeated stringThe versions available, the one an instance gets by default first.
is_defaultboolWhether this is the hypervisor an instance gets when it names none.
deprecated_versionsrepeated stringThe versions that are deprecated: every one but the default. Each is kept only for what still uses it, and a later release removes it.

Image

Image is a pulled, converted image. Pulling is synchronous, so an image either exists and is bootable or the pull returned an error; there is no state to report.

FieldTypeDescription
namestring
digeststring
size_bytesint64
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp
health_checkHealthCheckThe HEALTHCHECK the image declares, which instances of it run unless they set their own. Unset if it declares none.
last_used_timegoogle.protobuf.TimestampWhen the image was last pulled or in use: by an instance defined to boot from it, a running guest, a guest on standby or a snapshot. Garbage collection judges it by this.

ImportKernelRequest

FieldTypeDescription
startImportKernelStartOne of payload.
databytesOne of payload. The next chunk of the kernel.

ImportKernelStart

FieldTypeDescription
namestring
archArchitecture
sha256stringThe expected SHA-256 of the kernel, hex-encoded. Verified when set.

Instance

Instance combines an instance’s definition with its observed runtime state. Fields from state onwards are output only and are empty when the instance is not running.

FieldTypeDescription
idstring
namestring
hostnamestring
image_refstring
image_digeststringThe digest of the image image_ref named when the instance was created. The instance always boots this image: pulling image_ref again does not change it.
hypervisor_typeHypervisorTypeThe hypervisor the instance runs on: Cloud Hypervisor if it was created without one.
hypervisor_versionstringA version that hypervisor ships. Empty is its default version, which HypervisorInfo lists first.
kernel_namestring
kernel_argsstring
vcpusint32
memory_bytesint64
max_vcpusint32The most ResizeInstance can give the running instance. Zero leaves it no room to grow. See CreateInstanceRequest.max_vcpus.
max_memory_bytesint64
disk_bytesint64
disk_bytes_per_secondint64Rate limits, of which zero is unlimited. See CreateInstanceRequest.disk_bytes_per_second.
disk_iopsint64
upload_bytes_per_secondint64
download_bytes_per_secondint64
standby_aftergoogle.protobuf.DurationHow long the instance may be idle before it is put on standby; unset is never. See CreateInstanceRequest.standby_after.
network_namestring
static_ipstring
mountsrepeated Mount
envrepeated Instance.EnvEntry
cmdrepeated string
labelsrepeated Instance.LabelsEntry
restart_policyRestartPolicy
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp
stateInstanceState
state_errorstring
hypervisor_pidint64
vsock_cidint64
ipstring
macstring
start_timegoogle.protobuf.Timestamp
portsrepeated PortMapping
exit_codeoptional int32One of _exit_code. The exit code the guest reported when it last ended on its own: its workload’s, or 0 for a guest that powered itself off. Unset if it has not ended since it was last started, or ended without saying how.
finish_timegoogle.protobuf.TimestampWhen the guest last ended on its own.
restart_countint32How many times in a row the restart policy has started the instance again. A start a user asks for resets it.
next_restart_timegoogle.protobuf.TimestampWhen a Restarting instance is due to start again.
health_checkHealthCheckHow the instance’s health is checked, overriding its image’s. Unset means the image’s, if it declares one.
healthHealthWhat the health check of the running instance has found. Unset if it is not running, or has no check.
init_modeInitModeHow the guest starts the command. See CreateInstanceRequest.init_mode.
remove_on_exitboolWhether the instance is deleted once it stops. See CreateInstanceRequest.remove_on_exit.
userstringWho the workload runs as. See CreateInstanceRequest.user.

Instance.EnvEntry

FieldTypeDescription
keystring
valuestring

Instance.LabelsEntry

FieldTypeDescription
keystring
valuestring

InstanceLogChunk

FieldTypeDescription
databytes

InstanceResources

InstanceResources is what one instance holds.

FieldTypeDescription
namestring
stateInstanceState
vcpusint32
memory_bytesint64

InstanceStats

InstanceStats is what an instance’s hypervisor process uses of the host. Its vCPUs and the threads emulating its devices are counted together, and totals are since the process started: each start of the instance begins them again.

FieldTypeDescription
namestring
idstring
cpu_percentdoubleCPU used over the last second, as a percentage of one host CPU: 200 is two CPUs kept busy.
cpu_timegoogle.protobuf.DurationCPU time used in total.
vcpusint32The vCPUs the instance holds.
resident_memory_bytesint64The process’s resident host memory: the guest memory backed so far, and the hypervisor’s own. Memory a guest frees stays resident.
memory_bytesint64The guest memory the instance holds.
disk_read_bytesint64What the process read from and wrote to storage: the instance’s disks, and the hypervisor’s own files, such as the console log and a snapshot’s memory. Reads served from the host’s page cache are not counted; writes are counted as the process makes them, before they reach the disk.
disk_written_bytesint64
network_receive_bytesint64What the guest received and transmitted on its network interface.
network_transmit_bytesint64
network_receive_dropsint64Packets dropped on their way to and from the guest. Receive drops mostly mean the guest does not take packets as fast as they come.
network_transmit_dropsint64
network_receive_errorsint64Packets to and from the guest that failed with an error.
network_transmit_errorsint64
network_receive_packetsint64Packets the guest received and transmitted.
network_transmit_packetsint64

IssuedToken

IssuedToken is a token with its value, as it is made or rotated.

FieldTypeDescription
tokenToken
valuestringWhat a client connects with: “dicer_” and the secret. Unless server.crt_file gives the daemon’s certificate, an underscore and the daemon’s fingerprint follow, which the client checks the daemon by.

Kernel

Kernel is a guest kernel image available to instances.

FieldTypeDescription
idstring
namestring
archArchitecture
sha256stringThe SHA-256 of the kernel on the host, hex-encoded. It is checked each time an instance boots the kernel.
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp

ListImagesRequest

ListImagesResponse

FieldTypeDescription
imagesrepeated Image

ListInstanceProcessesRequest

FieldTypeDescription
namestring

ListInstanceProcessesResponse

FieldTypeDescription
processesrepeated ProcessThe processes, in PID order.

ListInstancesRequest

ListInstancesResponse

FieldTypeDescription
instancesrepeated Instance

ListKernelsRequest

ListKernelsResponse

FieldTypeDescription
kernelsrepeated Kernel

ListNetworkAllocationsRequest

FieldTypeDescription
namestring

ListNetworkAllocationsResponse

FieldTypeDescription
allocationsrepeated NetworkAllocation

ListNetworksRequest

ListNetworksResponse

FieldTypeDescription
networksrepeated Network

ListSnapshotsRequest

FieldTypeDescription
instancestringLists only the snapshots taken of this instance, if set.

ListSnapshotsResponse

FieldTypeDescription
snapshotsrepeated Snapshot

ListTokensRequest

ListTokensResponse

FieldTypeDescription
tokensrepeated Token

ListVolumesRequest

ListVolumesResponse

FieldTypeDescription
volumesrepeated Volume

Mount

Mount attaches a volume, a file, a host directory or a tmpfs at target in the guest.

FieldTypeDescription
typeMountType
sourcestringThe volume’s name for a volume. For a directory, the host directory’s absolute path, which must be one the daemon’s mounts.allowed_directories lists, or under one. A file and a tmpfs have none.
targetstringThe absolute path the mount appears at in the guest.
read_onlyboolA volume every instance attaching it mounts read-only can be shared.
contentbytesA file’s contents. The daemon keeps them with the instance and puts a copy on the guest’s config disk at each start. An instance’s file mounts can hold at most 1 MiB between them.
modeuint32A file’s permission bits in the guest, such as 0600, where root owns it. Zero is 0644.

Network

Network is a host-local bridge with NAT to the uplink.

FieldTypeDescription
idstring
namestring
subnetstring
gatewaystring
bridgestring
mtuint32
nameserversrepeated string
isolatedboolStops instances on the network reaching each other; each can still reach the gateway and, through NAT, the outside.
total_ipsint64
free_ipsint64
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp
internalboolStops instances on the network reaching anything beyond it: the outside, other networks, the host’s services and upstream nameservers. They can still be reached through published ports. The gateway still answers their DNS queries about the network’s own instances.

NetworkAllocation

NetworkAllocation is an address assigned to an instance.

FieldTypeDescription
instance_idstring
instance_namestring
ipstring
macstring
tap_devicestring

PauseInstanceRequest

FieldTypeDescription
namestring

PortMapping

PortMapping publishes a guest port on the host, so the guest can be reached from outside it. It is applied each time the instance starts. Traffic to the host’s loopback addresses is not forwarded.

FieldTypeDescription
host_ipstringThe host address to publish on. Empty means every address the host has.
host_portuint32
guest_portuint32
protocolProtocol

Process

Process is a process running in an instance’s guest.

FieldTypeDescription
pidint32
ppidint32
userstringThe user the process runs as, by name, or by UID if the guest has no name for it.
statestringThe state code: R running, S sleeping, D waiting on I/O, Z zombie, T stopped, and so on.
namestringThe command’s name, which the kernel keeps even when the command line is gone, as it is for a zombie.
commandrepeated stringThe command line. Empty for a zombie.
start_timegoogle.protobuf.TimestampWhen the process started, by the guest’s clock.
cpu_timegoogle.protobuf.DurationCPU time used in total, in user and kernel mode.
resident_memory_bytesint64The guest memory the process has resident.

PruneImagesRequest

PruneImagesResponse

FieldTypeDescription
imagesrepeated ImageThe images that were removed.
reclaimed_bytesint64The disk space their disks and cached layers gave back.

PullImageProgress

FieldTypeDescription
stagePullStage
downloaded_bytesint64Compressed layer bytes fetched and expected. Both are zero outside the downloading stage, and the total counts only what is actually fetched: a layer already held is not downloaded again.
total_bytesint64
imageImageSet on the final message only, when the image is ready to boot.

PullImageRequest

FieldTypeDescription
refstring

RenameInstanceRequest

FieldTypeDescription
namestring
new_namestringThe name to give it, which no other instance may have.

ResizeInstanceRequest

ResizeInstanceRequest gives a running instance the vCPUs and memory that are set, leaving the other as it is. At least one must be.

FieldTypeDescription
namestring
vcpusoptional int32One of _vcpus.
memory_bytesoptional int64One of _memory_bytes.

ResourceCapacity

ResourceCapacity is how much of one resource instances may be given, and how much they hold. A start that would take allocated past allocatable is refused.

FieldTypeDescription
hostint64What the host has: its logical CPUs, or its memory.
reservedint64What is kept back from instances for the host itself.
overcommitdoubleHow far what remains is stretched: 4 lets four vCPUs share each CPU.
allocatableint64What instances may be given in total: (host - reserved) * overcommit.
allocatedint64What instances hold.
availableint64What is left for further instances: allocatable - allocated, or 0.

RestartPolicy

RestartPolicy is what the daemon does when an instance ends without being asked to: when its workload exits, its guest resets or its hypervisor dies. Restarts back off exponentially, from a second up to five minutes; an instance that stays up for ten minutes starts the count again.

FieldTypeDescription
modeRestartMode
max_retriesint32For on-failure, how many restarts in a row are made before the instance is left Failed. 0 means no limit.

RestoreSnapshotRequest

FieldTypeDescription
namestringThe snapshot’s name or ID.

ResumeInstanceRequest

FieldTypeDescription
namestring

RotateTokenRequest

FieldTypeDescription
namestring
secretstringThe token’s new secret, as CreateTokenRequest.secret says.

Snapshot

Snapshot is an instance frozen to disk. It outlives the instance it was taken from, and never holds the instance’s volumes.

FieldTypeDescription
idstring
namestring
kindSnapshotKind
instance_idstringThe instance it was taken from: its ID, and its name now, or, if it has been deleted, its name then.
instance_namestring
hypervisor_typeHypervisorTypeThe hypervisor that took a memory snapshot, and the version of it. Restoring needs the same version, since snapshot formats are specific to it. Unset for a disk snapshot.
hypervisor_versionstring
vcpusint32The vCPUs and memory a memory snapshot’s guest had. Unset for a disk snapshot.
memory_bytesint64
size_bytesint64What the snapshot occupies on disk, which on a copy-on-write filesystem may be far less than the guest’s memory and disk together.
create_timegoogle.protobuf.Timestamp

StandbyInstanceRequest

FieldTypeDescription
namestring

StartInstanceRequest

FieldTypeDescription
namestring

StopInstanceRequest

FieldTypeDescription
namestring

Token

Token is a credential a client presents to the daemon’s TCP listener.

FieldTypeDescription
idstring
namestring
scopesrepeated stringWhat the token allows: “*” for everything, or RESOURCE:ACTION, such as “instances:write”. RESOURCE is instances, snapshots, networks, volumes, images, kernels, tokens or events, and ACTION is read or write. Events have only read. A read scope allows the calls that look at its resource. A write scope also allows those that change it. A call its token’s scopes do not allow fails with PERMISSION_DENIED. A token may make, rotate and delete only tokens whose scopes its own allow.
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp
last_use_timegoogle.protobuf.TimestampWhen the token last made a call, to the minute. Unset if it never has.

UpdateInstanceRequest

UpdateInstanceRequest changes the fields that are set: an optional field that is present, an enum that is not unspecified, a message that is present, and a repeated or map field that is not empty, which replaces the existing value whole.

FieldTypeDescription
namestring
hypervisor_typeHypervisorType
hypervisor_versionoptional stringOne of _hypervisor_version.
kernel_nameoptional stringOne of _kernel_name.
kernel_argsoptional stringOne of _kernel_args.
vcpusoptional int32One of _vcpus.
memory_bytesoptional int64One of _memory_bytes.
max_vcpusoptional int32One of _max_vcpus. Zero removes the maximum.
max_memory_bytesoptional int64One of _max_memory_bytes.
disk_bytesoptional int64One of _disk_bytes. The overlay disk grows to it at the instance’s next start. It cannot shrink, so a size smaller than the overlay disk is refused.
disk_bytes_per_secondoptional int64One of _disk_bytes_per_second. Zero removes the limit.
disk_iopsoptional int64One of _disk_iops.
upload_bytes_per_secondoptional int64One of _upload_bytes_per_second.
download_bytes_per_secondoptional int64One of _download_bytes_per_second.
standby_aftergoogle.protobuf.DurationZero is never.
network_nameoptional stringOne of _network_name.
static_ipoptional stringOne of _static_ip.
hostnameoptional stringOne of _hostname.
restart_policyRestartPolicy
health_checkHealthCheck
init_modeInitMode
remove_on_exitoptional boolOne of _remove_on_exit.
mountsrepeated Mount
envrepeated UpdateInstanceRequest.EnvEntry
cmdrepeated string
labelsrepeated UpdateInstanceRequest.LabelsEntry
portsrepeated PortMapping
useroptional stringOne of _user. Empty means the image’s USER again.

UpdateInstanceRequest.EnvEntry

FieldTypeDescription
keystring
valuestring

UpdateInstanceRequest.LabelsEntry

FieldTypeDescription
keystring
valuestring

Volume

Volume is a persistent block device that outlives the instances using it.

FieldTypeDescription
idstring
namestring
size_bytesint64
create_timegoogle.protobuf.Timestamp
update_timegoogle.protobuf.Timestamp

WaitInstanceRequest

FieldTypeDescription
namestring
idstringIf set, the instance with this ID: one given the name later is not waited for.
next_stopboolWait for the instance’s next stop, even if it is stopped now: for a caller about to start it. Otherwise a stopped instance is not waited for.
conditionWaitConditionWhat to wait for. Unspecified means a stop.

WaitInstanceResponse

FieldTypeDescription
stateInstanceStateSTOPPED or FAILED, or RUNNING after a wait for WAIT_CONDITION_HEALTHY.
state_errorstringWhy it failed.
exit_codeoptional int32One of _exit_code. The exit code the guest reported: its workload’s, or 0 for a guest that powered itself off. Unset if it ended without saying how, or was stopped.

Enums

Architecture

Architecture is the CPU architecture a kernel is built for.

ValueNumberDescription
ARCHITECTURE_UNSPECIFIED0
ARCHITECTURE_X86_641
ARCHITECTURE_AARCH642

EventAction

EventAction is what happened to the resource.

ValueNumberDescription
EVENT_ACTION_UNSPECIFIED0
EVENT_ACTION_CREATED1Any kind of resource.
EVENT_ACTION_UPDATED2
EVENT_ACTION_DELETED3
EVENT_ACTION_STARTED4An instance.
EVENT_ACTION_STOPPED5
EVENT_ACTION_PAUSED6
EVENT_ACTION_RESUMED7
EVENT_ACTION_EXITED8The guest ended cleanly, of its own accord.
EVENT_ACTION_DIED9The guest ended in failure.
EVENT_ACTION_RESTARTING10The restart policy will start the instance again.
EVENT_ACTION_RENAMED11
EVENT_ACTION_HEALTHY12The health check reached a verdict.
EVENT_ACTION_UNHEALTHY13
EVENT_ACTION_SNAPSHOT_RESTORED15The instance was put back as a snapshot of it holds it.
EVENT_ACTION_PULLED17An image.
EVENT_ACTION_COLLECTED18Garbage collection removed the image.
EVENT_ACTION_IMPORTED19A kernel, put on the host.
EVENT_ACTION_RESIZED21A running instance was given other vCPUs or memory.
EVENT_ACTION_STANDBY22The instance was frozen to disk, and its hypervisor ended.

EventKind

EventKind is the kind of resource an event is about.

ValueNumberDescription
EVENT_KIND_UNSPECIFIED0
EVENT_KIND_INSTANCE1
EVENT_KIND_IMAGE2
EVENT_KIND_NETWORK3
EVENT_KIND_VOLUME4
EVENT_KIND_KERNEL5
EVENT_KIND_SNAPSHOT6

HealthStatus

HealthStatus is what an instance’s health check has found.

ValueNumberDescription
HEALTH_STATUS_UNSPECIFIED0
HEALTH_STATUS_STARTING1No verdict yet: the workload is in its start period, or has not been probed.
HEALTH_STATUS_HEALTHY2The last probe passed.
HEALTH_STATUS_UNHEALTHY3The check’s retries have failed in a row.

HostCheckGroup

HostCheckGroup says which part of CheckHost’s checks a result belongs to.

ValueNumberDescription
HOST_CHECK_GROUP_UNSPECIFIED0
HOST_CHECK_GROUP_HOST1The checks of the host itself.
HOST_CHECK_GROUP_INSTANCES2The test instance’s boot, and whether it reached the internet.

HostCheckStatus

HostCheckStatus is what a check found.

ValueNumberDescription
HOST_CHECK_STATUS_UNSPECIFIED0
HOST_CHECK_STATUS_OK1All is well.
HOST_CHECK_STATUS_WARNING2Something may cause trouble later, such as little free disk space, but instances can still run.
HOST_CHECK_STATUS_FAILED3Something stops instances from booting or from being reached, and must be fixed.

HypervisorType

HypervisorType is the virtual machine monitor an instance runs on.

ValueNumberDescription
HYPERVISOR_TYPE_UNSPECIFIED0
HYPERVISOR_TYPE_CLOUD_HYPERVISOR1Cloud Hypervisor, the default.
HYPERVISOR_TYPE_FIRECRACKER2

InitMode

InitMode is how the guest starts an instance’s command.

ValueNumberDescription
INIT_MODE_UNSPECIFIED0
INIT_MODE_AUTO1Systemd if the command resolves to the systemd binary in the image, exec otherwise. The default.
INIT_MODE_EXEC2The command runs as PID 1 of its own PID namespace, as a container runs it.
INIT_MODE_SYSTEMD3The command, systemd, is the machine’s PID 1.

InstanceState

InstanceState is where an instance is in its lifecycle.

ValueNumberDescription
INSTANCE_STATE_UNSPECIFIED0
INSTANCE_STATE_STOPPED1Defined but not running. A new instance starts here.
INSTANCE_STATE_STARTING2A start is in progress.
INSTANCE_STATE_RUNNING3The guest is running.
INSTANCE_STATE_PAUSED4The guest’s vCPUs are halted, and it is kept resident.
INSTANCE_STATE_STOPPING5A stop is in progress.
INSTANCE_STATE_RESTARTING6The instance ended without being asked to, and its restart policy will start it again at next_restart_time. It holds nothing meanwhile.
INSTANCE_STATE_FAILED7The last operation failed; state_error says why.
INSTANCE_STATE_STANDBY8The guest is frozen to disk and its hypervisor has ended, so it holds no CPU or memory. Starting it resumes it where it was.

LogSource

LogSource is one of the logs an instance produces.

ValueNumberDescription
LOG_SOURCE_UNSPECIFIED0Defaults to the guest’s console.
LOG_SOURCE_GUEST1The guest’s console log: the kernel’s boot messages, dicer-init’s, and whatever the workload writes to the console.
LOG_SOURCE_HYPERVISOR2The hypervisor’s own log, which explains a guest that crashed or never booted. Like the console log, it is kept with the instance, across stops and restarts, until the instance is deleted.

MountType

MountType is what a Mount attaches.

ValueNumberDescription
MOUNT_TYPE_UNSPECIFIED0
MOUNT_TYPE_VOLUME1A named volume: persistent storage, as a disk of its own.
MOUNT_TYPE_FILE2A file whose contents the client gives, written into the guest at each start.
MOUNT_TYPE_TMPFS3An empty in-memory filesystem, lost when the guest stops.
MOUNT_TYPE_DIRECTORY4A host directory, shared with the guest while it runs: a change on either side is seen on the other. Cloud Hypervisor only, and only under a directory the daemon’s mounts.allowed_directories lists. An instance with one is snapshotted only while stopped, and is never on standby.

Protocol

Protocol is the transport a port mapping forwards.

ValueNumberDescription
PROTOCOL_UNSPECIFIED0Means TCP.
PROTOCOL_TCP1
PROTOCOL_UDP2

PullPolicy

PullPolicy is when creating an instance pulls its image, as docker run –pull says.

ValueNumberDescription
PULL_POLICY_UNSPECIFIED0Means missing.
PULL_POLICY_MISSING1Pull the image only if the host does not hold it.
PULL_POLICY_ALWAYS2Pull the image even if the host holds it, so that a tag that has moved is followed. Nothing is downloaded if the host already has what the tag points at.
PULL_POLICY_NEVER3Use the image the host holds, and fail with NOT_FOUND if it holds none. Creating the instance then asks no registry anything, so it takes as long as defining it, and booting it if start is set.

PullStage

PullStage is the part of a pull that is currently working.

ValueNumberDescription
PULL_STAGE_UNSPECIFIED0
PULL_STAGE_RESOLVING1Asking the registry what the reference points at.
PULL_STAGE_DOWNLOADING2Fetching the layers, the only stage with a byte count.
PULL_STAGE_UNPACKING3Writing those layers out as a root filesystem.
PULL_STAGE_CONVERTING4Packing that filesystem into the disk a guest boots from.

RestartMode

RestartMode is when an instance that ended without being asked to is started again.

ValueNumberDescription
RESTART_MODE_UNSPECIFIED0
RESTART_MODE_NO1Leave the instance as it ended. The default.
RESTART_MODE_ON_FAILURE2Restart it unless it ended cleanly, by its workload exiting 0 or its guest powering off.
RESTART_MODE_UNLESS_STOPPED3Restart it however it ended, and start it when the daemon starts, unless a user stopped it.
RESTART_MODE_ALWAYS4Restart it however it ended, and start it when the daemon starts, even if a user stopped it.

SnapshotKind

SnapshotKind is what a snapshot holds.

ValueNumberDescription
SNAPSHOT_KIND_UNSPECIFIED0
SNAPSHOT_KIND_MEMORY1A running or paused guest’s memory and device state, with its overlay disk as it was at the same moment. Restoring it resumes the guest.
SNAPSHOT_KIND_DISK2A stopped instance’s overlay disk alone. Restoring it rolls the disk back, and the guest boots from it afresh.

WaitCondition

WaitCondition is what WaitInstance waits for.

ValueNumberDescription
WAIT_CONDITION_UNSPECIFIED0
WAIT_CONDITION_STOPPED1The instance stopping. The default.
WAIT_CONDITION_HEALTHY2The running instance’s health check passing. The wait ends at once if the check has passed already. It goes on while the instance is unhealthy, because a later probe or a restart can make it healthy. It fails with FAILED_PRECONDITION if the instance has no health check, is not running, or stops first.