Re: The number of Post-launch RTVM


Zou, Terry
 

Yes, it is doable to modify default ‘Hybrid RT scenario’ and add more pre-launched RTVMs. Actually the max number of pre-launched RTVMs is limited by your platform resource capability: only support partition/pass-through CPU cores, Ethernet, storage to each pre-launched VMs... But in post-launched RTVM, technically you still have the possibility to share some resources (not critical to RT performance) between RTVMs, e.g., storage, and the PM/VM management could also be in service OS.

So only if you have high isolation, safety and RT performance concerns, e.g., keep RTVM alive even Service OS reboot, for multi-RTVM, I may suggest you launch more post-launched RTVMs to both have resource sharing flexibility and device pass-through performance.  

Anyway @Jianjie, if you want to try multiply pre-launched RTVMs, just let us know your detailed failure step/git-issue if happens, we will analysis and help you move forward😊

 

Best & Regards

Terry

From: acrn-users@... <acrn-users@...> On Behalf Of Geoffroy Van Cutsem
Sent: Monday, July 26, 2021 11:25 PM
To: acrn-users@...
Subject: Re: [acrn-users] The number of Post-launch RTVM

 

Hi Jianjie Lin, Terry,

 

@Terry, I’m not quite sure how to interpret your response regarding the max number of pre-launched RTVMs. You say we have one predefined in one of our scenario, but I think what Jianjie wanted to know is if he could modify it or create a new scenario and put multiple pre-launched RTVMs?

 

The code at the moment only supports one Kata Container. But when I dug into why, it appears that it should be fairly easily doable to change that. It comes down to how UUIDs are handled in the ACRN – Kata code, it’s essentially using only one UUID for Kata but I couldn’t find any reason why the code couldn’t be improved to essentially use any other UUID. There is, in fact, the list of all ACRN predefined UUIDs in the Kata Container ACRN driver code – see https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/acrn.go#L58-L80. I filed an issue/feature request for this a while ago (back in April), see https://github.com/projectacrn/acrn-hypervisor/issues/5966. If you’re interested in digging into this to improve the situation, this would be very welcome 😉

 

A Kata Container VM today will start as a standard post-launched VM. I do not know if it would be possible to improve the code to make it run an RTVM. I guess it would, and in that case, it would also be useful to have some sort of control for the user to state whether he wants a Kata Container to run as a standard or RTVM. When I was thinking about that previously, I was missing the use-case behind it. What I mean is that people who want to run RTVMs do not typically want to orchestrate them, and to me this is the biggest advantage of using Kata: it’s a different way of starting a VM and one that allows tools that are typically used for containers such as Docker, Kubernetes, etc.

 

As a word of caution: I do not believe there are many eyes looking at the Kata implementation in ACRN so you may come across some bugs if you try with the latest releases. If that happens, please report those so they can be investigated!

Cheers,

Geoffroy

 

From: acrn-users@... <acrn-users@...> On Behalf Of Zou, Terry
Sent: Monday, July 26, 2021 4:56 am
To: acrn-users@...
Subject: Re: [acrn-users] The number of Post-launch RTVM

 

Hi Jianjie,

Thanks for your interests with ACRN hypervisor. For VM configuration, we have several pre-defined scenarios in: https://projectacrn.github.io/latest/introduction/index.html#id3, and the most flexible scenario is ‘industry’ scenario, it runs up to 8 VMs including Service VM, so 7 Users VMs in this config.

Specific to RTVM, the max number is also limited by your target platform capability, you know to secure RT performance, RTVM may need dedicated CPU Core (2 cores for Preempt RT), and pass-through Ethernet, even disc.

 

  1. Does acrn have any number limitation of pre-launch RTVM?

//Terry: Usually only one Pre-launch RTVM, refer to ‘Hybrid RT scenario’ in: https://projectacrn.github.io/latest/introduction/index.html#hybrid-real-time-rt-scenario  

  1. Does acrn have any number limitation of post-launch RTVM?

//Terry: According to your platform CPU core number and pass-through devices, usually up to 3~4 post-RTVMs, with 8 cores and 4 ethernet ports.

  1. Does acrn have any number limitation of kata-containers?

//Terry: there is one kata-container VM in ‘industry scenario’: https://projectacrn.github.io/latest/tutorials/run_kata_containers.html#run-kata-containers.

  1. What’s the difference between pre-launch RTVM and Post-launch RTVM, since they both can access the hardware directly?

//Terry: From pass-through device perspective, they are all isolated in pre and post-launch RTVM.  From OS severity perspective, post-VM is launched/managed by service OS, but Pre-launch RTVM could be still alive/working even when Service OS reboot with abnormal failures.

  1. Can Kata-container also be possible for real time?

//Terry: Basically Kata-container may not secure the certainty/latency of RT task, so only user level applications e.g., AI computing workload, are recommended in container.

 

Best & Regards

Terry

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jianjie Lin
Sent: Friday, July 23, 2021 10:06 PM
To: acrn-users@...
Subject: [acrn-users] The number of Post-launch RTVM

 

Hello ACRN community,

 

We have a project about the Hypervisor, and we require some Real time VMs. After reading the documentation from the acrn project. I have some understanding questions:

 

  1. Does acrn have any number limitation of pre-launch RTVM?
  2. Does acrn have any number limitation of post-launch RTVM?
  3. Does acrn have any number limitation of kata-containers?
  4. What’s the difference between pre-launch RTVM and Post-launch RTVM, since they both can access the hardware directly?
  5. Can Kata-container also be possible for real time?

 

Thank you very much for your reply, and explanations. Thank you.

 

Mit freundlichen Grüßen

Jianjie Lin

 

Join {acrn-users@lists.projectacrn.org to automatically receive all group messages.