1.\" $NetBSD: acpivmgenid.4,v 1.4 2024/10/10 09:05:45 rin Exp $ 2.\" 3.\" Copyright (c) 2024 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd August 26, 2024 28.Dt ACPIVMGENID 4 29.Os 30.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 31.Sh NAME 32.Nm acpivmgenid 33.Nd ACPI Virtual Machine Generation ID 34.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 35.Sh SYNOPSIS 36.Cd "acpivmgenid* at acpi?" 37.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 38.Sh DESCRIPTION 39.Nm 40provides a generation ID for virtual machines. 41.Pp 42When starting two otherwise identical virtual machines, whether from 43the same clean image or by cloning snapshots or any other mechanism, 44the VM host may choose a different generation ID. 45Although this generation ID is not secret, it is incorporated into the 46.Xr entropy 7 47pool (with a measure of zero entropy) so that the two virtual machines 48will produce independent random output. 49.Pp 50If a live VM is cloned, the VM host may change the generation ID in one 51or both of the clones and notify them through the 52.Nm 53device. 54When this happens, 55.Nx 56will reseed system random number generators, so that output of 57.Pa /dev/urandom 58and 59.Xr getentropy 3 60will be independent in the two clones, and the 61.Xr sysctl 7 62variable 63.Li kern.entropy.epoch 64will advance to notify applications that they should reseed random 65number generators from the system entropy pool. 66.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 67.Sh SYSCTLS 68The following 69.Xr sysctl 7 70nodes are available: 71.Bl -tag -width Li 72.It Li "hw.acpivmgenid" Ns Va N Ns Li ".id" 73The current 16-byte VM generation ID. 74.It Li "hw.acpivmgenid" Ns Va N Ns Li ".paddr" 75The physical address of the VM generation ID provided by the host. 76.El 77.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 78.Sh SEE ALSO 79.Xr arc4random 3 , 80.Xr getentropy 3 , 81.Xr rnd 4 , 82.Xr entropy 7 83.Rs 84.%T Virtual Machine Generation ID 85.%Q Microsoft 86.%D 2018-08-01 87.%U http://go.microsoft.com/fwlink/?LinkId=260709 88.Re 89.Rs 90.%T Virtual Machine Generation ID Device 91.%Q The QEMU Project Developers 92.%U https://www.qemu.org/docs/master/specs/vmgenid.html 93.Re 94.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 95.Sh HISTORY 96The 97.Nm 98driver first appeared in 99.Nx 10.1 . 100.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 101.Sh BUGS 102Currently there is no cheaper way to detect VM generation ID changes 103than to query sysctl. 104(Applications deciding whether to reseed random number generators 105should generally query 106.Li kern.entropy.epoch , 107not 108.Li "hw.acpivmgenid" Ns Va N Ns Li ".id" . ) 109