EQTY LabDocs

vcomp-qemu-crt

JSON configuration reference for the launcher that boots a CRT inside a TEE with QEMU.

View as Markdown

vcomp-qemu-crt launches a CRT on a bare metal server. It reads a JSON configuration, configures QEMU to boot the firmware, kernel and vcomp-initrd inside an AMD SEV-SNP or Intel TDX guest, and passes the settings to the initrd as kernel command-line parameters.

Quick Start

Minimal configuration example:

json
{
  "id": 1,
  "cpu": "amd",
  "cores": 16,
  "ram": 64,
  "rootfs": {
    "src": "/images/rootfs.tgz",
    "hash": "f0991446b9409560fcbf588bc101f705d75f797b41ce243a5cfe9a377dd97fba",
    "format": "tar-as-block",
    "rootfs_source": "vda"
  },
  "data_drive": "/images/data.img",
  "gpu": {
    "enabled": false
  },
  "network": {
    "ssh": false,
    "ssl": true,
    "docker_api": true
  }
}

General Settings

FieldTypeRequiredDefaultDescription
idintegerYes—Unique VM identifier. Used for port mapping and work directory
cpustringYes—CPU/TEE type: "amd" (SEV-SNP), "intel" (TDX), "azure" (TPM-based), or "none" (no TEE)
coresintegerYes—Number of vCPUs allocated to the VM
ramintegerYes—RAM allocation in gigabytes
teebooleanNotrueEnable TEE protection. Set false for testing without confidential computing
tee_debugbooleanNofalseAllow VM to boot even if no TEE is detected. Debug only (Always on in cli)
data_drivestringYes—Path to block device or image file for the internal encrypted data store
external_drivestringNo—Path to block device for external/shared storage (outside TEE trust zone)
initramfsstringNobundledCustom initramfs image path
vmlinuzstringNobundledCustom kernel image path
cab64stringNo—Base64-encoded CA certificate (no newlines or armor)
extrastringNo—Additional kernel command-line parameters

Root Filesystem (rootfs)

Configuration for the read-only root filesystem image containing EQTY OS.

FieldTypeRequiredDefaultDescription
rootfs.srcstringYes—Path to the root filesystem image file
rootfs.hashstringYes—SHA256 hash of the root filesystem for verification
rootfs.formatstringYes—Filesystem format (see Root filesystem types)
rootfs.rootfs_sourcestringConditionalsdaSource device name, e.g., "vda" (required for non-verity formats)
rootfs.rootfs_verity_hashesstringConditionalsda2Path to verity hash tree (required for dm-verity)
rootfs.rootfs_verity_rootfsstringConditionalsda1Path to verity root filesystem (required for dm-verity)
rootfs.target.locationstringNotmpfsTarget location for secure store (tmpfs or specific path)
rootfs.target.sizeintegerNo10000Target filesystem size in MB (for overlay/copy-on-write)
rootfs.target.integritybooleanNotrueEnable dm-integrity on target. Adds protection but increases boot time
rootfs.skipfshashbooleanNofalseSkip filesystem hash verification. Debug only

See Root filesystem types for the values of rootfs.format. raw is for debugging only.

json
{
  "rootfs": {
    "src": "/images/rootfs.tgz",
    "hash": "f0991446b9409560fcbf588bc101f705d75f797b41ce243a5cfe9a377dd97fba",
    "format": "tar-as-block",
    "rootfs_source": "vda",
    "target": {
      "location": "tmpfs",
      "size": 20000,
      "integrity": false
    }
  }
}

Example: dm-verity

json
{
  "rootfs": {
    "src": "/images/rootfs.img",
    "hash": "a1b2c3d4e5f6...",
    "format": "dm-verity",
    "rootfs_verity_hashes": "/images/rootfs.hashes",
    "rootfs_verity_rootfs": "/images/rootfs.verity",
    "target": {
      "size": 10240,
      "integrity": true
    }
  }
}

Internal Encrypted Storage (internal)

Configuration for the LUKS2-encrypted internal data store mounted at /internal. This storage persists across reboots and is protected by TEE-derived encryption keys.

FieldTypeRequiredDefaultDescription
internal.sizestringYes—Size of encrypted volume (e.g., "20G", "100G", "50%")
internal.insecurebooleanNofalseUse dummy encryption key (see warning below)
internal.integritybooleanNotrueEnable dm-integrity with HMAC-SHA256

Size Formats

  • Absolute: "10G", "500M", "1T"
  • Percentage: "50%" (percentage of parent filesystem)

Security Modes

ModeinsecureintegrityUse Case
ProductionfalsetrueFull security with tamper detection
PerformancefalsefalseEncrypted but faster I/O
DebugtruefalseDevelopment/testing only

