p 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 .Xr entropy 7 pool (with a measure of zero entropy) so that the two virtual machines will produce independent random output.
p 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 .Nm device. When this happens, .Nx will reseed system random number generators, so that output of
a /dev/urandom
and
.Xr getentropy 3
will be independent in the two clones, and the
.Xr sysctl 7
variable
.Li kern.entropy.epoch
will advance to notify applications that they should reseed random
number generators from the system entropy pool.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh SYSCTLS
The following
.Xr sysctl 7
nodes are available:
l -tag -width Li t Li "hw.acpivmgenid" Ns Va N Ns Li ".id" The current 16-byte VM generation ID.
t Li "hw.acpivmgenid" Ns Va N Ns Li ".paddr" The physical address of the VM generation ID provided by the host.
.El
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh SEE ALSO
.Xr arc4random 3 ,
.Xr getentropy 3 ,
.Xr rnd 4 ,
.Xr entropy 7
.Rs
.%T Virtual Machine Generation ID
.%Q Microsoft
.%D 2018-08-01
.%U http://go.microsoft.com/fwlink/?LinkId=260709
.Re
.Rs
.%T Virtual Machine Generation ID Device
.%Q The QEMU Project Developers
.%U https://www.qemu.org/docs/master/specs/vmgenid.html
.Re
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh HISTORY
The
.Nm
driver first appeared in
.Nx 10.1 .
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh 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
.Li kern.entropy.epoch ,
not
.Li "hw.acpivmgenid" Ns Va N Ns Li ".id" . )