For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy a Confidential VM with SNPGuard

Overview

SNPGuard is an open-source attestation toolchain built by IONOS CLOUD for AMD SEV-SNP Confidential VM. It solves three technical challenges that every Confidential VM deployment faces:

  • Calculating a precise launch measurement

  • Delivering the Volume Master Key (VMK) only after the VM proves its integrity

  • Bootstrapping a trusted agent inside the early boot environment before the Operating System (OS) starts.

In this tutorial, you will work through the complete lifecycle:

  • Deploying the SNPGuard attestation server

  • Converting a standard Linux cloud image into a LUKS2-encrypted confidential image

  • Registering the image measurement with the server

  • Embedding the signed launch_artifacts

  • Uploading an image to IONOS CLOUD

  • Creating the Confidential VM

  • Confirming that attestation succeeds

The following table lists the IONOS CLOUD components used in this tutorial:

Component

Description

Configuration in this tutorial

Confidential VM

AMD SEV-SNP hardware-encrypted VMs

Frankfurt-East de/fra/2 region

Compute Engine

VM creation and lifecycle management

ENTERPRISE server type, AMD SEV-SNP CPU family

Block Storage

Startup volume provisioned from the confidential image

Balanced or Performance volume

FTP Storage

Upload endpoint for confidential images

/confidential-images/ folder

Target audience

This tutorial targets:

  • DevOps and platform engineers who need to deploy hardware-attested workloads on IONOS CLOUD and want full control over the attestation service and key management.

  • Security engineers evaluating AMD SEV-SNP attestation for regulated workloads, zero-trust architectures, or multi-party data processing scenarios.

  • Developers building applications that run inside a Confidential VM and need to understand how the boot and attestation flow works end to end.

What you will learn

By the end of this tutorial, you will have:

  • Deployed the SNPGuard attestation server: Configured Transport Layer Security (TLS), retrieved an API token, and verified the server is active and reachable.

  • Built a confidential image: Converted a stock Debian or Ubuntu cloud image into a LUKS2-encrypted confidential image with the SNPGuard attestation agent injected into the initrd.

  • Registered a measurement policy: Uploaded the SHA-384 launch digest to the attestation service and received a signed launch artifacts bundle containing the ID-Block and Auth-Block.

  • Created and verified a running attested VM: Created a Confidential VM on IONOS CLOUD and confirmed it passed the full attestation handshake and booted into a trusted state.

Before you begin

Ensure you meet the following requirements before starting:

  • Have an active IONOS CLOUD account with Confidential VM enabled in the Frankfurt-East de/fra/2 region. Contact IONOS CLOUD Sales to enable it, then verify the feature is active:

  • Use a Linux workstation running Debian 13+ or Ubuntu 24.04+ with the following packages installed:

  • Install the latest Rust environment via rustup:

  • Install the SNPGuard build toolchain:

  • Clone the SNPGuard repository and build from source:

  • Provision a host with a stable, routable IP address where you will run the SNPGuard server. The Confidential VM must reach this host on every start.

  • Export your IONOS CLOUD credentials and your datacenter ID as environment variables:

  • Obtain your IONOS CLOUD FTP credentials from the Data Center Designer (DCD) in Storage & Backup > Images & Snapshots. Select the FTP Upload Image tab in the Manage Images and Snapshots window. These are separate from your API credentials. For more information, see Upload an Image via the FTP.

Cost considerations

The following resources used in this tutorial are billable:

  • Confidential VM: IONOS CLOUD bills this per hour based on the vCPU and RAM configuration. Contact your IONOS CLOUD account manager for pricing specific to AMD SEV-SNP hardware.

  • Block Storage (Balanced or Performance): IONOS CLOUD bills this per GB per month.

The SNPGuard server is self-hosted. Compute costs depend on the infrastructure you choose for it.

Procedure

1

Deploy the SNPGuard attestation server

The SNPGuard server stores your volume master key and verifies every VM startup. It must be reachable from the VM's network at every boot. Deploy it before any other step.

  1. Generate TLS certificates for the server. Replace YOUR-SERVER-IP with the IP address of your server host, or use --dns YOUR-HOSTNAME if you are using a hostname:

  1. Start the server:

  1. On first start, the server generates a master password and prints it to stdout. Copy it, then:

  • Navigate to the web dashboard at https://YOUR-SERVER-HOST:3000

  • Log in with the master password

  • Go to Tokens to create an API token for the CLI client

  1. Save the token and server URL as environment variables:

2

Configure the SNPGuard client

  1. Configure snpguard-client to connect to your server. This step uses Trust On First Use (TOFU): the client captures and pins the server TLS certificate so all subsequent connections are bound to that exact certificate.

  1. The client stores the server URL, API token, CA certificate, ingestion public key, and identity public key in ~/.config/snpguard/. The conversion process embeds these values into the guest image; you cannot change them without a full rebuild.

