Skip to main content

Virtual Machine Configuration

VirtualMachineConfiguration

Defines a reusable configuration template for virtual machine instances.

Encapsulates standardized operating system selections, base bootstrapping scripts, and baseline observability configurations (e.g., logging and metric agents). Serves as an archetypal foundation referenced by individual virtual machine deployments to ensure fleet-wide consistency and compliance.

PropertyTypeDescription
apiVersionstringAPI schema version. Pins the manifest to a specific schema contract for backward-compatibility. Must be the constant lowops.manifests.v1.
kindstringResource kind discriminator. Identifies this document as a VirtualMachineConfiguration so the engine routes it to the correct defaulter, validator, computer, and executor. Must be the constant VirtualMachineConfiguration.
metadatamapClassification labels and graph linkage. Free-form key/value pairs used to classify the manifest. Certain reserved keys (e.g. name, organization) are read by the engine to resolve this manifest's identity and let VirtualMachine manifests reference it in the dependency graph.
specVirtualMachineConfigurationDefinitionReusable VM template definition. The operating system, base startup script, and observability agent settings shared by every VirtualMachine that references this configuration by name. See VirtualMachineConfigurationDefinition.

VirtualMachineConfigurationDefinition

Defines the core configuration for a virtual machine blueprint.

Acts as a templatable base for VirtualMachine manifests, establishing OS images, agent specs, and baseline secrets for google_compute_instance creation.

PropertyTypeDescription
operatingSystemstringOperating system. The OS installed on the VM, which selects the boot disk's source image for the google_compute_instance. One of the supported Debian, Ubuntu, or Windows Server values.
secretslist of SecretsEntrySecrets available to the VM. A map from Secret manifest name to how it is exposed on the VM. The platform fetches each payload from Secret Manager and uses the startup script to inject it as a file or environment variable. See VirtualMachineSecretConfig.
agentAgentConfigOps Agent configuration. The monitoring and logging agent configuration installed on the VM, controlling which logs and metrics are exported. See AgentConfig.
volumeslist of VolumesEntryVolume definitions. A map from in-VM absolute mount path (e.g. /data) to the volume mounted there. See VirtualMachineVolumeConfig.
startupStartupConfigStartup configuration. The VM's startup script and its template variables, rendered into the instance metadata. See StartupConfig.

VolumesEntry

PropertyTypeDescription
keystring
valueVirtualMachineVolumeConfig

AgentConfig

Configuration for the Ops Agent deployed on the VM.

Drives the installation and configuration of the Google Cloud Ops Agent on the instance, dictating which logs and metrics are exported to Cloud Monitoring.

PropertyTypeDescription
logFileslist of stringLog file glob patterns. Glob patterns identifying the log files the Ops Agent tails and ships to Cloud Logging from the VM. Applied to the agent's LogFiles configuration.
metricslist of MetricConfigCustom metric receivers. A list of custom metric collectors added to the Ops Agent configuration on the VM. See MetricConfig.

StartupConfig

Configuration for VM startup scripting.

Populates the metadata.startup-script field of the google_compute_instance, executing specified logic and injecting templated variables on boot.

PropertyTypeDescription
scriptstringStartup script template. The script body written to the instance's metadata.startup-script. Templated variables from variables are substituted before execution on boot.
variableslist of VariablesEntryScript template variables. A map from variable name to its definition (default value and whether it is required), substituted into the startup script's execution context. See VariableConfig.

SecretsEntry

PropertyTypeDescription
keystring
valueVirtualMachineSecretConfig

VirtualMachineSecretConfig

Configures how secrets are provisioned directly to a Virtual Machine.

Intercepts Google Secret Manager payloads and drives startup scripts to write them out as files or variables prior to VM application startup.

PropertyTypeDescription
typestringExposure mechanism. How the secret is delivered to the VM: ENV_VAR sets it as an environment variable, or FILE writes it to a file via the startup script.
targetstringDestination for the secret. The target location: when type is FILE, the absolute path of the file to create; when type is ENV_VAR, the name of the environment variable to set. Consumed by the VM computer to populate the startup configuration.

VariablesEntry

PropertyTypeDescription
keystring
valueVariableConfig

VirtualMachineVolumeConfig

Defines a storage volume to be attached to a virtual machine.

Translates into google_compute_disk or bucket mount instructions, attaching physical or logical storage media to the google_compute_instance.

PropertyTypeDescription
namestringVolume name. A logical name for the volume, referenced by VirtualMachine volume mounts and carried into the computed bucket/disk configuration.
typestringVolume kind. The backing storage type: BUCKET (Cloud Storage FUSE mount), DISK (a persistent google_compute_disk), or SECRET (a Secret Manager payload).
fileSystemstringDisk filesystem format. Only applicable to DISK volumes. The filesystem the disk is formatted with; must be compatible with the VM operating system. Lower-cased and carried into the computed disk configuration.
encryptedboolDisk encryption. Only applicable to DISK volumes. When true, the provisioned disk is encrypted. Carried into the computed disk configuration.

MetricConfig

Configures custom metric collection for the Ops Agent.

Adds custom receivers to the Ops Agent configuration file running within the virtual machine.

PropertyTypeDescription
typestringReceiver type. The kind of metric receiver to add to the Ops Agent. Currently only prometheus is supported.
prometheusPrometheusConfigPrometheus receiver settings. The Prometheus scrape configuration used when type is prometheus. See PrometheusConfig.

VariableConfig

Defines a template variable for the startup script.

Resolved variables are injected into the VM's startup script execution context.

PropertyTypeDescription
defaultValuestringDefault value. The value substituted for the variable when no explicit value is provided by the VM manifest.
requiredboolWhether the variable is mandatory. When true, the VM computer errors if the variable is left unset, enforcing that a value is supplied before the startup script is rendered.

PrometheusConfig

Configures a Prometheus receiver for the Ops Agent.

Instructs the Ops Agent to scrape Prometheus metrics from the specified endpoint and port on the VM localhost loopback.

PropertyTypeDescription
schemestringScrape scheme. The URL scheme the Ops Agent uses to scrape metrics: http or https.
endpointstringScrape endpoint. The metrics path/endpoint scraped on the VM's localhost loopback (e.g. /metrics).
portint64Scrape port. The localhost port the Ops Agent scrapes for Prometheus metrics.