[kata-dev] how to configure kata VM's RTCClock ?
Hunt, James O
james.o.hunt at intel.com
Thu Jun 3 08:12:34 UTC 2021
Hi Seong,
The runtime's virtcontainers package uses the govmm package [1] for clock handling. Although govmm provides the facility you want [2], the Kata runtime doesn't currently allow you to modify the clock [3] (since it is unusual to _not_ want the VM clock to be synchronised with the host).
Please raise an issue [4] so the idea can be discussed further so we can understand your use-case better (and let us know if you'd be prepared to help ;)
______
Note: This is *not* recommended, but if you _really_ want to change the clock and you fully understand the consequences, you could use the following non-invasive interpositioning trick:
1) Create a shell script (let's call it "qemu.sh") that:
- Reads all its cli arguments.
- Replaces the clock arguments with those that you want.
- Calls "exec /real/path/to/qemu/binary "$new_set_of_args" to launch the hypervisor with the modified options.
2) Change your configuration.toml to set hypervisor.qemu.path = "/path/to/qemu.sh"
Cheers,
James
[1] - https://github.com/kata-containers/govmm
[2] - https://github.com/kata-containers/govmm/blob/master/qemu/qemu.go#L2169..L2178
[3] - https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/qemu.go#L547..L551
[4] - https://github.com/kata-containers/kata-containers/issues/new/choose
---
https://katacontainers.io/ | https://github.com/kata-containers
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.
________________________________________
De : 문성 <seong at etri.re.kr>
Envoyé : jeudi 27 mai 2021 10:29
À : kata-dev at lists.katacontainers.io
Objet : [kata-dev] how to configure kata VM's RTCClock ?
It seems like the kata-runtime runs a VM's clock mode as host as default. It makes the VM's clock synchronize to the clock of host machine. On host, VM runs with this qemu parameters.
/usr/bin/qemu-vanilla-system-x86_64 … -rtc base=utc,driftfix=slew,clock=host
But, I'd like to configure the VM RTCClock as vm not host.
I've looked into the /usr/share/defaults/kata-containers/configuration.toml file. But I can't find any field which I can configure the RTCClock.
Are there any way to configure the VM's RTCClock in kata container ?
Or, Is there any reason that you wouldn't include configuration option for the RTCClock ?
regards.
seong.
[https://gov-dooray.com/mail-receipts?img=6436434963373952-255f2a776504dbd7-29e2f8796e08fa82-29e2fd060fc64c21.gif]
More information about the kata-dev
mailing list