Hide Forgot
Description of problem: Attaching the Virtio-RNG with fails with "virsh attach-device test rng.xml --config" "error: Operation not supported: persistent attach of device 'rng' is not supported" Version-Release number of selected component (if applicable): libvirtd --version libvirtd (libvirt) 1.1.2 qemu-system-x86_64 --version QEMU emulator version 1.6.50, Copyright (c) 2003-2008 Fabrice Bellard How reproducible: Always Steps to Reproduce: 1. Create rng.xml 2. Run "virsh attach-device test rng.xml --config" cat rng.xml ----------- <rng model='virtio'> <backend model='random'>/dev/random</backend> </rng>
Feature added upstream with commits: commit 862473fa123a7445056c83a88b5209094be6c1f8 Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:38 2015 +0800 qemu: Implement random number generator hotunplug Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit 980b265d0849e19a9aeb1f88cb5545fc807963b9 Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:37 2015 +0800 qemu: Implement random number generator hotplug Export the required helpers and add backend code to hotplug RNG devices. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit fe6acfbd0e82cfcea7f29f51aaad258ba54e0ec0 Author: Peter Krempa <pkrempa> Date: Thu Feb 5 13:46:06 2015 +0100 qemu: Implement random number generator cold (un)plug Add support for using the attach/detach device APIs on the inactive configuration to add RNG devices. commit 37b620059bce0f931bf25f3b5ca087ec8cde1836 Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:32 2015 +0800 conf: Add helpers to insert/remove/find RNG devices in domain def The helpers will be useful when implementing hotplug and coldplug of random number generator devices. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit ad3e99e21b08e136fa4f1b745b37b80064dc7ad9 Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:36 2015 +0800 audit: export virDomainAuditRNG Signed-off-by: Luyao Huang <lhuang> commit 25e2d897881875be32bc96cc5987fae641768eee Author: Peter Krempa <pkrempa> Date: Tue Feb 3 10:31:33 2015 +0100 qemu: command: Refactor creation of RNG device commandline As the RNG device is using an -object as backend refactor the code to use the JSON to commandline generator so that we can reuse the code later in hotplug. commit b9f2d781d936febb21503b07c82ccbe65872195f Author: Peter Krempa <pkrempa> Date: Tue Feb 3 10:26:40 2015 +0100 qemu: command: Break some very long lines in qemuBuildRNGDevStr() commit d7ec244f6eefbb2badbecd56bac9a1d0584c6e2f Author: Peter Krempa <pkrempa> Date: Tue Feb 3 10:14:42 2015 +0100 qemu: command: Shuffle around formatting of alias for RNG device backend Move the alias name right after the object type for rng-egd backend so that we can later use the JSON to commandline generator to create the command line. commit 98e982b455d081dad08c1dd285582a0df8e4888b Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:34 2015 +0800 qemu: command: Make RNG backend device IDs unique Libvirt didn't prefix the random number generator backend object alias with any string thus the device alias and object alias were identical. To avoid possible problems, rename the alias for the backend object and tweak tests to comply with the change. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit 58a4eee81ab11789c0466e9f41d5d32e95f55e4f Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:31 2015 +0800 qemu: refactor qemuBuildRNGDeviceArgs to allow reuse in RNG hotplug Rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change the return type so that it can be reused in the device hotplug code later. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit 3921d1358122768d78131b3a0bfc31ddbec43ebd Author: Luyao Huang <lhuang> Date: Sat Jan 17 13:09:30 2015 +0800 qemu: Add helper to assign RNG device aliases This function is used to assign an alias for a RNG device. It will be later reused when hotplugging RNGs. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Peter Krempa <pkrempa> commit c88b323bf5d5a070c074fda7adc11085f14415ce Author: Peter Krempa <pkrempa> Date: Wed Jan 21 15:41:44 2015 +0100 conf: Introduce helper to find duplicate device address When adding devices to the definition it's useful to check whether the devices don't reside on a conflicting address. This patch adds a helper that iterates all device info and compares the addresses with the given info. The feature will be included in the next upstream release.