Example

json
{
  "internal": {
    "size": "100G",
    "insecure": false,
    "integrity": true
  }
}

⚠️ Security Warning: insecure Mode

Setting insecure: true should only be used in debugging environments. When enabled:

  • Uses a zeroed/dummy encryption key instead of TEE-derived key
  • Allows data persistence across EQTY OS code changes
  • Allows data persistence on Intel TDX deployments during development
  • Makes internal storage accessible to non-TEE interactions with the host system
  • Never use in production environments

Network Configuration (network)

FieldTypeRequiredDefaultDescription
network.sshbooleanNofalseEnable SSH port forwarding. Debug only — EQTY OS does not include SSH by default
network.sslbooleanNofalseEnable HTTPS port forwarding (port 443)
network.docker_apibooleanNofalseEnable Docker API port (port 447). Required to add/remove/start payloads
network.portshiftbooleanNofalsePrefix ports with VM ID to prevent conflicts when running multiple TEEs
network.ipstringNo""Bind to specific host IP address
network.otherinteger or arrayNo[]Additional port(s) to forward
network.sslproxybooleanNotrueIf enabled, nginx proxies SSL port to 8080 in Docker. If disabled, SSL port passes through directly to Docker

Port Mapping

With portshift: false (default):

ServiceHost PortContainer Port
SSH2222
HTTP8080
HTTPS443443
File Browser446446
Docker API447447

With portshift: true and id: 2:

ServiceHost PortContainer Port
SSH202222
HTTP208080
HTTPS2443443
File Browser2446446
Docker API2447447

Note: VM with id: 0 always uses standard ports (443, 80) for SSL/HTTP regardless of portshift setting.

Example

json
{
  "network": {
    "ssh": false,
    "ssl": true,
    "docker_api": true,
    "portshift": true,
    "ip": "192.168.1.100",
    "sslproxy": true,
    "other": [8080, 9000, 3000]
  }
}

GPU Passthrough (gpu)

Configuration for NVIDIA GPU passthrough using VFIO.

FieldTypeRequiredDefaultDescription
gpu.enabledbooleanYes—Enable GPU passthrough
gpu.devstringConditional—VFIO device ID (e.g., "10de 2331") for driver binding
gpu.pcipathstringConditional—PCI address for single GPU (e.g., "0d:00.0")
gpu.noattestbooleanNofalseSkip NVIDIA attestation (debug only)
gpu.gpusarrayConditional—Array of GPU configs for multi-GPU setups
gpu.gpus[].pcipathstringYes—PCI address for each GPU

Finding GPU Information

bash
# Step 1: Find GPU PCI path
lspci | grep NVIDIA
# Output: 0d:00.0 3D controller: NVIDIA Corporation...

# Step 2: Find device ID using PCI path
lspci -n | grep 0d:00.0
# Output: 0d:00.0 0302: 10de:2331 (rev a1)
# Device ID is "10de 2331"

Prerequisites

bash
# Load VFIO driver
sudo modprobe vfio_pci

# For Intel TDX, increase DMA entry limit
echo 1048576 | sudo tee /sys/module/vfio_iommu_type1/parameters/dma_entry_limit

Example: Single GPU

json
{
  "gpu": {
    "enabled": true,
    "dev": "10de 2331",
    "pcipath": "0d:00.0"
  }
}

Example: Multiple GPUs

json
{
  "gpu": {
    "enabled": true,
    "dev": "10de 2204",
    "gpus": [
      { "pcipath": "41:00.0" },
      { "pcipath": "42:00.0" },
      { "pcipath": "43:00.0" },
      { "pcipath": "44:00.0" }
    ]
  }
}

Example: Disabled

json
{
  "gpu": {
    "enabled": false
  }
}

USB Passthrough (usb)

Configuration for USB device passthrough (e.g., for HSM devices).

FieldTypeRequiredDefaultDescription
usb.enabledbooleanYes—Enable USB passthrough
usb.busintegerYes—USB bus number
usb.devicestringYes—USB port identifier (e.g., "1.6")
usb.vendoridstringNo—USB vendor ID (e.g., "0x1050" for Yubico)
usb.productidstringNo—USB product ID (e.g., "0x0030")

Finding USB Device Info

bash
# List USB devices
lsusb
# Bus 001 Device 005: ID 1050:0030 Yubico.com YubiKey

# Show bus/port topology
lsusb -t

Example: YubiKey HSM

json
{
  "usb": {
    "enabled": true,
    "bus": 1,
    "device": "1.6",
    "vendorid": "0x1050",
    "productid": "0x0030"
  }
}

