summaryrefslogtreecommitdiff
path: root/cmd/podman/machine
Commit message (Collapse)AuthorAge
* Add --quiet to machine lsBrent Baude2022-04-16
| | | | | | | | | | | | | The podman machine ls command would benefit from a --quiet flag which would only print the machine names without the extra information. It also implies --noheader as well. This can be helpful for scripting with the podman cli. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Add container.conf default volume to initBrent Baude2022-04-14
| | | | | | | | | | | containers.conf now has a default volumes field for podman machine. this pr inserts those values as the default volumes in init. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Introduce machine inspectBrent Baude2022-04-12
| | | | | | | | | | | | Allow users to inspect their podman virtual machines. This will be helpful for debug and development alike, because more details about the machine can be collected. Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Machine refactor - part 1Brent Baude2022-03-28
| | | | | | | | | | | | | | | | the way machine was written was very adjunct and as such is in dire need of refactoring to better structures and structure methods where appropriate. the weekest part is specifically around all the files that machine requires and how some are just dynamically built on the fly. this pr defines a new machinefile type which allows us to work with the file and also takes into account the use of symlinks which are going to be needed on macos due to its relatively short file length restriction. also, added unit tests for new methods as well as anywhere else I saw a need. Signed-off-by: Brent Baude <bbaude@redhat.com>
* Run codespell to cleanup typosDaniel J Walsh2022-03-25
| | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* machine-set: fix example for setting rootful flagAditya R2022-03-24
| | | | | | | | | | | | Flag is actually named `rootful` however documented as `root`, fix the documented example as actual flag. Both `podman machine init` and `podman machine set` uses flag `rootfull` [NO TESTS NEEDED] [NO NEW TESTS NEEDED] Signed-off-by: Aditya R <arajan@redhat.com>
* fix a number of errcheck issuesValentin Rothberg2022-03-22
| | | | | | Numerous issues remain, especially in tests/e2e. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Fix type-o and cleanup doc punctuationJason T. Greene2022-03-18
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Merge pull request #13523 from n1hility/tolerate-old-machineOpenShift Merge Robot2022-03-18
|\ | | | | Tolerate old machine images, but warn they should be recreated
| * Handle incompatible machinesJason T. Greene2022-03-18
| | | | | | | | | | | | Start in a reduced mode for recovery, warn, and provide instructions to recreate them Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | go fmt: use go 1.18 conditional-build syntaxValentin Rothberg2022-03-18
|/ | | | Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* machine rm -f stops and removes machineBrent Baude2022-03-08
| | | | | | | | | | | | If you want to remove a running machine, you can now pass the --force/-f to podman machine rm and the machine will be stopped and removed without confirmations. Fixes: #13448 [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Introduce podman machine init --root=t|f and podman machine set --root=t|fJason T. Greene2022-02-16
| | | | | | Switch default to rootless for mac and windows Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* Implement API forwarding for podman machine on WindowsJason T. Greene2022-01-19
| | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* bump go module to version 4Valentin Rothberg2022-01-18
| | | | | | | | | | | | | Automated for .go files via gomove [1]: `gomove github.com/containers/podman/v3 github.com/containers/podman/v4` Remaining files via vgrep [2]: `vgrep github.com/containers/podman/v3` [1] https://github.com/KSubedi/gomove [2] https://github.com/vrothberg/vgrep Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* add additional fields to podman machine ls --jsonDaniel J Walsh2022-01-11
| | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #12806 from rhatdan/machine1Daniel J Walsh2022-01-11
|\ | | | | It takes some time to start a VM
| * It takes some time to start a VMDaniel J Walsh2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | We are seeing some issues with users not understanding which VM they are starting, and if the VM takes a long time to start, they do not know where to look. Moving the name to before the VM starts at least allows them to realize they are starting the wrong VM. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Pretty Print output of podman machine ls --format jsonDaniel J Walsh2022-01-11
|/ | | | | | | | Make JSON more prominent in podman machine ls --help and man page. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Make it possible to select the volume driverAnders F Björklund2021-12-30
| | | | | | | | | | Use the same type of mounts for all the machine volumes. The default could change in the future, depending on OS. [NO NEW TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Implement virtfs volumes for podman machineAnders F Björklund2021-12-30
| | | | | | | | | | | | | | | | Allow using the built-in 9pfs feature of qemu, mounting host directories into vm mountpoints. The volumes are generic, the mounts are specific. Wait for the machine to be "running", otherwise the SSH function might throw an error instead. Increase the default msize from 8 KiB to 128 KiB [NO NEW TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Introduce Windows WSL implementation of podman machineJason T. Greene2021-12-24
| | | | | | [NO NEW TESTS NEEDED] for now Signed-off-by: Jason Greene <jason.greene@redhat.com>
* Set machine timezoneBrent Baude2021-12-16
| | | | | | | | | | | | | | Added an option to podman machine init to declare the timezone of the resulting machine. the default is to use the value of the host name or else a given timezone name like America/Chicago. Fixes: #11895 Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Refactor podman image command outputJhon Honce2021-12-02
| | | | | | | | | | | Leverage new report.Formatter allowing better compatibility from podman command output. Follow on PR's will cover containers, etc. See #10974 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Make stop message more similar to startAnders F Björklund2021-11-02
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Record the image stream along with the pathAnders F Björklund2021-10-26
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Not all fields in machine list were set properlyAnders F Björklund2021-10-08
| | | | | | | | | When using custom output formats like table, some of the booleans introduced for json format were not initialized correctly (wrong). [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Allow machine options to be set from containers.confAshley Cui2021-09-27
| | | | | | | | | CPUS, memory, disk size, and image path defaults can be set from [machine] table in containers.conf [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* Vendor in containers/common v0.46.0Daniel J Walsh2021-09-27
| | | | | | | | | | Fixes: https://github.com/containers/podman/issues/11745 [NO TESTS NEEDED] Since this is just a revendor and a one line change for the revendor Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Add completion for machine list formatAnders F Björklund2021-09-23
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Add JSON version of the machine listAnders F Björklund2021-09-23
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Also show the (initial) disk sizeAnders F Björklund2021-09-22
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Show cpus and memory in machine listAnders F Björklund2021-09-22
| | | | | | [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* Add podman machine init --now optionDaniel J Walsh2021-09-19
| | | | | | | | | | | | | | | | Once we have this option, the new documentation from users becomes a little simpler. brew install podman podman machine init --now podman run ... --now option is based off of `systemctl enable XYZ.service --now` [NO TESTS NEEDED] The infrastructure has not been setup yet to test podman machine init. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add username flag for machine sshAshley Cui2021-09-17
| | | | | | | | | | allow users to specify what username to use when ssh-ing into the vm. If the username flag is set, the username will be the flag value. If the flag is not set and the the vm name is specified, the default user of the vm will be used. if the flag is not set, and the vm name is not specified, then the username of the default connection will be used. Signed-off-by: Ashley Cui <acui@redhat.com>
* Merge pull request #11440 from ashley-cui/sshOpenShift Merge Robot2021-09-13
|\ | | | | Use default username for podman machine ssh
| * Use default username for podman machine sshAshley Cui2021-09-03
| | | | | | | | | | | | | | When using the defaut conection for podman machine ssh, use the default username too. Signed-off-by: Ashley Cui <acui@redhat.com>
* | Add 'Machine %q started' message when podman machine start successfulDaniel J Walsh2021-09-08
| | | | | | | | | | | | | | | | | | | | | | Currently users are confused if podman machine prints warnings about whether or not podman machine was successful. Printing this message clears up the confusion. [NO TESTS NEEDED] Since we don't have a way to test podman machine in ci/cd system Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #11434 from coypoop/patch1OpenShift Merge Robot2021-09-07
|\ \ | | | | | | Spell "build linux darwin" as "build !windows".
| * | Spell "build linux darwin" as "build !windows".Maya Rashish2021-09-03
| |/ | | | | | | | | | | | | | | | | Equivalent for supported platforms, and makes it easier to support additional unix-like OSes. [NO TESTS NEEDED] Signed-off-by: Maya Rashish <maya@NetBSD.org>
* / [#11408] podman help machine initjesperpedersen2021-09-02
|/ | | | | | Signed-off-by: jesperpedersen <jesper.pedersen@redhat.com> [NO TESTS NEEDED]
* Allow setting of machine stream and image path from containers.confAshley Cui2021-08-24
| | | | | | Default is "testing" Signed-off-by: Ashley Cui <acui@redhat.com>
* Scrub podman commands to use report packageJhon Honce2021-06-16
| | | | | | | | | | | | | | | | Refactor podman commands that have drifted from using c/common report pkg. Report pkg is needed to implement go template functions. Removed obsolete code from podman which exists in c/common. Latest template library added default newlines and method to remove them. Incorporated needed changes in c/common PR below. Depends on https://github.com/containers/common/pull/624 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1855983 Signed-off-by: Jhon Honce <jhonce@redhat.com>
* [Techinal Debt] Cleanup ABI vs. Tunnel CLI commandsJhon Honce2021-05-27
| | | | | | | | | | | | | | | | | | [NO TESTS NEEDED] This commit cleans up two issues: * Most commands support all EngineModes so default to that. Let outlayers declare their intent. * Use cobra.Annotations to set supported EngineMode. This simplies instantiating commands as there is now one method to communicate a commands requirements rather than two. * Combined aliased commands into one file * Fixed aliased commands where Args field did not match * Updated examples in README.md for writing commands * Remove redundant flag DisableFlagsInUseLine in cobra.Command initialization. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* Check if another VM is running on machine startAshley Cui2021-04-28
| | | | | | | | Only one VM can be up at a time. If another VM is running, or the current VM is running, error out on a podman machine start [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* Merge pull request #9495 from rhatdan/groupsOpenShift Merge Robot2021-04-22
|\ | | | | Add '--group-add keep-groups': supplementary groups into container
| * Fixes from make codespellDaniel J Walsh2021-04-21
| | | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Add --noheading flag to all list commandsDaniel J Walsh2021-04-21
|/ | | | | | | | | | Currently we have only podman images list --noheading. This PR Adds this option to volumes, containers, pods, networks, machines, and secrets. Fixes: https://github.com/containers/podman/issues/10065 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Fix panic when not giving a machine name for sshAnders F Björklund2021-04-09
| | | | Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
* fix machine naming conventionsbaude2021-04-05
| | | | | | | | try to align the machine commands and their usage descriptions. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>