projectacrn / acrn-hypervisor

Project ACRN hypervisor
BSD 3-Clause "New" or "Revised" License
1.13k stars 516 forks source link

Decouple libvirt with acrnctl and support all acrnctl functionality on virsh (Phase 1) #5921

Open NanlinXie opened 3 years ago

NanlinXie commented 3 years ago
  1. Decouple libvirt with acrnctl and support some acrnctl’s functionality on virsh
  2. Enable guest auto-boot in ACRN libvirt
Acrnctl command Libvirt functionality Libvirt Features in ACRN v2.7
acrnctl add define Yes
acrnctl del undefine Yes
acrnctl list list Yes
acrnctl start start Yes
acrnd autostart Yes

NanlinXie commented 3 years ago

[External_System_ID] ACRN-6920

NanlinXie commented 3 years ago

Doc Impact Analysis:

gvancuts commented 3 years ago

There are a few tutorials that reference acrnctl: "S5 enabling", "Kata Containers" and "OpenStack/libvirt"

Kata implementation also uses acrnctl so if we plan to deprecate or make the tool a debug tool like it was originally intended to be, we'll need to make adjustements to the Kata implementation and user guide.

NanlinXie commented 2 years ago

Postpone to v2.8

dbkinder commented 2 years ago

@NanlinXie Is this still a v2.8 target?

NanlinXie commented 2 years ago

We will not drop acrnctl in v2.8, thus there's no change for v2.8 document.

NanlinXie commented 2 years ago

GSG document need to be updated after this patch, we need add addtional library dependency at build time. sudo apt-get install libcjson-dev

gvancuts commented 2 years ago

I do not believe any documentation has been updated to reflect this change from acrnctl to virsh.

fuzhongl commented 2 years ago

@NanlinXie The linked JIRA is in Resolved status; Could you help to check if this task is done? Thanks!

wuxyintel commented 2 years ago

There are a few tutorials that reference acrnctl: "S5 enabling", "Kata Containers" and "OpenStack/libvirt", Kata implementation also uses acrnctl so if we plan to deprecate or make the tool a debug tool like it was originally intended to be, we'll need to make adjustments to the Kata implementation and user guide. @gvancuts please help double check my comments below, thanks! (1) In this phase, we only update libvirt to provide related virsh commands to implement acrnctl functionality. acrnctl functions still works. (2) For document "OpenStack/libvirt", I just remove acrnctl installation since libvirt doesn't depend on it. https://github.com/projectacrn/acrn-hypervisor/pull/7166 (3) For document "S5 enabling", current libvirt can't shutdown WaaG since user VM name is hard coded in the lifecycle manager of windows, I think we can update this after this bug is fixed. The related github issue will be created soon. (4) Kata is still use acrnctl, I think to another issue to track kata updates such as ("decouple kata with acrnctl"), BTW, kata can interact with the current DM directly now.

gvancuts commented 2 years ago

There are a few tutorials that reference acrnctl: "S5 enabling", "Kata Containers" and "OpenStack/libvirt", Kata implementation also uses acrnctl so if we plan to deprecate or make the tool a debug tool like it was originally intended to be, we'll need to make adjustments to the Kata implementation and user guide. @gvancuts please help double check my comments below, thanks! (1) In this phase, we only update libvirt to provide related virsh commands to implement acrnctl functionality. acrnctl functions still works. (2) For document "OpenStack/libvirt", I just remove acrnctl installation since libvirt doesn't depend on it. #7166 (3) For document "S5 enabling", current libvirt can't shutdown WaaG since user VM name is hard coded in the lifecycle manager of windows, I think we can update this after this bug is fixed. The related github issue will be created soon. (4) Kata is still use acrnctl, I think to another issue to track kata updates such as ("decouple kata with acrnctl"), BTW, kata can interact with the current DM directly now.

The list looks good to me. Can you tell me more about the Kata Containers status and ACRN. It used to use acrnctl to do the blkrescan operation and that was needed to run this. Have the changes for this landed yet?

Which version of virsh is used in our testing? Is that coming from the Ubuntu repo or it's built with the acrn-libvirt stuff?

wuxyintel commented 2 years ago

There are a few tutorials that reference acrnctl: "S5 enabling", "Kata Containers" and "OpenStack/libvirt", Kata implementation also uses acrnctl so if we plan to deprecate or make the tool a debug tool like it was originally intended to be, we'll need to make adjustments to the Kata implementation and user guide. @gvancuts please help double check my comments below, thanks! (1) In this phase, we only update libvirt to provide related virsh commands to implement acrnctl functionality. acrnctl functions still works. (2) For document "OpenStack/libvirt", I just remove acrnctl installation since libvirt doesn't depend on it. #7166 (3) For document "S5 enabling", current libvirt can't shutdown WaaG since user VM name is hard coded in the lifecycle manager of windows, I think we can update this after this bug is fixed. The related github issue will be created soon. (4) Kata is still use acrnctl, I think to another issue to track kata updates such as ("decouple kata with acrnctl"), BTW, kata can interact with the current DM directly now.

The list looks good to me. Can you tell me more about the Kata Containers status and ACRN. It used to use acrnctl to do the blkrescan operation and that was needed to run this. Have the changes for this landed yet?

I remember currently kata containers fails to run on ACRN, for old Kata code, it still use "acrnctl' to do "blkrescan". I think kata code will be refined to use command monitor to do "blkrescan" after v3.0.

Which version of virsh is used in our testing? Is that coming from the Ubuntu repo or it's built with the acrn-libvirt stuff?

The "virsh" tool should be built from "acrn-libvirt" for our testing, the version is 6.1.0.

NanlinXie commented 2 years ago

@gvancuts , could we close this issue now ?

gvancuts commented 2 years ago

@gvancuts , could we close this issue now ?

Not yet :-)

We need more documentation on what the tool does, how it's used, etc.

gvancuts commented 2 years ago

Hi @fuzhongl , this can be closed once the documentation is in place, I don't recall seeing it, have I missed it?