Get Firmware Measurement
Learn to get the firmware measurement of the VM
Install sev-snp-measure
sev-snp-measure Install using pip package manager
pip package manager# Update and install pip if necessary
sudo apt update
sudo apt install -y python3-pip
# Install the tool
pip3 install sev-snp-measuresev-snp-measure --helpusage: sev-snp-measure [-h] [--version] [-v] --mode
{sev,seves,snp,snp:ovmf-hash,snp:svsm} [--vcpus N]
[--vcpu-type CPUTYPE] [--vcpu-sig VALUE]
[--vcpu-family FAMILY] [--vcpu-model MODEL]
[--vcpu-stepping STEPPING] [--vmm-type VMMTYPE] --ovmf
PATH [--kernel PATH] [--initrd PATH] [--append CMDLINE]
[--guest-features VALUE] [--output-format {hex,base64}]
[--snp-ovmf-hash HASH] [--dump-vmsa] [--svsm PATH]
[--vars-size SIZE | --vars-file PATH]
Calculate AMD SEV/SEV-ES/SEV-SNP guest launch measurement
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-v, --verbose
--mode {sev,seves,snp,snp:ovmf-hash,snp:svsm}
Guest mode
--vcpus N Number of guest vcpus
--vcpu-type CPUTYPE Type of guest vcpu (EPYC, EPYC-v1, EPYC-v2, EPYC-IBPB,
EPYC-v3, EPYC-v4, EPYC-Rome, EPYC-Rome-v1, EPYC-
Rome-v2, EPYC-Rome-v3, EPYC-Milan, EPYC-Milan-v1,
EPYC-Milan-v2, EPYC-Genoa, EPYC-Genoa-v1)
--vcpu-sig VALUE Guest vcpu signature value
--vcpu-family FAMILY Guest vcpu family
--vcpu-model MODEL Guest vcpu model
--vcpu-stepping STEPPING
Guest vcpu stepping
--vmm-type VMMTYPE Type of guest vmm (QEMU, ec2)
--ovmf PATH OVMF file to calculate hash from
--kernel PATH Kernel file to calculate hash from
--initrd PATH Initrd file to calculate hash from (use with --kernel)
--append CMDLINE Kernel command line to calculate hash from (use with
--kernel)
--guest-features VALUE
Hex representation of the guest kernel features
expected to be included (defaults to 0x1); see
README.md for possible values
--output-format {hex,base64}
Measurement output format
--snp-ovmf-hash HASH Precalculated hash of the OVMF binary (hex string)
--dump-vmsa Write measured VMSAs to vmsa<N>.bin (seves, snp, and
snp:svsm modes only)
snp:svsm Mode:
AMD SEV-SNP with Coconut-SVSM. This mode additionally requires --svsm and
either --vars-file or --vars-size to be set.
--svsm PATH SVSM binary
--vars-size SIZE Size of the OVMF_VARS file in bytes (conflicts with
--vars-file)
--vars-file PATH OVMF_VARS file (conflicts with --vars-size)Install from the GitHub repository
Locate or download OVMF firmware
OVMF firmwareCalculate the SEV-SNP firmware measurement
Last updated
Was this helpful?