Build an IGVM-capable QEMU
Build QEMU with --enable-igvm — the igvm C library first, then QEMU 10 against it — so it can boot the measured SEV-SNP node image.
The SEV-SNP node image boots through a measured IGVM file, which QEMU only accepts when built
with --enable-igvm. The flag needs the
igvm C library, which QEMU's configure locates through
pkg-config — so the build is two steps: install the library, then build QEMU against it.
Before you start
- A Rust toolchain, plus the library's build tools:
cargo install --locked cbindgen cargo-c - QEMU's build dependencies. On Debian/Ubuntu:
sudo apt-get install -y build-essential pkg-config ninja-build python3-venv flex bison libglib2.0-dev libpixman-1-dev libfdt-dev
Build and install the igvm C library
git clone https://github.com/microsoft/igvm.git
make -C igvm/igvm_c build
sudo --preserve-env=PATH,HOME make -C igvm/igvm_c install PREFIX=/usr/local
sudo ldconfig
pkg-config --modversion igvm # 0.4.0The install target runs cargo cinstall, which lays down the header, the shared library, and
the igvm.pc pkg-config file configure looks for — --preserve-env keeps your Rust toolchain
usable under sudo.
Build QEMU against it
IGVM support landed in QEMU 10.1; any 10.1+ release works the same way:
curl -LO https://download.qemu.org/qemu-10.2.1.tar.xz
tar xf qemu-10.2.1.tar.xz && cd qemu-10.2.1
./configure --target-list=x86_64-softmmu --enable-igvm --prefix=/opt/qemu-igvm
make -j"$(nproc)"
sudo make install--enable-igvm makes the feature mandatory: configure fails on the spot if pkg-config cannot
find the library, rather than producing a QEMU that silently lacks it.
Verify
/opt/qemu-igvm/bin/qemu-system-x86_64 -object igvm-cfg,helpAn IGVM-capable build prints the object's properties (file=<string>); one without answers
Parameter 'qom-type' does not accept value 'igvm-cfg'. Put the new binary first on your PATH
(or call it by full path) and continue with
Boot a node CVM on bare metal.