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.
| Method | Request | Response | Description |
|---|---|---|---|
CreateInstance | CreateInstanceRequest | Instance | CreateInstance 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. |
UpdateInstance | UpdateInstanceRequest | Instance | UpdateInstance modifies the definition of a stopped or failed instance. Its image cannot be changed: an instance always boots the image it was created with. |
RenameInstance | RenameInstanceRequest | Instance | RenameInstance changes a stopped instance’s name. The instance keeps its ID, its disks and its address; only what people call it changes. |
StartInstance | StartInstanceRequest | Instance | StartInstance 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. |
StopInstance | StopInstanceRequest | Instance | StopInstance shuts a running instance down, keeping its definition, overlay disk and address. |
PauseInstance | PauseInstanceRequest | Instance | PauseInstance halts a running instance’s vCPUs, keeping it resident. |
ResumeInstance | ResumeInstanceRequest | Instance | ResumeInstance continues a paused instance. |
StandbyInstance | StandbyInstanceRequest | Instance | StandbyInstance 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. |
ForkInstance | ForkInstanceRequest | Instance | ForkInstance 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. |
ResizeInstance | ResizeInstanceRequest | Instance | ResizeInstance 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. |
DeleteInstance | DeleteInstanceRequest | google.protobuf.Empty | DeleteInstance removes an instance and its overlay disk. It refuses a running instance unless force is set. |
ListInstances | ListInstancesRequest | ListInstancesResponse | ListInstances returns every defined instance. |
GetInstance | GetInstanceRequest | Instance | GetInstance returns one instance. |
WaitInstance | WaitInstanceRequest | stream WaitInstanceResponse | WaitInstance 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. |
GetInstanceLogs | GetInstanceLogsRequest | stream InstanceLogChunk | GetInstanceLogs 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. |
GetInstanceStats | GetInstanceStatsRequest | stream GetInstanceStatsResponse | GetInstanceStats 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. |
ListInstanceProcesses | ListInstanceProcessesRequest | ListInstanceProcessesResponse | ListInstanceProcesses 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. |
CreateSnapshot | CreateSnapshotRequest | Snapshot | CreateSnapshot 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. |
ListSnapshots | ListSnapshotsRequest | ListSnapshotsResponse | ListSnapshots returns the snapshots, or one instance’s, oldest first. |
GetSnapshot | GetSnapshotRequest | Snapshot | GetSnapshot returns one snapshot. |
DeleteSnapshot | DeleteSnapshotRequest | google.protobuf.Empty | DeleteSnapshot removes a snapshot. |
RestoreSnapshot | RestoreSnapshotRequest | Instance | RestoreSnapshot 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. |
ForkSnapshot | ForkSnapshotRequest | Instance | ForkSnapshot 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. |
ExecInstance | stream ExecInstanceRequest | stream ExecInstanceResponse | ExecInstance 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. |
CopyToInstance | stream CopyToInstanceRequest | google.protobuf.Empty | CopyToInstance 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. |
CopyFromInstance | CopyFromInstanceRequest | stream CopyFromInstanceResponse | CopyFromInstance 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. |
CreateNetwork | CreateNetworkRequest | Network | CreateNetwork 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. |
ListNetworks | ListNetworksRequest | ListNetworksResponse | ListNetworks returns every network. |
GetNetwork | GetNetworkRequest | Network | GetNetwork returns one network. |
DeleteNetwork | DeleteNetworkRequest | google.protobuf.Empty | DeleteNetwork removes a network that no instance or snapshot references, with its bridge. The default network cannot be deleted. |
ListNetworkAllocations | ListNetworkAllocationsRequest | ListNetworkAllocationsResponse | ListNetworkAllocations reports which addresses are assigned on a network. Allocation itself is a side effect of starting an instance and has no separate RPC. |
CreateVolume | CreateVolumeRequest | Volume | CreateVolume provisions a persistent block volume. |
ListVolumes | ListVolumesRequest | ListVolumesResponse | ListVolumes returns every volume. |
GetVolume | GetVolumeRequest | Volume | GetVolume returns one volume. |
DeleteVolume | DeleteVolumeRequest | google.protobuf.Empty | DeleteVolume removes a volume that no instance or snapshot references. |
PullImage | PullImageRequest | stream PullImageProgress | PullImage 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. |
ListImages | ListImagesRequest | ListImagesResponse | ListImages returns every pulled image. |
GetImage | GetImageRequest | Image | GetImage returns one pulled image. |
DeleteImage | DeleteImageRequest | google.protobuf.Empty | DeleteImage removes a pulled image. It refuses an image an instance is defined to boot from, unless force is set. |
PruneImages | PruneImagesRequest | PruneImagesResponse | PruneImages removes every image no instance is defined to boot from. |
ImportKernel | stream ImportKernelRequest | Kernel | ImportKernel 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. |
ListKernels | ListKernelsRequest | ListKernelsResponse | ListKernels returns every kernel, the default one among them. |
GetKernel | GetKernelRequest | Kernel | GetKernel returns one kernel. |
DeleteKernel | DeleteKernelRequest | google.protobuf.Empty | DeleteKernel removes a kernel that no instance or snapshot references. The default kernel cannot be deleted. |
CreateToken | CreateTokenRequest | IssuedToken | CreateToken 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. |
ListTokens | ListTokensRequest | ListTokensResponse | ListTokens returns every token, without their values. |
GetToken | GetTokenRequest | Token | GetToken returns one token, without its value. |
RotateToken | RotateTokenRequest | IssuedToken | RotateToken gives a token a new secret and returns its new value, as CreateToken does. The old value stops working at once. |
DeleteToken | DeleteTokenRequest | google.protobuf.Empty | DeleteToken removes a token. A client using it is refused from its next call. |
GetHostInfo | GetHostInfoRequest | GetHostInfoResponse | GetHostInfo reports what the daemon is: its version, the hypervisors it carries, and how it is reached. |
GetResources | GetResourcesRequest | GetResourcesResponse | GetResources reports how much CPU and memory instances may be given, how much they hold, and how full the data directory’s disk is. |
CheckHost | CheckHostRequest | stream HostCheckResult | CheckHost 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. |
GetEvents | GetEventsRequest | stream GetEventsResponse | GetEvents 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
| Field | Type | Description |
|---|---|---|
test_instance | bool | Boot 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_image | string | The 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_hypervisor | HypervisorType | The hypervisor to boot the test instance on. If unset, Cloud Hypervisor is used. |
test_instance_hypervisor_version | string | The version of the hypervisor to boot the test instance on. If empty, the hypervisor’s default version is used. |
test_instance_timeout | google.protobuf.Duration | How long the test instance may take to run its command. If unset, it may take 2 minutes. |
keep_failed_test_instance | bool | Keep a failed test instance for inspection, instead of deleting it. |
CopyFromInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string | The instance to copy from. |
path | string | The file or directory to read. A relative path is taken from the guest’s root directory. |
CopyFromInstanceResponse
| Field | Type | Description |
|---|---|---|
data | bytes | The next chunk of the tar archive. |
CopyToInstanceRequest
| Field | Type | Description |
|---|---|---|
start | CopyToInstanceStart | One of payload. |
data | bytes | One of payload. The next chunk of the tar archive. |
CopyToInstanceStart
CopyToInstanceStart is the first message on a CopyToInstance stream.
| Field | Type | Description |
|---|---|---|
name | string | The instance to copy into. |
path | string | Where 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
| Field | Type | Description |
|---|---|---|
name | string | The instance’s name. When it is empty, the daemon makes one from the image’s name, such as nginx-k3x9. |
image_ref | string | The 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_type | HypervisorType | Unspecified means Cloud Hypervisor. |
hypervisor_version | string | A version that hypervisor ships. Empty is its default version, which HypervisorInfo lists first. |
kernel_name | string | Empty means the default kernel, “default”. |
kernel_args | string | |
vcpus | int32 | |
memory_bytes | int64 | |
max_vcpus | int32 | The 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_bytes | int64 | |
disk_bytes | int64 | |
disk_bytes_per_second | int64 | The 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_iops | int64 | |
upload_bytes_per_second | int64 | The bytes per second the guest sends and receives on its network. |
download_bytes_per_second | int64 | |
network_name | string | Empty means the default network, “default”. |
static_ip | string | |
mounts | repeated Mount | |
env | repeated CreateInstanceRequest.EnvEntry | |
cmd | repeated string | |
labels | repeated CreateInstanceRequest.LabelsEntry | |
hostname | string | |
restart_policy | RestartPolicy | |
health_check | HealthCheck | |
init_mode | InitMode | How the guest starts the command. Unspecified means auto. |
user | string | Who 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_policy | PullPolicy | When the image is pulled; see PullPolicy. |
start | bool | Boots the instance immediately after defining it. The call then returns when StartInstance would. |
ports | repeated PortMapping | |
remove_on_exit | bool | Deletes 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_after | google.protobuf.Duration | How 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
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
CreateInstanceRequest.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
CreateNetworkRequest
| Field | Type | Description |
|---|---|---|
name | string | |
subnet | string | |
gateway | string | |
mtu | int32 | |
nameservers | repeated string | |
isolated | bool | |
internal | bool | See Network.internal. An internal network takes no nameservers. |
CreateSnapshotRequest
| Field | Type | Description |
|---|---|---|
instance | string | The instance to snapshot. |
name | string | The snapshot’s name. The instance’s and the time’s when empty, as in web-20260102t150405z. |
CreateTokenRequest
| Field | Type | Description |
|---|---|---|
name | string | |
scopes | repeated string | What the token allows, as Token.scopes says. Unset is “*”. |
secret | string | The 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
| Field | Type | Description |
|---|---|---|
name | string | |
size_bytes | int64 |
DeleteImageRequest
| Field | Type | Description |
|---|---|---|
ref | string | |
force | bool | Removes the image even if an instance is defined to boot from it. That instance will pull it again on its next start. |
DeleteInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string | |
force | bool | Stops a running instance before deleting it. |
DeleteKernelRequest
| Field | Type | Description |
|---|---|---|
name | string |
DeleteNetworkRequest
| Field | Type | Description |
|---|---|---|
name | string |
DeleteSnapshotRequest
| Field | Type | Description |
|---|---|---|
name | string | The snapshot’s name or ID. |
DeleteTokenRequest
| Field | Type | Description |
|---|---|---|
name | string |
DeleteVolumeRequest
| Field | Type | Description |
|---|---|---|
name | string |
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.
| Field | Type | Description |
|---|---|---|
path | string | The data directory. |
total_bytes | int64 | |
free_bytes | int64 | What can still be written. |
provisioned_bytes | int64 | The 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.
| Field | Type | Description |
|---|---|---|
time | google.protobuf.Timestamp | |
kind | EventKind | |
id | string | The 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. |
name | string | |
action | EventAction | |
message | string | What happened, in a line, for a person. |
attributes | repeated Event.AttributesEntry | What happened, for a program: exit_code, restart_count, digest. |
Event.AttributesEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
ExecInstanceRequest
| Field | Type | Description |
|---|---|---|
start | ExecInstanceStart | One of payload. |
stdin | bytes | One of payload. |
resize | ExecInstanceResize | One of payload. |
ExecInstanceResize
ExecInstanceResize resizes the remote terminal window.
| Field | Type | Description |
|---|---|---|
rows | uint32 | |
cols | uint32 |
ExecInstanceResponse
| Field | Type | Description |
|---|---|---|
stdout | bytes | One of payload. |
stderr | bytes | One of payload. |
exit_code | int32 | One of payload. The command’s exit status. Always the last message on the stream. |
ExecInstanceStart
ExecInstanceStart is the first message on an ExecInstance stream.
| Field | Type | Description |
|---|---|---|
name | string | The instance to run the command in. |
command | repeated string | The command and its arguments. Defaults to /bin/sh. |
tty | bool | Whether to allocate a pseudo-terminal. |
cwd | string | The working directory inside the guest. |
timeout_seconds | int32 | Kills the command after this many seconds. Zero means no limit. |
rows | uint32 | The initial terminal size, when tty is set. |
cols | uint32 | |
env | repeated ExecInstanceStart.EnvEntry | Environment variables added to the command’s environment. |
user | string | The 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
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
ForkInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string | The instance to fork. |
fork_name | string | The 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_name | string | The network the new instance joins, and its address on it. The instance’s network, and an address it assigns, when empty. |
static_ip | string | |
ports | repeated PortMapping | The host ports the new instance publishes. The instance’s are not copied: two instances cannot publish the same host port. |
ForkSnapshotRequest
| Field | Type | Description |
|---|---|---|
name | string | The snapshot’s name or ID. |
fork_name | string | The 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_name | string | The network the new instance joins, and its address on it. The snapshot’s network, and an address it assigns, when empty. |
static_ip | string | |
ports | repeated PortMapping | The 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.
| Field | Type | Description |
|---|---|---|
kind | EventKind | Unspecified picks every kind. |
id | string | |
name | string | The resource’s name. An image’s may be given as it is pulled: busybox:latest picks the events about docker.io/library/busybox:latest. |
since | google.protobuf.Timestamp | Only events at or after this time. |
limit | int32 | Only the last this many events of the history. Zero means all of it. |
follow | bool | Keep streaming new events after the history. |
GetEventsResponse
GetEventsResponse is a batch of events, oldest first.
| Field | Type | Description |
|---|---|---|
events | repeated Event | |
caught_up | bool | Set 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
| Field | Type | Description |
|---|---|---|
version | string | |
hostname | string | |
hypervisors | repeated HypervisorInfo | The hypervisors this daemon can start instances with. |
listener_addresses | repeated string | The 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. |
fingerprint | string | The 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. |
token | string | The name of the token this call was made with. Empty over the socket. |
GetImageRequest
| Field | Type | Description |
|---|---|---|
ref | string |
GetInstanceLogsRequest
| Field | Type | Description |
|---|---|---|
name | string | |
source | LogSource | |
tail_lines | int32 | Limits the output to the last lines. Zero means all of it. |
follow | bool | Keeps the stream open, sending new output until the instance stops. |
GetInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
GetInstanceStatsRequest
| Field | Type | Description |
|---|---|---|
names | repeated string | The 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. |
follow | bool | Keeps the stream open, sending a batch a second until the client goes away. Otherwise a single batch is sent. |
GetInstanceStatsResponse
| Field | Type | Description |
|---|---|---|
read_time | google.protobuf.Timestamp | When the batch was read. |
instances | repeated InstanceStats | The instances, in name order. |
GetKernelRequest
| Field | Type | Description |
|---|---|---|
name | string |
GetNetworkRequest
| Field | Type | Description |
|---|---|---|
name | string |
GetResourcesRequest
GetResourcesResponse
| Field | Type | Description |
|---|---|---|
cpu | ResourceCapacity | vCPUs, counted in vCPUs. |
memory | ResourceCapacity | Guest memory, counted in bytes. |
disk | DiskUsage | The filesystem holding the data directory. Reported, not enforced. |
instances | repeated InstanceResources | The instances that hold CPU and memory – those starting, running or paused – in name order. |
GetSnapshotRequest
| Field | Type | Description |
|---|---|---|
name | string | The snapshot’s name or ID. |
GetTokenRequest
| Field | Type | Description |
|---|---|---|
name | string |
GetVolumeRequest
| Field | Type | Description |
|---|---|---|
name | string |
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.
| Field | Type | Description |
|---|---|---|
status | HealthStatus | |
failing_streak | int32 | How many probes in a row have failed. |
last_check_time | google.protobuf.Timestamp | |
last_output | string | What the last probe said. Truncated. |
check | HealthCheck | The 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.
| Field | Type | Description |
|---|---|---|
exec | HealthCheckExec | One of probe. Healthy when the command exits 0. |
http | HealthCheckHTTP | One of probe. Healthy when a GET on the guest’s loopback address answers 2xx or 3xx. |
tcp | HealthCheckTCP | One of probe. Healthy when a connection to the guest’s loopback address opens. |
interval | google.protobuf.Duration | The time between the end of one probe and the start of the next. |
timeout | google.protobuf.Duration | How long a probe may take; one that overruns has failed. |
start_period | google.protobuf.Duration | How long after a start failures do not count. |
retries | int32 | How many failures in a row make the instance unhealthy. |
disabled | bool | Switches 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.
| Field | Type | Description |
|---|---|---|
command | repeated string |
HealthCheckHTTP
| Field | Type | Description |
|---|---|---|
port | uint32 | |
path | string | Defaults to /. |
HealthCheckTCP
| Field | Type | Description |
|---|---|---|
port | uint32 |
HostCheckResult
HostCheckResult is the result of one of CheckHost’s checks.
| Field | Type | Description |
|---|---|---|
group | HostCheckGroup | Which part of the checks the result belongs to. |
name | string | What 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. |
status | HostCheckStatus | What the check found. |
detail | string | What was found, in one line, for a person to read. |
hint | string | What to do about a problem, where there is something to do. Empty for a check that passed. |
console | repeated string | The 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.
| Field | Type | Description |
|---|---|---|
type | HypervisorType | |
versions | repeated string | The versions available, the one an instance gets by default first. |
is_default | bool | Whether this is the hypervisor an instance gets when it names none. |
deprecated_versions | repeated string | The 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.
| Field | Type | Description |
|---|---|---|
name | string | |
digest | string | |
size_bytes | int64 | |
create_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp | |
health_check | HealthCheck | The HEALTHCHECK the image declares, which instances of it run unless they set their own. Unset if it declares none. |
last_used_time | google.protobuf.Timestamp | When 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
| Field | Type | Description |
|---|---|---|
start | ImportKernelStart | One of payload. |
data | bytes | One of payload. The next chunk of the kernel. |
ImportKernelStart
| Field | Type | Description |
|---|---|---|
name | string | |
arch | Architecture | |
sha256 | string | The 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.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
hostname | string | |
image_ref | string | |
image_digest | string | The 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_type | HypervisorType | The hypervisor the instance runs on: Cloud Hypervisor if it was created without one. |
hypervisor_version | string | A version that hypervisor ships. Empty is its default version, which HypervisorInfo lists first. |
kernel_name | string | |
kernel_args | string | |
vcpus | int32 | |
memory_bytes | int64 | |
max_vcpus | int32 | The most ResizeInstance can give the running instance. Zero leaves it no room to grow. See CreateInstanceRequest.max_vcpus. |
max_memory_bytes | int64 | |
disk_bytes | int64 | |
disk_bytes_per_second | int64 | Rate limits, of which zero is unlimited. See CreateInstanceRequest.disk_bytes_per_second. |
disk_iops | int64 | |
upload_bytes_per_second | int64 | |
download_bytes_per_second | int64 | |
standby_after | google.protobuf.Duration | How long the instance may be idle before it is put on standby; unset is never. See CreateInstanceRequest.standby_after. |
network_name | string | |
static_ip | string | |
mounts | repeated Mount | |
env | repeated Instance.EnvEntry | |
cmd | repeated string | |
labels | repeated Instance.LabelsEntry | |
restart_policy | RestartPolicy | |
create_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp | |
state | InstanceState | |
state_error | string | |
hypervisor_pid | int64 | |
vsock_cid | int64 | |
ip | string | |
mac | string | |
start_time | google.protobuf.Timestamp | |
ports | repeated PortMapping | |
exit_code | optional int32 | One 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_time | google.protobuf.Timestamp | When the guest last ended on its own. |
restart_count | int32 | How many times in a row the restart policy has started the instance again. A start a user asks for resets it. |
next_restart_time | google.protobuf.Timestamp | When a Restarting instance is due to start again. |
health_check | HealthCheck | How the instance’s health is checked, overriding its image’s. Unset means the image’s, if it declares one. |
health | Health | What the health check of the running instance has found. Unset if it is not running, or has no check. |
init_mode | InitMode | How the guest starts the command. See CreateInstanceRequest.init_mode. |
remove_on_exit | bool | Whether the instance is deleted once it stops. See CreateInstanceRequest.remove_on_exit. |
user | string | Who the workload runs as. See CreateInstanceRequest.user. |
Instance.EnvEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
Instance.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
InstanceLogChunk
| Field | Type | Description |
|---|---|---|
data | bytes |
InstanceResources
InstanceResources is what one instance holds.
| Field | Type | Description |
|---|---|---|
name | string | |
state | InstanceState | |
vcpus | int32 | |
memory_bytes | int64 |
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.
| Field | Type | Description |
|---|---|---|
name | string | |
id | string | |
cpu_percent | double | CPU used over the last second, as a percentage of one host CPU: 200 is two CPUs kept busy. |
cpu_time | google.protobuf.Duration | CPU time used in total. |
vcpus | int32 | The vCPUs the instance holds. |
resident_memory_bytes | int64 | The process’s resident host memory: the guest memory backed so far, and the hypervisor’s own. Memory a guest frees stays resident. |
memory_bytes | int64 | The guest memory the instance holds. |
disk_read_bytes | int64 | What 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_bytes | int64 | |
network_receive_bytes | int64 | What the guest received and transmitted on its network interface. |
network_transmit_bytes | int64 | |
network_receive_drops | int64 | Packets 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_drops | int64 | |
network_receive_errors | int64 | Packets to and from the guest that failed with an error. |
network_transmit_errors | int64 | |
network_receive_packets | int64 | Packets the guest received and transmitted. |
network_transmit_packets | int64 |
IssuedToken
IssuedToken is a token with its value, as it is made or rotated.
| Field | Type | Description |
|---|---|---|
token | Token | |
value | string | What 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.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
arch | Architecture | |
sha256 | string | The SHA-256 of the kernel on the host, hex-encoded. It is checked each time an instance boots the kernel. |
create_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp |
ListImagesRequest
ListImagesResponse
| Field | Type | Description |
|---|---|---|
images | repeated Image |
ListInstanceProcessesRequest
| Field | Type | Description |
|---|---|---|
name | string |
ListInstanceProcessesResponse
| Field | Type | Description |
|---|---|---|
processes | repeated Process | The processes, in PID order. |
ListInstancesRequest
ListInstancesResponse
| Field | Type | Description |
|---|---|---|
instances | repeated Instance |
ListKernelsRequest
ListKernelsResponse
| Field | Type | Description |
|---|---|---|
kernels | repeated Kernel |
ListNetworkAllocationsRequest
| Field | Type | Description |
|---|---|---|
name | string |
ListNetworkAllocationsResponse
| Field | Type | Description |
|---|---|---|
allocations | repeated NetworkAllocation |
ListNetworksRequest
ListNetworksResponse
| Field | Type | Description |
|---|---|---|
networks | repeated Network |
ListSnapshotsRequest
| Field | Type | Description |
|---|---|---|
instance | string | Lists only the snapshots taken of this instance, if set. |
ListSnapshotsResponse
| Field | Type | Description |
|---|---|---|
snapshots | repeated Snapshot |
ListTokensRequest
ListTokensResponse
| Field | Type | Description |
|---|---|---|
tokens | repeated Token |
ListVolumesRequest
ListVolumesResponse
| Field | Type | Description |
|---|---|---|
volumes | repeated Volume |
Mount
Mount attaches a volume, a file, a host directory or a tmpfs at target in the guest.
| Field | Type | Description |
|---|---|---|
type | MountType | |
source | string | The 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. |
target | string | The absolute path the mount appears at in the guest. |
read_only | bool | A volume every instance attaching it mounts read-only can be shared. |
content | bytes | A 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. |
mode | uint32 | A 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.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
subnet | string | |
gateway | string | |
bridge | string | |
mtu | int32 | |
nameservers | repeated string | |
isolated | bool | Stops instances on the network reaching each other; each can still reach the gateway and, through NAT, the outside. |
total_ips | int64 | |
free_ips | int64 | |
create_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp | |
internal | bool | Stops 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.
| Field | Type | Description |
|---|---|---|
instance_id | string | |
instance_name | string | |
ip | string | |
mac | string | |
tap_device | string |
PauseInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
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.
| Field | Type | Description |
|---|---|---|
host_ip | string | The host address to publish on. Empty means every address the host has. |
host_port | uint32 | The host port to publish on. 0 asks the daemon to pick a free one from the host’s ephemeral port range when it records the instance. The instance keeps that port from then on, and its definition holds it. |
guest_port | uint32 | |
protocol | Protocol |
Process
Process is a process running in an instance’s guest.
| Field | Type | Description |
|---|---|---|
pid | int32 | |
ppid | int32 | |
user | string | The user the process runs as, by name, or by UID if the guest has no name for it. |
state | string | The state code: R running, S sleeping, D waiting on I/O, Z zombie, T stopped, and so on. |
name | string | The command’s name, which the kernel keeps even when the command line is gone, as it is for a zombie. |
command | repeated string | The command line. Empty for a zombie. |
start_time | google.protobuf.Timestamp | When the process started, by the guest’s clock. |
cpu_time | google.protobuf.Duration | CPU time used in total, in user and kernel mode. |
resident_memory_bytes | int64 | The guest memory the process has resident. |
PruneImagesRequest
PruneImagesResponse
| Field | Type | Description |
|---|---|---|
images | repeated Image | The images that were removed. |
reclaimed_bytes | int64 | The disk space their disks and cached layers gave back. |
PullImageProgress
| Field | Type | Description |
|---|---|---|
stage | PullStage | |
downloaded_bytes | int64 | Compressed 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_bytes | int64 | |
image | Image | Set on the final message only, when the image is ready to boot. |
PullImageRequest
| Field | Type | Description |
|---|---|---|
ref | string |
RenameInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string | |
new_name | string | The 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.
| Field | Type | Description |
|---|---|---|
name | string | |
vcpus | optional int32 | One of _vcpus. |
memory_bytes | optional int64 | One 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.
| Field | Type | Description |
|---|---|---|
host | int64 | What the host has: its logical CPUs, or its memory. |
reserved | int64 | What is kept back from instances for the host itself. |
overcommit | double | How far what remains is stretched: 4 lets four vCPUs share each CPU. |
allocatable | int64 | What instances may be given in total: (host - reserved) * overcommit. |
allocated | int64 | What instances hold. |
available | int64 | What 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.
| Field | Type | Description |
|---|---|---|
mode | RestartMode | |
max_retries | int32 | For on-failure, how many restarts in a row are made before the instance is left Failed. 0 means no limit. |
RestoreSnapshotRequest
| Field | Type | Description |
|---|---|---|
name | string | The snapshot’s name or ID. |
ResumeInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
RotateTokenRequest
| Field | Type | Description |
|---|---|---|
name | string | |
secret | string | The 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.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
kind | SnapshotKind | |
instance_id | string | The instance it was taken from: its ID, and its name now, or, if it has been deleted, its name then. |
instance_name | string | |
hypervisor_type | HypervisorType | The 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_version | string | |
vcpus | int32 | The vCPUs and memory a memory snapshot’s guest had. Unset for a disk snapshot. |
memory_bytes | int64 | |
size_bytes | int64 | What 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_time | google.protobuf.Timestamp |
StandbyInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
StartInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
StopInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string |
Token
Token is a credential a client presents to the daemon’s TCP listener.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
scopes | repeated string | What 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_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp | |
last_use_time | google.protobuf.Timestamp | When 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.
| Field | Type | Description |
|---|---|---|
name | string | |
hypervisor_type | HypervisorType | |
hypervisor_version | optional string | One of _hypervisor_version. |
kernel_name | optional string | One of _kernel_name. |
kernel_args | optional string | One of _kernel_args. |
vcpus | optional int32 | One of _vcpus. |
memory_bytes | optional int64 | One of _memory_bytes. |
max_vcpus | optional int32 | One of _max_vcpus. Zero removes the maximum. |
max_memory_bytes | optional int64 | One of _max_memory_bytes. |
disk_bytes | optional int64 | One 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_second | optional int64 | One of _disk_bytes_per_second. Zero removes the limit. |
disk_iops | optional int64 | One of _disk_iops. |
upload_bytes_per_second | optional int64 | One of _upload_bytes_per_second. |
download_bytes_per_second | optional int64 | One of _download_bytes_per_second. |
standby_after | google.protobuf.Duration | Zero is never. |
network_name | optional string | One of _network_name. |
static_ip | optional string | One of _static_ip. |
hostname | optional string | One of _hostname. |
restart_policy | RestartPolicy | |
health_check | HealthCheck | |
init_mode | InitMode | |
remove_on_exit | optional bool | One of _remove_on_exit. |
mounts | repeated Mount | |
env | repeated UpdateInstanceRequest.EnvEntry | |
cmd | repeated string | |
labels | repeated UpdateInstanceRequest.LabelsEntry | |
ports | repeated PortMapping | |
user | optional string | One of _user. Empty means the image’s USER again. |
UpdateInstanceRequest.EnvEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
UpdateInstanceRequest.LabelsEntry
| Field | Type | Description |
|---|---|---|
key | string | |
value | string |
Volume
Volume is a persistent block device that outlives the instances using it.
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
size_bytes | int64 | |
create_time | google.protobuf.Timestamp | |
update_time | google.protobuf.Timestamp |
WaitInstanceRequest
| Field | Type | Description |
|---|---|---|
name | string | |
id | string | If set, the instance with this ID: one given the name later is not waited for. |
next_stop | bool | Wait 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. |
condition | WaitCondition | What to wait for. Unspecified means a stop. |
WaitInstanceResponse
| Field | Type | Description |
|---|---|---|
state | InstanceState | STOPPED or FAILED, or RUNNING after a wait for WAIT_CONDITION_HEALTHY. |
state_error | string | Why it failed. |
exit_code | optional int32 | One 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.
| Value | Number | Description |
|---|---|---|
ARCHITECTURE_UNSPECIFIED | 0 | |
ARCHITECTURE_X86_64 | 1 | |
ARCHITECTURE_AARCH64 | 2 |
EventAction
EventAction is what happened to the resource.
| Value | Number | Description |
|---|---|---|
EVENT_ACTION_UNSPECIFIED | 0 | |
EVENT_ACTION_CREATED | 1 | Any kind of resource. |
EVENT_ACTION_UPDATED | 2 | |
EVENT_ACTION_DELETED | 3 | |
EVENT_ACTION_STARTED | 4 | An instance. |
EVENT_ACTION_STOPPED | 5 | |
EVENT_ACTION_PAUSED | 6 | |
EVENT_ACTION_RESUMED | 7 | |
EVENT_ACTION_EXITED | 8 | The guest ended cleanly, of its own accord. |
EVENT_ACTION_DIED | 9 | The guest ended in failure. |
EVENT_ACTION_RESTARTING | 10 | The restart policy will start the instance again. |
EVENT_ACTION_RENAMED | 11 | |
EVENT_ACTION_HEALTHY | 12 | The health check reached a verdict. |
EVENT_ACTION_UNHEALTHY | 13 | |
EVENT_ACTION_SNAPSHOT_RESTORED | 15 | The instance was put back as a snapshot of it holds it. |
EVENT_ACTION_PULLED | 17 | An image. |
EVENT_ACTION_COLLECTED | 18 | Garbage collection removed the image. |
EVENT_ACTION_IMPORTED | 19 | A kernel, put on the host. |
EVENT_ACTION_RESIZED | 21 | A running instance was given other vCPUs or memory. |
EVENT_ACTION_STANDBY | 22 | The instance was frozen to disk, and its hypervisor ended. |
EventKind
EventKind is the kind of resource an event is about.
| Value | Number | Description |
|---|---|---|
EVENT_KIND_UNSPECIFIED | 0 | |
EVENT_KIND_INSTANCE | 1 | |
EVENT_KIND_IMAGE | 2 | |
EVENT_KIND_NETWORK | 3 | |
EVENT_KIND_VOLUME | 4 | |
EVENT_KIND_KERNEL | 5 | |
EVENT_KIND_SNAPSHOT | 6 |
HealthStatus
HealthStatus is what an instance’s health check has found.
| Value | Number | Description |
|---|---|---|
HEALTH_STATUS_UNSPECIFIED | 0 | |
HEALTH_STATUS_STARTING | 1 | No verdict yet: the workload is in its start period, or has not been probed. |
HEALTH_STATUS_HEALTHY | 2 | The last probe passed. |
HEALTH_STATUS_UNHEALTHY | 3 | The check’s retries have failed in a row. |
HostCheckGroup
HostCheckGroup says which part of CheckHost’s checks a result belongs to.
| Value | Number | Description |
|---|---|---|
HOST_CHECK_GROUP_UNSPECIFIED | 0 | |
HOST_CHECK_GROUP_HOST | 1 | The checks of the host itself. |
HOST_CHECK_GROUP_INSTANCES | 2 | The test instance’s boot, and whether it reached the internet. |
HostCheckStatus
HostCheckStatus is what a check found.
| Value | Number | Description |
|---|---|---|
HOST_CHECK_STATUS_UNSPECIFIED | 0 | |
HOST_CHECK_STATUS_OK | 1 | All is well. |
HOST_CHECK_STATUS_WARNING | 2 | Something may cause trouble later, such as little free disk space, but instances can still run. |
HOST_CHECK_STATUS_FAILED | 3 | Something stops instances from booting or from being reached, and must be fixed. |
HypervisorType
HypervisorType is the virtual machine monitor an instance runs on.
| Value | Number | Description |
|---|---|---|
HYPERVISOR_TYPE_UNSPECIFIED | 0 | |
HYPERVISOR_TYPE_CLOUD_HYPERVISOR | 1 | Cloud Hypervisor, the default. |
HYPERVISOR_TYPE_FIRECRACKER | 2 |
InitMode
InitMode is how the guest starts an instance’s command.
| Value | Number | Description |
|---|---|---|
INIT_MODE_UNSPECIFIED | 0 | |
INIT_MODE_AUTO | 1 | Systemd if the command resolves to the systemd binary in the image, exec otherwise. The default. |
INIT_MODE_EXEC | 2 | The command runs as PID 1 of its own PID namespace, as a container runs it. |
INIT_MODE_SYSTEMD | 3 | The command, systemd, is the machine’s PID 1. |
InstanceState
InstanceState is where an instance is in its lifecycle.
| Value | Number | Description |
|---|---|---|
INSTANCE_STATE_UNSPECIFIED | 0 | |
INSTANCE_STATE_STOPPED | 1 | Defined but not running. A new instance starts here. |
INSTANCE_STATE_STARTING | 2 | A start is in progress. |
INSTANCE_STATE_RUNNING | 3 | The guest is running. |
INSTANCE_STATE_PAUSED | 4 | The guest’s vCPUs are halted, and it is kept resident. |
INSTANCE_STATE_STOPPING | 5 | A stop is in progress. |
INSTANCE_STATE_RESTARTING | 6 | The instance ended without being asked to, and its restart policy will start it again at next_restart_time. It holds nothing meanwhile. |
INSTANCE_STATE_FAILED | 7 | The last operation failed; state_error says why. |
INSTANCE_STATE_STANDBY | 8 | The 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.
| Value | Number | Description |
|---|---|---|
LOG_SOURCE_UNSPECIFIED | 0 | Defaults to the guest’s console. |
LOG_SOURCE_GUEST | 1 | The guest’s console log: the kernel’s boot messages, dicer-init’s, and whatever the workload writes to the console. |
LOG_SOURCE_HYPERVISOR | 2 | The 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.
| Value | Number | Description |
|---|---|---|
MOUNT_TYPE_UNSPECIFIED | 0 | |
MOUNT_TYPE_VOLUME | 1 | A named volume: persistent storage, as a disk of its own. |
MOUNT_TYPE_FILE | 2 | A file whose contents the client gives, written into the guest at each start. |
MOUNT_TYPE_TMPFS | 3 | An empty in-memory filesystem, lost when the guest stops. |
MOUNT_TYPE_DIRECTORY | 4 | A 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.
| Value | Number | Description |
|---|---|---|
PROTOCOL_UNSPECIFIED | 0 | Means TCP. |
PROTOCOL_TCP | 1 | |
PROTOCOL_UDP | 2 |
PullPolicy
PullPolicy is when creating an instance pulls its image, as docker run –pull says.
| Value | Number | Description |
|---|---|---|
PULL_POLICY_UNSPECIFIED | 0 | Means missing. |
PULL_POLICY_MISSING | 1 | Pull the image only if the host does not hold it. |
PULL_POLICY_ALWAYS | 2 | Pull 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_NEVER | 3 | Use 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.
| Value | Number | Description |
|---|---|---|
PULL_STAGE_UNSPECIFIED | 0 | |
PULL_STAGE_RESOLVING | 1 | Asking the registry what the reference points at. |
PULL_STAGE_DOWNLOADING | 2 | Fetching the layers, the only stage with a byte count. |
PULL_STAGE_UNPACKING | 3 | Writing those layers out as a root filesystem. |
PULL_STAGE_CONVERTING | 4 | Packing that filesystem into the disk a guest boots from. |
RestartMode
RestartMode is when an instance that ended without being asked to is started again.
| Value | Number | Description |
|---|---|---|
RESTART_MODE_UNSPECIFIED | 0 | |
RESTART_MODE_NO | 1 | Leave the instance as it ended. The default. |
RESTART_MODE_ON_FAILURE | 2 | Restart it unless it ended cleanly, by its workload exiting 0 or its guest powering off. |
RESTART_MODE_UNLESS_STOPPED | 3 | Restart it however it ended, and start it when the daemon starts, unless a user stopped it. |
RESTART_MODE_ALWAYS | 4 | Restart it however it ended, and start it when the daemon starts, even if a user stopped it. |
SnapshotKind
SnapshotKind is what a snapshot holds.
| Value | Number | Description |
|---|---|---|
SNAPSHOT_KIND_UNSPECIFIED | 0 | |
SNAPSHOT_KIND_MEMORY | 1 | A 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_DISK | 2 | A 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.
| Value | Number | Description |
|---|---|---|
WAIT_CONDITION_UNSPECIFIED | 0 | |
WAIT_CONDITION_STOPPED | 1 | The instance stopping. The default. |
WAIT_CONDITION_HEALTHY | 2 | The 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. |