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

[FR] option to wrap hypervisor command in another command #176

Open
thkoch2001 opened this issue Dec 29, 2023 · 2 comments
Open

[FR] option to wrap hypervisor command in another command #176

thkoch2001 opened this issue Dec 29, 2023 · 2 comments

Comments

@thkoch2001
Copy link
Contributor

My use case for this would be the same as asked in #123:
I'd like to put a call to tmux in front of the qemu invocation, e.g.:

tmux [...] qemu-system-x86_64 [...]

This way I can have a dedicated persistent tmux session for VM consoles in the background and connect all VMs to this tmux session.

I'd propose a generic microvm option like wrapCommand that would be prefixed to the hypervisor controller command and default to an empty string.

@thkoch2001
Copy link
Contributor Author

thkoch2001 commented Jan 26, 2024

It's actually simple for my use case. Since I'm starting my microvm as a systemd service, I can just put the tmux call in front in the ExecStart line:

ExecStart=%h/.local/state/nix/profile/bin/tmux new-session -A -d -s microvm -n "%i" "exec %h/.local/state/nix/profile/bin/nix run --impure %h/.local/share/microvm/vms/%i/flake"

Tmux has a Recipes page. Would you accept something similar for the HTML docs where the above idea and others like #196 would find a home?

Update: I fixed the systemd config to work with multiple windows in the same tmux session: tmux/tmux#3824

@astro
Copy link
Owner

astro commented May 17, 2024

Perhaps the FAQ is the right place for a Pull Request?

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

No branches or pull requests

2 participants