I wish to set the virtualized hardware time to a fixed value upon
bootup. In Qemu, this is easy:
qemu-kvm \
-rtc base=2011-11-11T11:11:00 \
…
However I fail to see a way of adding this to a guest
configuration in libvirt (v2.2.0). Some of the
parameters
of Qemu appear to be supported, but it would appear that date
is not among them. Is there another way?
Best Answer
Turns out libvirt supports direct passing of command line arguments to the Qemu backend. In order to “unlock” this functionality, one needs to include the relevant namespace in the guest definition:
Now one has access to the tag
commandline
. Inside it, arguments are specified using a series ofarg
elements:That end up being appended to Qemu’s
argv[]
.