ACPIVMGENID(4) | Device Drivers Manual | ACPIVMGENID(4)

# NAME

`acpivmgenid` — ACPI Virtual Machine Generation ID

# SYNOPSIS

`acpivmgenid* at acpi?`

# DESCRIPTION

`acpivmgenid` provides a generation ID for virtual machines.

When starting two otherwise identical virtual machines, whether from the same clean image or by cloning snapshots or any other mechanism, the VM host may choose a different generation ID. Although this generation ID is not secret, it is incorporated into the entropy(7) pool (with a measure of zero entropy) so that the two virtual machines will produce independent random output.

If a live VM is cloned, the VM host may change the generation ID in one or both of the clones and notify them through the `acpivmgenid` device. When this happens, NetBSD will reseed system random number generators, so that output of /dev/urandom and getentropy(3) will be independent in the two clones, and the sysctl(7) variable `kern.entropy.epoch` will advance to notify applications that they should reseed random number generators from the system entropy pool.

# SYSCTLS

The following sysctl(7) nodes are available:

`hw.acpivmgenid` N`.id`
  The current 16-byte VM generation ID.
`hw.acpivmgenid` N`.paddr`
  The physical address of the VM generation ID provided by the host.

# SEE ALSO

arc4random(3), getentropy(3), rnd(4), entropy(7)

Virtual Machine Generation ID, http://go.microsoft.com/fwlink/?LinkId=260709, Microsoft, 2018-08-01.

Virtual Machine Generation ID Device, https://www.qemu.org/docs/master/specs/vmgenid.html, The QEMU Project Developers.

# HISTORY

The `acpivmgenid` driver first appeared in NetBSD 10.1.

# BUGS

Currently there is no cheaper way to detect VM generation ID changes than to query sysctl. (Applications deciding whether to reseed random number generators should generally query `kern.entropy.epoch`, not `hw.acpivmgenid` N`.id`.)

August 26, 2024 | NetBSD 11.0