Add LXC shell via ssh and pct enter
Press t on a running container to suspend the TUI and run `ssh -t root@<node> pct enter <vmid>`. cv4pve-cli has no shell or exec for LXC, so this goes around it and needs key-based root SSH to the PVE node. - VMs, stopped containers and busy guests get a warning instead. - Only exit code 255 (ssh failed) is reported as an error. Other codes are the last status of the container's shell. - OSError is caught inside suspend(). Textual's suspend() has no try/finally, so an exception escaping it would leave the app suspended. - The guest table reloads when the shell returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
62b79ab29e
commit
40feb125b4
4 files changed
+272
-1
No files matched your search
@@ -20,10 +20,13 @@ uv run cv4pve-tui
|
||||
| `x` | stop - hard power-off (confirm) |
|
||||
| `r` | reboot (confirm) |
|
||||
| `e` | edit cores / memory / grow a disk (disk growth asks again; it cannot be undone) |
|
||||
| `t` | shell in a running LXC container (`ssh -t root@<node> pct enter <vmid>`) |
|
||||
| `g` | refresh |
|
||||
| `c` | switch cv4pve-cli context (cluster) |
|
||||
| `q` | quit |
|
||||
|
||||
The shell key needs key-based root SSH to the PVE node (LXC only).
|
||||
|
||||
Switching context runs `cv4pve-cli config use`, which changes cv4pve-cli's global current
|
||||
context: other shells and scripts follow, and it stays after the app exits.
|
||||
|
||||
|
||||
Reference in new issue
Block a user