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 theinitrd.Registered a measurement policy: Uploaded the
SHA-384launch 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/2region. 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
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.
Generate TLS certificates for the server. Replace
YOUR-SERVER-IPwith the IP address of your server host, or use--dns YOUR-HOSTNAMEif you are using a hostname:
Start the server:
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:3000Log in with the master password
Go to Tokens to create an API token for the CLI client
Save the token and server URL as environment variables:
Expected result: The web dashboard is accessible at https://YOUR-SERVER-HOST:3000 and shows an empty image registry.
Configure the SNPGuard client
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.
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.
Important: If your server uses a privately generated TLS certificate (recommended for production), the client pins the CA at login. This prevents wildcard certificate attacks common on shared hosting platforms.
Expected result: The client prints the server certificate fingerprints, confirms the token is valid, and saves the configuration to ~/.config/snpguard/.
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:
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:
Encrypts the root filesystem with LUKS2 using a randomly generated volume master key (VMK).
Seals the
VMKwith the attestation server's ingestion public key and stores the sealedblobin the guest image. The VMK is never stored in plaintext.Injects the
snpguard-clientbinary and the attestation hooks into the guestinitrd.Extracts the kernel,
initrd, firmware, and kernel parameters to a local staging directory for use in the next step.
Important:
Do not interrupt the process: The conversion takes several minutes. Do not interrupt it.
Do not register the measurement yet: The measurement must reflect the
initrdproduced by this command, which includes the sealed VMK and the embedded attestation server URL. Registering before conversion causes every boot to fail attestation.
Expected result: The command completes without errors and produces confidential.qcow2. A staging directory contains firmware-code.fd, vmlinuz, initrd.img, and kernel-params.txt.
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.
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.
Expected result: The command produces launch-artifacts.tar.gz. The new record appears in the web dashboard with status Enabled and a request count of zero.
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.
Important: The image is now sealed. Do not modify confidential.qcow2 after this step. Any change to the firmware, kernel, initrd, or kernel parameters produces a different measurement and breaks attestation at every subsequent start.
Expected result: The command completes without errors and the LAUNCH_ARTIFACTS partition is present in the image with the correct label, A/B directory structure, and symlink.
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.
Expected result: The image uploads successfully. After validation, it appears in the IONOS CLOUD image list with requiredFeatures: ["confidential-computing"].
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.
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.
Expected result: The API returns a server object with status: RUNNING. The VM begins the hardware-enforced boot: OVMF initialises, the AMD Secure Processor computes the launch measurement, the initrd starts, the SNPGuard client contacts your attestation server, attestation passes, the VMK is released, LUKS2 unlocks the root filesystem, and the OS starts.
Result: You now have a running, attested Confidential VM on IONOS CLOUD. The VM:
Boots only after presenting a hardware-signed AMD SEV-SNP attestation report that passes all AMD SEV-SNP verification checks against your registered measurement policy.
Holds its root filesystem in a
LUKS2container that can only be unlocked by the VMK released by your SNPGuard server. IONOS CLOUD never holds or accesses this key.Runs inside an AMD SEV-SNP Trusted Execution Environment (TEE) where the AMD CPU encrypts all VM memory. The architecture physically excludes the hypervisor, host OS, and IONOS CLOUD from the decryption path.
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.
Expected result: A log line containing attestation success with the image ID matching your registered record.
3. SSH into the VM
SSH into your VM using the following command:
Expected result: You reach a shell prompt inside the VM. SSH access confirms the OS fully booted, which only happens after the attestation handshake completes and LUKS2 unlocks the root filesystem.
Important: The VM may be stuck in an attestation retry loop. Verify that your SNPGuard server is reachable from the VM subnet and that the registered measurement matches the artifacts embedded in the image. For troubleshooting guidance, see Attest a Confidential VM .
4. Verify LUKS2 is active inside the VM
Expected result: A crypt device mounted at /, confirming the root filesystem is running inside the LUKS2 container and the VMK, released during attestation, unlocked it.
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?