Support virsh console through PVC command #149

Open
opened 2021-11-15 11:10:05 -05:00 by joshuaboniface · 4 comments

This was looked at briefly in the past, but I'd like to revisit it again as a QOL feature.

Currently, console logs can be viewed via the PVC API/CLI, but no interaction is possible.

It would be nice if we could interact with the console as well, a la virsh console.

Main difficulties are going to be (a) figuring out how to pass this data via the API, and (b) how to direct it at the right node.

This was looked at briefly in the past, but I'd like to revisit it again as a QOL feature. Currently, console logs can be viewed via the PVC API/CLI, but no interaction is possible. It would be nice if we could interact with the console as well, *a la* `virsh console`. Main difficulties are going to be (a) figuring out how to pass this data via the API, and (b) how to direct it at the right node.
joshuaboniface added the
CLI
API
feature
labels 2021-11-15 11:10:05 -05:00
joshuaboniface self-assigned this 2021-11-15 11:10:05 -05:00
Author
Owner

It looks like there is a python-native implementation of virsh console here:

https://github.com/libvirt/libvirt-python/blob/master/examples/consolecallback.py

And because of how we configure libvirt for live migration, it's possible to connect from the API node to the active node, e.g. hv1$ sudo virsh -c qemu+tcp://10.98.0.2:16509/system console ldap2

The big question would be how to leverage the API for bidirectional support between the CLI and the remote site in a sensible way.

It looks like there is a python-native implementation of virsh console here: https://github.com/libvirt/libvirt-python/blob/master/examples/consolecallback.py And because of how we configure libvirt for live migration, it's possible to connect from the API node to the active node, e.g. `hv1$ sudo virsh -c qemu+tcp://10.98.0.2:16509/system console ldap2` The big question would be how to leverage the API for bidirectional support between the CLI and the remote site in a sensible way.
Author
Owner

From some quick testing, the consolecallback script does not work properly - it prints no output and immediately exits on any input. This is also the only example I can find so far which does not bode well. Will continue to search and experiment.

From some quick testing, the consolecallback script does not work properly - it prints no output and immediately exits on any input. This is also the only example I can find so far which does not bode well. Will continue to search and experiment.
Author
Owner

Never did find any better solution here. Leaving as a future to-do to dig further into the callback.

Never did find any better solution here. Leaving as a future to-do to dig further into the callback.
joshuaboniface added this to the 1.0 milestone 2023-11-17 01:37:16 -05:00
Author
Owner

Investigated several options for this recently, taking inspiration from NoVNC. So far, none have proven particularly impressive but investigation can continue. This is a desired 1.0 feature.

Investigated several options for this recently, taking inspiration from NoVNC. So far, none have proven particularly impressive but investigation can continue. This is a desired 1.0 feature.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: parallelvirtualcluster/pvc#149
No description provided.