33 Commits

Author SHA1 Message Date
ecb9f99b88 Add new windows installer and build
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:12:09 -05:00
6a3c28968e Drop stale config value resulting in asymmetric config
Fixes log follow operations since corresponding k8s-file backend was previously dropped

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 00:01:30 -05:00
c1480b39a9 Improved Windows compatibility for machine command
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2022-08-29 16:53:42 +03:00
d4c6e056db Fixes #15154 Change order when config and connections are written
When the break out or the WSL environment fails to start, the config
and connections should not be written. Placing them at the end of the
provisioning step will mitigate the issue.

[NO NEW TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
2022-08-05 11:14:58 +08:00
c5150a571e Add support, and default to rootless w/WSL prompt
Also force installation to use WSL2 to prevent accidental usage of WSL1

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-08-02 06:55:48 -05:00
bce16a58de Disable F36 service that is incompat with WSL kern
(requires psi)

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-08-02 06:55:48 -05:00
0f53abd093 Fixes #14698 Use prepared image for WSL2 machine init
This commit introduces a prepared image for setting up the WSL2
environment. This means that the deployment will take considerable
less time to finish (as it does not need to run an update and package
install), but also allows to rely on a cached image to re-init the
environment without the need for an internet connection.

[NO NEW TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
2022-07-13 17:19:38 -05:00
a46f798831 pkg: switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-08 08:54:47 +02:00
dd0418a5fe Merge pull request #14762 from ashley-cui/machinfo
Podman machine info
2022-07-07 15:17:40 +00:00
9d6efb3442 Podman machine info
Add podman machine info command, which displays infor about the machine
host as well as version info.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-07-05 15:18:41 -04:00
2f1075dfbd Implement proxy support for Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-07-01 16:34:24 -05:00
81153ffa21 Introduce 'Starting' status for machines
- The State() function now returns machine.Starting status instead of an
  empty string if the VM is in the process of starting.

- The `CheckExclusiveActiveVM()` function returns `true` to prevent
  starting a VM while another is in the process of starting.

- `podman machine ls` displays "Currently starting" under "Last Up" for
  the starting VM

- `podman machine ls` supports `{{.Starting}}` boolean field in the format

- `podman machine inspect` displays "starting" in the "State" field for
  the starting VM

Signed-off-by: Shane Smith <shane.smith@shopify.com>
2022-06-09 12:42:43 -04:00
429b1f7685 Fix codespell errors
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-25 05:56:29 -04:00
977cd9bd17 Update WSL machine OS to enable user lingering
Also migrate old machines that were missing this setting

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-05-15 13:35:46 -05:00
80744c6441 podman system reset removed machines incorrectly
podman system reset did not clean up machines fully, leaving some config
files, and breaking machines. Now it removes all machines files fully.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-05-04 10:31:42 -04:00
5b78f9576c Implement machine inspect for WSL
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-05-01 16:39:54 -05:00
2902d32c49 Refactor machine inspect
I was asked to refactor machine inspect output to represent more common
and basic information.  machine inspect now has information that would
be appropriate for different machines.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-28 13:32:21 -05:00
e7390f30b9 Allow changing of CPUs, Memory, and Disk Size
Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created.
Disk size can only be increased.

If one setting fails to be changed, the other settings will still be applied.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-27 13:56:14 -04:00
e7c30d855f Merge pull request #13996 from cdoern/machine
machine starting status
2022-04-26 09:08:31 -04:00
b0d36f6351 Implements Windows volume/mount support
Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for
both podman and Docker API clients.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-25 13:52:27 -05:00
d441a711e5 machine starting status
podman machine was using the file modification time to get the running status
add three new config entries Starting (bool) Created (time) LastUp (time) to actually
keep track of when these events happened. This means we can use the config file
to actually store this data and not mess up the created/last-up time.

This fixes the issues where the machine would report running 15 seconds before it was up.
Also fixes the issue of modifying the file manually and saying the machine is "up"

[NO NEW TESTS NEEDED]

resolves #13711

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-04-25 14:14:45 -04:00
1260bf631f Revert "Switch all rootful to rootfull"
This reverts commit cc3790f332d989440eb1720e24e3619fc97c74ee.

We can't change rootful to rootfull because `rootful` is written into the machine config. Changing this will break json unmarshalling, which will break existing machines.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 09:14:04 -04:00
cc3790f332 Switch all rootful to rootfull
We are inconsistent on the name, we should stick with rootfull.

[NO NEW TESTS NEEDED] Existing tests should handle this and no tests for
machines exists yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 17:05:16 -04:00
a4798ab4ef Respect "Rootful" when starting WSL API Forwarding
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-15 00:14:49 -05:00
8710197e85 Introduce machine inspect
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>
2022-04-12 15:51:39 -05:00
b60854e8bc Prefer registering both machine and global pipe
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-03-29 17:31:50 -04:00
d106b294b4 Switch all calls to filepath.Walk to filepath.WalkDir
WalkDir should be faster the Walk, since we often do
not need to stat files.

[NO NEW TESTS NEEDED] Existing tests should find errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-27 07:18:25 -04:00
50fbe52f49 Update to podman4 copr stream
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-02-16 03:49:17 -06:00
c74f8f04fd Introduce podman machine init --root=t|f and podman machine set --root=t|f
Switch default to rootless for mac and windows

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-02-16 03:49:17 -06:00
5736649eb8 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 09:52:12 -05:00
2d0b5ebb5b Implement API forwarding for podman machine on Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-01-19 13:03:49 -06:00
bd09b7aa79 bump go module to version 4
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>
2022-01-18 12:47:07 +01:00
803defbe50 Introduce Windows WSL implementation of podman machine
[NO NEW TESTS NEEDED] for now

Signed-off-by: Jason Greene <jason.greene@redhat.com>
2021-12-24 19:28:10 -06:00