mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 17:24:18 +01:00
vc: hypervisor: qemu: Add rng device.
Kata Containers does not have provide a good entropy level, make use of a paravirtual rng device to solve this problem. Fixes: #445 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
@@ -81,6 +81,7 @@ const (
|
||||
qmpExecCatCmd = "exec:cat"
|
||||
|
||||
scsiControllerID = "scsi0"
|
||||
rngID = "rng0"
|
||||
)
|
||||
|
||||
var qemuMajorVersion int
|
||||
@@ -488,6 +489,11 @@ func (q *qemu) createSandbox() error {
|
||||
if ioThread != nil {
|
||||
qemuConfig.IOThreads = []govmmQemu.IOThread{*ioThread}
|
||||
}
|
||||
// Add RNG device to hypervisor
|
||||
rngDev := config.RNGDev{
|
||||
ID: rngID,
|
||||
}
|
||||
qemuConfig.Devices = q.arch.appendRNGDevice(qemuConfig.Devices, rngDev)
|
||||
|
||||
q.qemuConfig = qemuConfig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user