INGInious icon indicating copy to clipboard operation
INGInious copied to clipboard

[base/kvm] Add KVM enabled base container

Open nrybowski opened this issue 1 year ago • 2 comments

This PR adds a new base container able to launch a specific Linux kernel within a KVM. New grading environments should inherit from this container as it is the case for the base container. Task leveraging such grading environments must support the SSH feature of INGInious.

TODO

  • [x] Patch virtme to enable port forwarding for telnet
  • [x] Add a 'KVM' label in the base container to dynamically enable KVM passthrough on the Agents
  • [x] Add 'KVM' flag to Docker Agent
    • [x] Check if KVM is enabled on the Agent environment
  • [x] Automate KVM launch in student container
  • [x] Automate shell redirection to KVM in student container
  • [x] Hardcode qemu-kvm src rpm url
  • [ ] Add documentation

TODO in further PRs

  • Use serial port to spawn a shell (see virtme) in the VM rather than using telnet and port forwarding
  • Log the commands typed in the telnet shell as here

https://github.com/UCL-INGI/INGInious/blob/a9962cad2a18caf87a73f10c627fc98f561f0e6c/base-containers/base/inginious_container_api/utils.py#L79

Such logs could be used in further grading scripts.

nrybowski avatar May 23 '23 22:05 nrybowski

This PR should solve https://github.com/UCL-INGI/INGInious/issues/939.

nrybowski avatar May 24 '23 11:05 nrybowski

Some slowness is observed during the execution of a simple mininet command such as mn --switch lxbr --topo tree,depth=2,fanout=8 --test pingall at the startup of the fifth switch. The VM has two cores and 256Mo of RAM but none of those ressources are used at their maximum. Further investigation is required but do not prevent the integration of this feature which is anyway still experimental.

nrybowski avatar May 26 '23 13:05 nrybowski