vcomp-qemu-crt
JSON configuration reference for the launcher that boots a CRT inside a TEE with QEMU.
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:
{
"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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | integer | Yes | — | Unique VM identifier. Used for port mapping and work directory |
cpu | string | Yes | — | CPU/TEE type: "amd" (SEV-SNP), "intel" (TDX), "azure" (TPM-based), or "none" (no TEE) |
cores | integer | Yes | — | Number of vCPUs allocated to the VM |
ram | integer | Yes | — | RAM allocation in gigabytes |
tee | boolean | No | true | Enable TEE protection. Set false for testing without confidential computing |
tee_debug | boolean | No | false | Allow VM to boot even if no TEE is detected. Debug only (Always on in cli) |
data_drive | string | Yes | — | Path to block device or image file for the internal encrypted data store |
external_drive | string | No | — | Path to block device for external/shared storage (outside TEE trust zone) |
initramfs | string | No | bundled | Custom initramfs image path |
vmlinuz | string | No | bundled | Custom kernel image path |
cab64 | string | No | — | Base64-encoded CA certificate (no newlines or armor) |
extra | string | No | — | Additional kernel command-line parameters |
Root Filesystem (rootfs)
Configuration for the read-only root filesystem image containing EQTY OS.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
rootfs.src | string | Yes | — | Path to the root filesystem image file |
rootfs.hash | string | Yes | — | SHA256 hash of the root filesystem for verification |
rootfs.format | string | Yes | — | Filesystem format (see Root filesystem types) |
rootfs.rootfs_source | string | Conditional | sda | Source device name, e.g., "vda" (required for non-verity formats) |
rootfs.rootfs_verity_hashes | string | Conditional | sda2 | Path to verity hash tree (required for dm-verity) |
rootfs.rootfs_verity_rootfs | string | Conditional | sda1 | Path to verity root filesystem (required for dm-verity) |
rootfs.target.location | string | No | tmpfs | Target location for secure store (tmpfs or specific path) |
rootfs.target.size | integer | No | 10000 | Target filesystem size in MB (for overlay/copy-on-write) |
rootfs.target.integrity | boolean | No | true | Enable dm-integrity on target. Adds protection but increases boot time |
rootfs.skipfshash | boolean | No | false | Skip filesystem hash verification. Debug only |
See Root filesystem types for the values of rootfs.format. raw is for debugging only.
Example: tar-as-block (Recommended)
{
"rootfs": {
"src": "/images/rootfs.tgz",
"hash": "f0991446b9409560fcbf588bc101f705d75f797b41ce243a5cfe9a377dd97fba",
"format": "tar-as-block",
"rootfs_source": "vda",
"target": {
"location": "tmpfs",
"size": 20000,
"integrity": false
}
}
}Example: dm-verity
{
"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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
internal.size | string | Yes | — | Size of encrypted volume (e.g., "20G", "100G", "50%") |
internal.insecure | boolean | No | false | Use dummy encryption key (see warning below) |
internal.integrity | boolean | No | true | Enable dm-integrity with HMAC-SHA256 |
Size Formats
- Absolute:
"10G","500M","1T" - Percentage:
"50%"(percentage of parent filesystem)
Security Modes
| Mode | insecure | integrity | Use Case |
|---|---|---|---|
| Production | false | true | Full security with tamper detection |
| Performance | false | false | Encrypted but faster I/O |
| Debug | true | false | Development/testing only |
Example
{
"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)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
network.ssh | boolean | No | false | Enable SSH port forwarding. Debug only — EQTY OS does not include SSH by default |
network.ssl | boolean | No | false | Enable HTTPS port forwarding (port 443) |
network.docker_api | boolean | No | false | Enable Docker API port (port 447). Required to add/remove/start payloads |
network.portshift | boolean | No | false | Prefix ports with VM ID to prevent conflicts when running multiple TEEs |
network.ip | string | No | "" | Bind to specific host IP address |
network.other | integer or array | No | [] | Additional port(s) to forward |
network.sslproxy | boolean | No | true | If enabled, nginx proxies SSL port to 8080 in Docker. If disabled, SSL port passes through directly to Docker |
Port Mapping
With portshift: false (default):
| Service | Host Port | Container Port |
|---|---|---|
| SSH | 22 | 22 |
| HTTP | 80 | 80 |
| HTTPS | 443 | 443 |
| File Browser | 446 | 446 |
| Docker API | 447 | 447 |
With portshift: true and id: 2:
| Service | Host Port | Container Port |
|---|---|---|
| SSH | 2022 | 22 |
| HTTP | 2080 | 80 |
| HTTPS | 2443 | 443 |
| File Browser | 2446 | 446 |
| Docker API | 2447 | 447 |
Note: VM with
id: 0always uses standard ports (443, 80) for SSL/HTTP regardless ofportshiftsetting.
Example
{
"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.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
gpu.enabled | boolean | Yes | — | Enable GPU passthrough |
gpu.dev | string | Conditional | — | VFIO device ID (e.g., "10de 2331") for driver binding |
gpu.pcipath | string | Conditional | — | PCI address for single GPU (e.g., "0d:00.0") |
gpu.noattest | boolean | No | false | Skip NVIDIA attestation (debug only) |
gpu.gpus | array | Conditional | — | Array of GPU configs for multi-GPU setups |
gpu.gpus[].pcipath | string | Yes | — | PCI address for each GPU |
Finding GPU Information
# 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
# 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_limitExample: Single GPU
{
"gpu": {
"enabled": true,
"dev": "10de 2331",
"pcipath": "0d:00.0"
}
}Example: Multiple GPUs
{
"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
{
"gpu": {
"enabled": false
}
}USB Passthrough (usb)
Configuration for USB device passthrough (e.g., for HSM devices).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
usb.enabled | boolean | Yes | — | Enable USB passthrough |
usb.bus | integer | Yes | — | USB bus number |
usb.device | string | Yes | — | USB port identifier (e.g., "1.6") |
usb.vendorid | string | No | — | USB vendor ID (e.g., "0x1050" for Yubico) |
usb.productid | string | No | — | USB product ID (e.g., "0x0030") |
Finding USB Device Info
# List USB devices
lsusb
# Bus 001 Device 005: ID 1050:0030 Yubico.com YubiKey
# Show bus/port topology
lsusb -tExample: YubiKey HSM
{
"usb": {
"enabled": true,
"bus": 1,
"device": "1.6",
"vendorid": "0x1050",
"productid": "0x0030"
}
}Docker Settings (docker)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
docker.noauth | boolean | No | false | Disable local Docker authentication |
Example
{
"docker": {
"noauth": true
}
}Cryptographic Settings
Configuration for cryptographic key generation used in attestation and signing.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
signing_curve | string | No | SECP256r1 | Elliptic curve for key generation (see options below) |
generatefakekey | boolean | No | false | Generate 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
{
"signing_curve": "SECP256r1",
"generatefakekey": false
}Advanced Options
Intel TDX Specific
| Field | Type | Default | Description |
|---|---|---|---|
avx | boolean | false | Enable AVX/AVX2 instructions. If false, kernel boots with clearcpuid=mtrr,avx,avx2 |
{
"cpu": "intel",
"avx": true
}Complete Example Configurations
AMD SEV-SNP Production VM
{
"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
{
"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)
{
"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)
{
"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:
| Variable | Default | Description |
|---|---|---|
WORK_DIR | /images/work | Working directory for VM state files |
AMD_ID_KEY | /images/work/id-key.pem | AMD SEV ID key for attestation signing |
AMD_ID_AUTHOR | /images/work/author-key.pem | AMD SEV author key for attestation signing |
DEBUG | — | Enable debug output and kernel debug mode |
AUTH | True | Enable AMD SEV authentication/signing of boot components |
HOSTNAME | https://localhost:443 | Default API URL |
qemu_path | auto-detected | Custom 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.
| Parameter | Source |
|---|---|
rootfs_hash | rootfs.hash |
rootfs_type | rootfs.format |
rootfs_source | rootfs.rootfs_source |
rootfs_target | rootfs.target.location |
rootfs_target_size | rootfs.target.size |
rootfs_integrity | rootfs.target.integrity |
rootfs_skipfshash | rootfs.skipfshash |
rootfs_verity_hashes | rootfs.rootfs_verity_hashes |
rootfs_verity_rootfs | rootfs.rootfs_verity_rootfs |
INTERNAL_STORE_SIZE | internal.size |
INTERNAL_STORE_INSECURE | internal.insecure |
INTERNAL_STORE_INTEGRITY | internal.integrity |
signing_curve | signing_curve |
generatefakekey | generatefakekey |
allow_no_tee | allow_no_tee |
NOGPU | gpu.enabled=false |
DEBUG | env DEBUG |
FILEBROWSER | external_drive present |
TEE_SSLPROXY | network.sslproxy |
Validation Checklist
Before launching, verify:
-
idis unique across all running VMs -
cpumatches your hardware (amdfor AMD EPYC with SEV-SNP,intelfor Xeon with TDX,azurefor Azure Confidential VMs) -
rootfs.srcfile exists and is readable -
rootfs.hashmatches the actual file hash (sha256sum <file>) -
data_drivedevice/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: trueif you need to manage payloads -
signing_curveis appropriate for your use case - Debug options (
generatefakekey,insecure,allow_no_tee) are disabled for production
Troubleshooting
VM won’t start with TEE enabled
# 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
# 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 NVIDIANetwork ports not accessible
# 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 22Internal storage issues
# Check if LUKS device is created
ls -la /dev/mapper/
# Verify encryption key derivation
# (inside TEE) cat /proc/cmdline | grep INTERNAL_STOREBoot 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: falseduring 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
generatefakekeyis set tofalse - Check that a supported TEE is detected (SEV, TDX, or AZURE)
- For SEV: Ensure
snpguestcan 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.hashvalue 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)