Docker Settings (docker)

FieldTypeRequiredDefaultDescription
docker.noauthbooleanNofalseDisable local Docker authentication

Example

json
{
  "docker": {
    "noauth": true
  }
}

Cryptographic Settings

Configuration for cryptographic key generation used in attestation and signing.

FieldTypeRequiredDefaultDescription
signing_curvestringNoSECP256r1Elliptic curve for key generation (see options below)
generatefakekeybooleanNofalseGenerate fake keys instead of TEE-derived keys. Debug only

signing_curve and generatefakekey map to the initrd’s tee_signing_curve and tee_generatefakekey; see Signing keys for supported curves and how each TEE derives the key.

Example

json
{
  "signing_curve": "SECP256r1",
  "generatefakekey": false
}

Advanced Options

Intel TDX Specific

FieldTypeDefaultDescription
avxbooleanfalseEnable AVX/AVX2 instructions. If false, kernel boots with clearcpuid=mtrr,avx,avx2
json
{
  "cpu": "intel",
  "avx": true
}

Complete Example Configurations

AMD SEV-SNP Production VM

json
{
  "id": 1,
  "cpu": "amd",
  "tee": true,
  "cores": 16,
  "ram": 64,
  
  "rootfs": {
    "src": "/images/production-rootfs.tgz",
    "hash": "f0991446b9409560fcbf588bc101f705d75f797b41ce243a5cfe9a377dd97fba",
    "format": "tar-as-block",
    "rootfs_source": "vda",
    "target": {
      "location": "tmpfs",
      "size": 20000,
      "integrity": true
    }
  },
  
  "data_drive": "/dev/nvme1n1",
  
  "internal": {
    "size": "200G",
    "insecure": false,
    "integrity": true
  },
  
  "gpu": {
    "enabled": true,
    "dev": "10de 2204",
    "gpus": [
      { "pcipath": "41:00.0" },
      { "pcipath": "42:00.0" }
    ]
  },
  
  "network": {
    "ssh": false,
    "ssl": true,
    "docker_api": true,
    "portshift": false,
    "sslproxy": true
  },
  
  "signing_curve": "SECP256r1"
}

Intel TDX Development VM

json
{
  "id": 2,
  "cpu": "intel",
  "tee": true,
  "cores": 16,
  "ram": 328,
  "avx": true,
  
  "rootfs": {
    "src": "/images/rootfs.tgz",
    "hash": "a1b2c3d4e5f6...",
    "format": "tar-as-block",
    "rootfs_source": "vda",
    "target": {
      "location": "tmpfs",
      "size": 20000,
      "integrity": false
    }
  },
  
  "data_drive": "/images/data.img",
  "external_drive": "/images/external.img",
  
  "internal": {
    "size": "100G",
    "insecure": false,
    "integrity": false
  },
  
  "gpu": {
    "enabled": true,
    "dev": "10de 2331",
    "pcipath": "0d:00.0"
  },
  
  "usb": {
    "enabled": true,
    "bus": 1,
    "device": "1.6",
    "vendorid": "0x1050",
    "productid": "0x0030"
  },
  
  "network": {
    "ssh": false,
    "ssl": true,
    "docker_api": true,
    "portshift": true,
    "sslproxy": true,
    "other": [8080]
  },
  
  "signing_curve": "SECP256r1"
}

Non-TEE Test VM (Debug)

json
{
  "id": 99,
  "cpu": "none",
  "tee": false,
  "allow_no_tee": true,
  "cores": 4,
  "ram": 8,
  
  "rootfs": {
    "src": "/images/test-rootfs.tgz",
    "hash": "abc123...",
    "format": "tar-as-block",
    "rootfs_source": "vda"
  },
  
  "data_drive": "/tmp/test-data.img",
  
  "internal": {
    "size": "10G",
    "insecure": true,
    "integrity": false
  },
  
  "gpu": {
    "enabled": false
  },
  
  "network": {
    "ssh": true,
    "ssl": false,
    "docker_api": true,
    "portshift": true
  },
  
  "generatefakekey": true
}

Blockchain Signing VM (SECP256k1)

json
{
  "id": 3,
  "cpu": "amd",
  "tee": true,
  "cores": 8,
  "ram": 32,
  
  "rootfs": {
    "src": "/images/rootfs.tgz",
    "hash": "def456...",
    "format": "tar-as-block",
    "rootfs_source": "vda",
    "target": {
      "size": 15000,
      "integrity": true
    }
  },
  
  "data_drive": "/dev/nvme0n1",
  
  "internal": {
    "size": "50G",
    "insecure": false,
    "integrity": true
  },
  
  "gpu": {
    "enabled": false
  },
  
  "network": {
    "ssh": false,
    "ssl": true,
    "docker_api": true
  },
  
  "signing_curve": "SECP256k1"
}