3

Download the base OS image

Download a standard Debian 13+ or Ubuntu 24.04+ cloud image. SNPGuard requires a guest kernel with AMD SEV-SNP support and currently supports images that use initramfs-tools (Debian and Ubuntu).

For Debian 13 (Trixie), SEV-SNP is supported from "Trixie" onwards:

For Ubuntu 24.04 LTS, SEV-SNP is supported from "Noble" onwards:

4

Convert the base image to a confidential image

The snpguard-image convert command transforms the standard cloud image into a confidential-ready image. During conversion, the tool performs the following operations:

  1. Encrypts the root filesystem with LUKS2 using a randomly generated volume master key (VMK).

  2. Seals the VMK with the attestation server's ingestion public key and stores the sealed blob in the guest image. The VMK is never stored in plaintext.

  3. Injects the snpguard-client binary and the attestation hooks into the guest initrd.

  4. Extracts the kernel, initrd, firmware, and kernel parameters to a local staging directory for use in the next step.

5

Register the attestation record

Register the converted image with the SNPGuard server. This uploads the boot artifacts to the server, which computes the SHA-384 launch digest of the firmware, kernel, initrd, and kernel parameters, generates and signs the ID-Block and Auth-Block artifacts, and returns a signed launch-artifacts.tar.gz bundle.

Note: --allowed-smt permits Simultaneous Multithreading (SMT) within the guest. This option is mandatory for all deployments on the IONOS CLOUD platform.

You can view the registered image and its computed measurement in the web dashboard at $SNPGUARD_URL. The record shows the registered vCPU configuration and the guest policy bitmask.

Note: The --os-name value is a descriptive label for the OS or VM. Use a name that identifies the image version. Example: debian13-cc-v1.

6

Embed the launch artifacts into the image

Write the signed launch artifacts into a dedicated LAUNCH_ARTIFACTS partition inside the confidential image. IONOS CLOUD reads this partition at VM start time to configure the hardware-enforced launch.

The embed command creates a 512 MB ext4 partition labelled LAUNCH_ARTIFACTS with an A/B directory structure. Active artifacts are placed in /A and a symbolic link (symlink) /artifacts -> A points to the active set. This structure enables atomic in-place artifact renewal from inside a running VM using snpguard-client attest renew.

7

Upload the confidential image to IONOS CLOUD

Upload the confidential image to the IONOS CLOUD FTP endpoint for your region. Confidential VM images must go to the /confidential-images/ folder. The standard pipeline processes images placed in the standard /images/ folder, but it cannot handle LUKS2-encrypted confidential images.

At the FTP prompt:

The upload handler validates the LAUNCH_ARTIFACTS partition, checks that all required files are present with exact filenames, and verifies that launch-config.json contains the correct guest-policy value. If any check fails, the handler rejects the image and reports which check failed.

8

Create the Confidential VM

VM creation is a two-call sequence. You must first create the startup volume from your uploaded image, then create the VM referencing that volume.

1. Find your uploaded image ID

2. Create the startup volume

Replace YOUR-IMAGE-ID with the image ID from the previous command. Set size to at least the image size in GB, plus headroom for your application data.

Note: Remember to note the id value from the response and wait for the volume to reach AVAILABLE status before continuing.

3. Create the Confidential VM

Replace YOUR-VOLUME-ID with the volume ID from above and YOUR-ATTESTATION-URL with the HTTPS URL of your SNPGuard server.

Important: The system automatically derives both values from the vcpu-count and vcpu-model fields in the launch-config.json embedded in the LAUNCH_ARTIFACTS partition. Do not set cores or cpuFamily in the API request.

Verification

After the VM reaches RUNNING status, verify that attestation succeeded and the VM is accessible.

1. Confirm the request count incremented in the web dashboard

Navigate to $SNPGUARD_URL, find your registration, and confirm the Request count has increased to one. This counter only increments when a VM passes all AMD SEV-SNP verification checks.

2. Check the SNPGuard server logs for a successful attestation event

Review the server log output.

3. SSH into the VM

SSH into your VM using the following command:

4. Verify LUKS2 is active inside the VM

Conclusion

In this tutorial, you deployed the complete SNPGuard attestation workflow for IONOS CLOUD Confidential VM. The setup:

  • Automates the full lifecycle from image preparation through attested boot, replacing manual measurement calculation and key delivery with an auditable, reproducible pipeline.

  • Enforces a hardware-level trust boundary: the VM cannot start into a trusted state without presenting a genuine AMD SEV-SNP attestation report that matches your registered measurement.

  • Gives you exclusive control over the VMK. IONOS CLOUD has no access to the attestation service, the VMK, or the decrypted VM memory.

Next steps

To extend this setup, see:

Last updated

Was this helpful?