goto cleanup;
}
- virBufferAsprintf(&buf, "rng-random,id=%s,filename=%s",
+ virBufferAsprintf(&buf, "rng-random,id=obj%s,filename=%s",
dev->info.alias, dev->source.file);
virCommandAddArg(cmd, "-object");
virCommandAddArgList(cmd, "-chardev", backend, NULL);
virCommandAddArg(cmd, "-object");
- virCommandAddArgFormat(cmd, "rng-egd,chardev=char%s,id=%s",
+ virCommandAddArgFormat(cmd, "rng-egd,chardev=char%s,id=obj%s",
dev->info.alias, dev->info.alias);
break;
}
if (dev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
- virBufferAsprintf(&buf, "virtio-rng-ccw,rng=%s", dev->info.alias);
+ virBufferAsprintf(&buf, "virtio-rng-ccw,rng=obj%s,id=%s", dev->info.alias, dev->info.alias);
else if (dev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390)
- virBufferAsprintf(&buf, "virtio-rng-s390,rng=%s", dev->info.alias);
+ virBufferAsprintf(&buf, "virtio-rng-s390,rng=obj%s,id=%s", dev->info.alias, dev->info.alias);
else if (dev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO)
- virBufferAsprintf(&buf, "virtio-rng-device,rng=%s", dev->info.alias);
+ virBufferAsprintf(&buf, "virtio-rng-device,rng=obj%s,id=%s", dev->info.alias, dev->info.alias);
else
- virBufferAsprintf(&buf, "virtio-rng-pci,rng=%s", dev->info.alias);
+ virBufferAsprintf(&buf, "virtio-rng-pci,rng=obj%s,id=%s", dev->info.alias, dev->info.alias);
if (dev->rate > 0) {
virBufferAsprintf(&buf, ",max-bytes=%u", dev->rate);
-net user,vlan=0,name=hostnet0 -serial pty -chardev pty,id=charconsole1 \
-device virtconsole,chardev=charconsole1,id=console1 \
-device virtio-balloon-device,id=balloon0 \
--object rng-random,id=rng0,filename=/dev/random \
--device virtio-rng-device,rng=rng0
+-object rng-random,id=objrng0,filename=/dev/random \
+-device virtio-rng-device,rng=objrng0,id=rng0
-net user,vlan=0,name=hostnet0 -serial pty -chardev pty,id=charconsole1 \
-device virtconsole,chardev=charconsole1,id=console1 \
-device virtio-balloon-device,id=balloon0 \
--object rng-random,id=rng0,filename=/dev/random \
--device virtio-rng-device,rng=rng0
+-object rng-random,id=objrng0,filename=/dev/random \
+-device virtio-rng-device,rng=objrng0,id=rng0
-net user,vlan=0,name=hostnet0 -serial pty -chardev pty,id=charconsole1 \
-device virtconsole,chardev=charconsole1,id=console1 \
-device virtio-balloon-device,id=balloon0 \
--object rng-random,id=rng0,filename=/dev/random \
--device virtio-rng-device,rng=rng0
+-object rng-random,id=objrng0,filename=/dev/random \
+-device virtio-rng-device,rng=objrng0,id=rng0
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-chardev pty,id=charconsole0 \
-device virtconsole,chardev=charconsole0,id=console0 \
--object rng-random,id=rng0,filename=/dev/hwrng -device virtio-rng-s390,rng=rng0
+-object rng-random,id=objrng0,filename=/dev/hwrng \
+-device virtio-rng-s390,rng=objrng0,id=rng0
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-chardev pty,id=charconsole0 \
-device virtconsole,chardev=charconsole0,id=console0 \
--object rng-random,id=rng0,filename=/dev/hwrng -device virtio-rng-s390,rng=rng0
+-object rng-random,id=objrng0,filename=/dev/hwrng \
+-device virtio-rng-s390,rng=objrng0,id=rng0
-chardev pty,id=charconsole0 \
-device virtconsole,chardev=charconsole0,id=console0 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a \
--object rng-random,id=rng0,filename=/dev/hwrng \
--device virtio-rng-ccw,rng=rng0,devno=fe.0.0002
+-object rng-random,id=objrng0,filename=/dev/hwrng \
+-device virtio-rng-ccw,rng=objrng0,id=rng0,devno=fe.0.0002
-S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object rng-random,id=rng0,filename=/dev/random \
--device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x7
+-object rng-random,id=objrng0,filename=/dev/random \
+-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-chardev socket,id=charrng0,host=1.2.3.4,port=1234 \
--object rng-egd,chardev=charrng0,id=rng0 \
--device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4
+-object rng-egd,chardev=charrng0,id=objrng0 \
+-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x4
-M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object rng-random,id=rng0,filename=/dev/random \
--device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x7 \
+-object rng-random,id=objrng0,filename=/dev/random \
+-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 \
-chardev socket,id=charrng1,host=1.2.3.4,port=1234 \
--object rng-egd,chardev=charrng1,id=rng1 \
--device virtio-rng-pci,rng=rng1,bus=pci.0,addr=0x4
+-object rng-egd,chardev=charrng1,id=objrng1 \
+-device virtio-rng-pci,rng=objrng1,id=rng1,bus=pci.0,addr=0x4
-S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object rng-random,id=rng0,filename=/dev/hwrng \
--device virtio-rng-pci,rng=rng0,max-bytes=123,period=1234,bus=pci.0,addr=0x4
+-object rng-random,id=objrng0,filename=/dev/hwrng \
+-device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.0,addr=0x4