Environment Variables

The launcher also reads these environment variables:

VariableDefaultDescription
WORK_DIR/images/workWorking directory for VM state files
AMD_ID_KEY/images/work/id-key.pemAMD SEV ID key for attestation signing
AMD_ID_AUTHOR/images/work/author-key.pemAMD SEV author key for attestation signing
DEBUG—Enable debug output and kernel debug mode
AUTHTrueEnable AMD SEV authentication/signing of boot components
HOSTNAMEhttps://localhost:443Default API URL
qemu_pathauto-detectedCustom QEMU binary path

Kernel Command Line Parameters

The launcher generates these parameters from the configuration. The rootfs_*, tee_* and key parameters are described in vcomp-initrd.

ParameterSource
rootfs_hashrootfs.hash
rootfs_typerootfs.format
rootfs_sourcerootfs.rootfs_source
rootfs_targetrootfs.target.location
rootfs_target_sizerootfs.target.size
rootfs_integrityrootfs.target.integrity
rootfs_skipfshashrootfs.skipfshash
rootfs_verity_hashesrootfs.rootfs_verity_hashes
rootfs_verity_rootfsrootfs.rootfs_verity_rootfs
INTERNAL_STORE_SIZEinternal.size
INTERNAL_STORE_INSECUREinternal.insecure
INTERNAL_STORE_INTEGRITYinternal.integrity
signing_curvesigning_curve
generatefakekeygeneratefakekey
allow_no_teeallow_no_tee
NOGPUgpu.enabled=false
DEBUGenv DEBUG
FILEBROWSERexternal_drive present
TEE_SSLPROXYnetwork.sslproxy

Validation Checklist

Before launching, verify:

  • id is unique across all running VMs
  • cpu matches your hardware (amd for AMD EPYC with SEV-SNP, intel for Xeon with TDX, azure for Azure Confidential VMs)
  • rootfs.src file exists and is readable
  • rootfs.hash matches the actual file hash (sha256sum <file>)
  • data_drive device/file exists and is writable
  • GPU PCI addresses are correct (lspci | grep NVIDIA)
  • GPU device IDs are correct (lspci -n | grep <pcipath>)
  • Required ports are available (ss -tlnp | grep <port>)
  • VFIO modules loaded (if GPU enabled): lsmod | grep vfio
  • docker_api: true if you need to manage payloads
  • signing_curve is appropriate for your use case
  • Debug options (generatefakekey, insecure, allow_no_tee) are disabled for production

Troubleshooting

VM won’t start with TEE enabled

bash
# Check SEV-SNP support (AMD)
dmesg | grep -i sev

# Check TDX support (Intel)
dmesg | grep -i tdx

# Check TPM support (Azure)
ls -la /dev/tpm0

# Verify CPU supports required features
cat /proc/cpuinfo | grep -E "sev|tdx"

GPU passthrough fails

bash
# Verify IOMMU is enabled
dmesg | grep -i iommu

# Check VFIO binding
ls -la /sys/bus/pci/drivers/vfio-pci/

# Verify GPU is bound to vfio-pci
lspci -k | grep -A3 NVIDIA

Network ports not accessible

bash
# Check if ports are listening
ss -tlnp | grep qemu

# Verify firewall rules
iptables -L -n

# Check if port shift is causing unexpected port numbers
# With id=2 and portshift=true, SSH is on 2022, not 22

Internal storage issues

bash
# Check if LUKS device is created
ls -la /dev/mapper/

# Verify encryption key derivation
# (inside TEE) cat /proc/cmdline | grep INTERNAL_STORE

Boot hangs with integrity enabled

Setting rootfs.target.integrity: true or internal.integrity: true can significantly increase boot time as dm-integrity needs to initialize. For large volumes, consider:

  • Using integrity: false during development
  • Being patient during first boot (can take several minutes for large volumes)

Attestation not available

If attestation reports show “FAKE KEYS ARE USED”:

  • Verify generatefakekey is set to false
  • Check that a supported TEE is detected (SEV, TDX, or AZURE)
  • For SEV: Ensure snpguest can derive keys from VCEK
  • For TDX/AZURE: Note that keys are randomly generated (not TEE-derived)

Hash verification failures

If you see “ERROR: Hash does not match”:

  • Regenerate the hash: sha256sum /path/to/rootfs.tgz
  • Update the rootfs.hash value in your configuration
  • Ensure the rootfs image hasn’t been modified since hash generation
  • For debugging, you can temporarily set rootfs_skipfshash: true (never in production)