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.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.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 11.0 .
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.Sh BUGS
Currently
.Nx
does not request fresh samples from all on-demand entropy sources when
the VM generation ID changes, so although the outputs of the system
entropy pool appear independent to an outside observer, disclosing the
kernel memory of one VM clone to an adversary may allow the adversary
to predict another VM clone's
p Currently .Xr arc4random 3 is not reseeded when the VM generation ID changes.
p Currently there is no cheaper way to detect VM generation ID changes than to query sysctl.