Skip to main content

Cloud disk sources (S3 / GCS / Azure)

GuestKit can pull VM disks from object storage before offline inspect/doctor/passport.

Rebuild with the matching features (or --features cloud for all three):

cargo build --release --features cloud-s3
cargo build --release --features cloud-azure
cargo build --release --features cloud-gcs
cargo build --release --features cloud

URI forms​

BackendURICLI tool
S3 / MinIOs3://bucket/path/vm.qcow2aws
GCSgs://bucket/path/vm.qcow2gsutil or gcloud storage
Azurehttps://acct.blob.core.windows.net/container/blob or azure://acct/container/blobaz
guestkit doctor s3://my-bucket/fleet/win10.qcow2 --target kvm
guestkit inspect gs://my-bucket/images/rhel9.qcow2
guestkit passport emit azure://acct/disks/vm.vhd --target kvm -o passport.json

Local download cache​

Downloads land under ~/.cache/guestkit/cloud/ (keyed by URI hash) so repeat pulls skip the network.

EnvMeaning
GUESTKIT_CLOUD_CACHE0/false disables cache (temp file, deleted after use)
GUESTKIT_CLOUD_CACHE_DIROverride cache directory

S3 / MinIO endpoints​

EnvMeaning
GUESTKIT_S3_ENDPOINTPassed as aws s3 cp --endpoint-url (preferred)
AWS_ENDPOINT_URLFallback endpoint URL
export GUESTKIT_S3_ENDPOINT=http://127.0.0.1:9000
export AWS_ACCESS_KEY_ID=zyvor
export AWS_SECRET_ACCESS_KEY=zyvor-secret
guestkit doctor s3://guestkit/fixtures/tiny.qcow2

For path-style MinIO addressing, configure the AWS CLI (aws configure set default.s3.addressing_style path).

CI recipe (optional live pull)​

The feature matrix script exercises live URIs when credentials + tools exist:

export GK_TEST_S3_URI=s3://bucket/fixture.qcow2
export GK_TEST_AZURE_URI=https://acct.blob.core.windows.net/c/fixture.qcow2
export GK_TEST_GCS_URI=gs://bucket/fixture.qcow2
./scripts/test-feature-matrix.sh

Unit coverage (no cloud credentials):

cargo test -p guestkit --lib storage::cloud_cache
cargo test -p guestkit --features cloud-azure --lib storage::azure::tests

See also scripts/ci-cloud-disk-sources.sh.