Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log applicable 'virt-install' command #1736

Open
martinpitt opened this issue Jul 23, 2024 · 4 comments
Open

log applicable 'virt-install' command #1736

martinpitt opened this issue Jul 23, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@martinpitt
Copy link
Member

Discussed in cockpit-project/cockpit#20793

Originally posted by paul-hammant July 20, 2024
Page: Create VM

Cockpit would be even better if each UI-creation of a VM logged the equivalent virt-install command used. This would serve as education for users, such that they could transition to scripted creation of VMs. There logs are created for "New machine qemu-NUMBER-NAME" but none of the command used. I realize that cockpit does not shell out to virt-install specifically, but the equivalent command with arg would be great.

Same would be true for podman containers :)

@martinpitt martinpitt added the enhancement New feature or request label Jul 23, 2024
@martinpitt martinpitt transferred this issue from cockpit-project/cockpit Jul 23, 2024
@martinpitt
Copy link
Member Author

@paul-hammant : Cockpit-machines actually does call out to virt-install: https://github.com/cockpit-project/cockpit-machines/blob/main/src/scripts/install_machine.py.

With window.debugging = "machines" you can get the install_machine.py command line, but not directly the virt-install command line. That also wouldn't be quite sufficient, as there is some extra XML preparation that needs to be done. But let's leave this open as an enhancement proposal.

@paul-hammant
Copy link

Thanks. I type window.debugging = "machines" into Inspector->Console for the page that has the "Create new virtual machine" overlay up in it? Or that's something I do in qemu.conf that the Python script you link to uses?

@martinpitt
Copy link
Member Author

@paul-hammant (Sorry, missed your reply); yes, that goes into the browser inspector. But as I said, this isn't quite sufficient, as it doesn't show the virt-install invocation. This is a hard problem, as there just is no single virt-install command which would reproduce the VM -- it needs the additional XML preparation/modification logic.

@paul-hammant
Copy link

No worries about having more valuable things to do, sir.

I think Proxmox is in the same place - some of the more advanced network stuff has to be done in other config files however simple pct-create is at the outset.

Circling back to KVM ecosystem, I played with Zig and AI for making some of the config in an article - https://paulhammant.com/2024/04/12/playing-with-zig - and of course that is too buggy to use real work and ended up being more about Zig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants