Add podman machine restart subcommand#28687
Conversation
| **[podman(1)](podman.1.md)**, **[podman-machine(1)](podman-machine.1.md)** | ||
|
|
||
| ## HISTORY | ||
| March 2021, Originally compiled by Ashley Cui <acui@redhat.com> |
| The default machine name is `podman-machine-default`. If a machine name is not specified as an argument, | ||
| then `podman-machine-default` will be restarted. | ||
|
|
||
| Stopping an already stopped vm is not considered an error so running restart on a stopped vm just |
There was a problem hiding this comment.
| Stopping an already stopped vm is not considered an error so running restart on a stopped vm just | |
| Stopping an already stopped virtual machine is not considered an error so running restart on a stopped virtual machine just |
I realize this was probably a cut/paste form elsewhere, but we say "virtual machine" everywhere else in this doc, so we should be consistant.
| | ssh | [podman-machine-ssh(1)](podman-machine-ssh.1.md) | SSH into a virtual machine | | ||
| | start | [podman-machine-start(1)](podman-machine-start.1.md) | Start a virtual machine | | ||
| | stop | [podman-machine-stop(1)](podman-machine-stop.1.md) | Stop a virtual machine | | ||
| | restart | [podman-machine-restart(1)](podman-machine-restart.1.md) | Restart a virtual machine | |
There was a problem hiding this comment.
This needs to be in alpha order between reset and rm
|
@jaitjacob TYVM for the PR! It looks great overall. You should add a test or two if possible, and there are a few tweaks to do to the documenation. By far the best description I've seen on a PR in a very long time! |
Honny1
left a comment
There was a problem hiding this comment.
Thanks! At first glance, the code looks good. However, the PR is missing tests. Please implement e2e tests for machine. Here is an example you can use as a reference: https://github.com/containers/podman/blob/main/pkg/machine/e2e/start_test.go. You can add a restart_test.go file for this.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
Fixes #28366
This PR implements
podman machine restartsubcommand.Here's how I tested it,
podmanbinary usingmake BUILDTAGS="selinux seccomp" PREFIX=/usrcd bin/./podman machine restart --help& verify help text displays correctly../podman machine list./podman machine startuptime./podman machine restartuptimeagainI also built the docs locally and viewed in browser,
