Commit graph

90 commits

Author SHA1 Message Date
Paul Holzinger ee039b7403
Remove rootless_networking option from containers.conf
This field was only needed for machine to force cni, however you can set
netns="bridge" in the config to have the same effect. This is already
done in the machine setup.

see https://github.com/containers/common/pull/895

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-20 19:08:15 +01:00
Jason T. Greene 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
Valentin Rothberg 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
Andrzej Klajnert 420303b943 Recursively copy cert files.
[NO NEW TESTS NEEDED]

Signed-off-by: Andrzej Klajnert <github@aklajnert.pl>
2022-01-15 12:47:49 +01:00
OpenShift Merge Robot cb06133d42
Merge pull request #12835 from baude/issue12815
Wait for podman stop to complete
2022-01-13 00:34:19 +01:00
Brent Baude b7fe25dc28 Wait for podman stop to complete
if users run podman machine stop && podman machine ls, the status of the
machine in the subsequent ls command would running.  now we wait for
everything to complete for stop so that scripting is more accurate.

Fixes: #12815

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-01-12 14:51:25 -06:00
Daniel J Walsh 6e208c2226
add additional fields to podman machine ls --json
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-11 16:42:56 -05:00
Aditya Rajan a95c01e0e4
pkg: use PROXY_VARS from c/common
Signed-off-by: Aditya Rajan <arajan@redhat.com>
2022-01-11 00:46:10 +05:30
Aditya Rajan a8b02cf4bf
ignition: add support from setting SSL_CERT_FILE
Podman often has to run behind an http/https proxy, often in corporate environments.
This proxy may or may not include SSL inspection capabilities, requiring a trusted SSL CA certificate to be added to a system's trust store.

Copy the file referred to by SSL_CERT_FILE on the host into the podman machine's OS trust store, overriding the built-in single-file trust store certificate.

Also set the `SSL_FILE_CERT` on remote machine

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2022-01-11 00:46:06 +05:30
Aditya Rajan 5c363ff276
ignition: propogate HTTP proxy variables from host to remote
Podman often has to run behind an http/https proxy, often in corporate environments.
This proxy may or may not include SSL inspection capabilities, requiring a trusted SSL CA certificate to be added to a system's trust store.

Solve this by reading standard proxy variables (HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy) and injecting them into the machine at init.

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2022-01-11 00:45:54 +05:30
OpenShift Merge Robot d627528192
Merge pull request #11454 from afbjorklund/virtfs-volumes
Implement virtfs volumes for podman machine
2022-01-06 21:04:12 +01:00
Anders F Björklund 6630e5cf66 Make it possible to select the volume driver
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>
2021-12-30 13:47:16 +01:00
Anders F Björklund a3326e23d8 Check the mount type for future compatibility
There are other mount types available, such as NFS or SMB,
or one could use reverse sshfs for better compatibility.

It could either be a global option, or it could perhaps be
overridden for each volume (like the container volumes).

Refactor the creation of the options string or array.

Allow specifying the volume as read-only, if desired.

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:37:34 +01:00
Anders F Björklund 8e7eeaa4dd Implement virtfs volumes for podman machine
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>
2021-12-30 13:36:56 +01:00
Aditya Rajan f21744939c
ignition: add certs from current user into the machine while init
Following PR ensures that certs from `~/.config/containers/certs.d` or `~/.config/docker/certs.d`
are copied into the remote machine at `/etc/containers/certs.d/`

As a result on platforms like `macOS` where podman works with a remote
machine setup. User's local certs must be transferd to VM without any
plumbing needed by user.

[NO-NEW-TESTS-NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-27 16:09:02 +05:30
Jason T. Greene 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
Brent Baude a86495ea6f Set machine timezone
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>
2021-12-16 12:40:20 -06:00
Valentin Rothberg 9a10e2124b systemd: replace multi-user with default.target
Replace `multi-user.target` with `default.target` across the code base.
It seems like the multi-user one is not available for (rootless) users
on F35 anymore is causing issues in all kinds of ways, for instance,
enabling the podman.service or generated systemd units.

Fixes: #12438
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-30 14:37:25 +01:00
OpenShift Merge Robot 93510e8d26
Merge pull request #12314 from Luap99/machine-wait-sshd
podman machine start wait for ssh
2021-11-18 22:00:18 +01:00
etenzy 010bee04c3 fix: take absolute path for dd on apple silicon
Fixes #12329

[NO NEW TESTS NEEDED] podman machine

Signed-off-by: Michael Rödel <hello@mroedel.de>
2021-11-17 17:02:04 +01:00
Paul Holzinger 8ca300ae94
podman machine start wait for ssh
Wait for sshd to be ready before we return from start. This should make
podman machine ssh immediately available without any race conditions.

Fixes #11532

[NO NEW TESTS NEEDED] I could not reproduce the issue so I am not sure
if this fixes it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-16 16:08:40 +01:00
Paul Holzinger 295d87bb0b
podman machine improve port forwarding
This commits adds port forwarding logic directly into podman. The
podman-machine cni plugin is no longer needed.

The following new features are supported:
 - works with cni, netavark and slirp4netns
 - ports can use the hostIP to bind instead of hard coding 0.0.0.0
 - gvproxy no longer listens on 0.0.0.0:7777 (requires a new gvproxy
   version)
 - support the udp protocol

With this we no longer need podman-machine-cni and should remove it from
the packaging. There is also a change to make sure we are backwards
compatible with old config which include this plugin.

Fixes #11528
Fixes #11728

[NO NEW TESTS NEEDED] We have no podman machine test at the moment.
Please test this manually on your system.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-15 15:20:47 +01:00
Anders F Björklund 6e6388eac4 Make stop message more similar to start
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-11-02 22:26:04 +01:00
OpenShift Merge Robot 09efcd48a8
Merge pull request #12090 from afbjorklund/image-stream
Record the image stream along with the path
2021-10-29 20:22:29 +00:00
Anders F Björklund 864748df5b Record the image stream along with the path
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-10-26 21:58:39 +02:00
Matej Vasek 38c78381ca Set DOCKER_HOST in the VM
[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-10-23 02:42:29 +02:00
Daniel J Walsh 50b9d82f2e
Don't use docker/pkg/archive, use containers/storage/pkg/archive
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-14 10:28:42 -04:00
OpenShift Merge Robot 324871d451
Merge pull request #11802 from flouthoc/podman-machine-rm-cleanup
machine: silently cleanup dangling sockets before `rm` if possible
2021-10-01 10:21:13 -04:00
Aditya Rajan 642d682998
machine: silently cleanup dangling sockets before rm if possible
Try to cleanup dandling pid and machine socket if possible silently
before `rm`.

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-30 22:38:13 +05:30
Aditya Rajan 5a33b7aef8
machine: Info on successfully stopping qemu machine
Spit info log whenever we successfully stop qemu machine for ack.
Closes: https://github.com/containers/podman/issues/11542

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-30 16:16:07 +05:30
OpenShift Merge Robot d987f26f1e
Merge pull request #11703 from n1hility/disable-fcos-moby
[NO TESTS NEEDED] Disable docker and alias to podman in FCOS ignition
2021-09-29 13:29:04 -04:00
Jason T. Greene b3307bc9ca Disable docker and alias to podman in FCOS ignition
Signed-off-by: Jason Greene <jason.greene@redhat.com>
Co-authored-by: Dusty Mabe <dusty@dustymabe.com>
2021-09-24 15:08:57 -05:00
OpenShift Merge Robot 1dba601b56
Merge pull request #11691 from afbjorklund/machine-list
Add more information about the VM to podman machine list
2021-09-22 18:47:48 -04:00
OpenShift Merge Robot f342784ce5
Merge pull request #11701 from ashley-cui/stream
Fix machine image
2021-09-22 18:44:47 -04:00
Daniel J Walsh 1c4e6d8624
standardize logrus messages to upper case
Remove ERROR: Error stutter from logrus messages also.

[ NO TESTS NEEDED] This is just code cleanup.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:29:34 -04:00
Ashley Cui f5f95d722f Fix machine image
Make sure setting machine image to `testing` pulls down the testing
stream, and not the next stream

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-22 14:38:24 -04:00
Anders F Björklund 0baee2cc33 Also show the (initial) disk size
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:16 +02:00
Anders F Björklund 911298252a Show cpus and memory in machine list
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:07 +02:00
baude 952fc4a6f9 Use new aarch64 fcos repos
Now that aarch64 fcos is an official thing, we no longer need to use the side repo (for lack of a better word).  We can now use the same image lookup technique as x86_64.  I removed the special lookup, moved the x86_64 lookup to generic arch, and removed the arch specific files that we no longer needed.

[NO TESTS NEEDED]

Signed-off-by: baude <baude@redhat.com>
2021-09-14 09:52:31 -05:00
Hyeon Kim 072b061b4e
Search gvproxy with config.FindHelperBinary()
Closes #11531

[NO TESTS NEEDED]

Signed-off-by: Hyeon Kim <simnalamburt@gmail.com>
2021-09-14 17:14:55 +09:00
OpenShift Merge Robot f07a2bfbec
Merge pull request #11440 from ashley-cui/ssh
Use default username for podman machine ssh
2021-09-13 14:34:29 -04:00
Valentin Rothberg 5bf2201447 machine: set filemodes in octal
By popular request, turn decimals to octal.  Most eyes are trained to
parse file permissions in octal.

[NO TESTS NEEDED] since machine isn't tested yet.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-10 12:50:28 +02:00
Valentin Rothberg 6f36a47ac2 podman machine: enforce a single search registry
Enforce "docker.io" to be the only search registry.  Short-name
resolution for remote clients is not fully supported since there is no
means to prompt.  Enforcing a single registry  works around the problem
since prompting only fires with more than one search registry.

Fixes: #11489
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-10 12:43:07 +02:00
OpenShift Merge Robot cd43cf8d58
Merge pull request #11453 from jonpspri/qemu-apple-silicon-bios-fd
QEMU Apple Silicon: Find BIOS FD wherever
2021-09-08 10:25:22 +02:00
OpenShift Merge Robot c9646b5126
Merge pull request #11437 from MichaelAnckaert/fix-11418
[NO TESTS NEEDED] Fix #11418 - Default TMPDIR to /tmp on OS X
2021-09-07 18:48:26 +02:00
OpenShift Merge Robot b07e735661
Merge pull request #11434 from coypoop/patch1
Spell "build linux darwin" as "build !windows".
2021-09-07 17:27:45 +02:00
Jonathan Springer 8b4f99ac20 QEMU Apple Silicon: Find BIOS FD wherever
QEmu normally install BIOS images under `/usr/local` prefix, but
Homebrew installs them under `/opt/homebrew`.  This change searches both
locations and then puts back to an unpathed name if it doesn't find the
BIOS.  (I imitated other architectures' implemenations in that failback
behavior.)

[NO TESTS NEEDED]

Signed-off-by: Jonathan Springer <jonpspri@gmail.com>
2021-09-07 09:01:26 -04:00
OpenShift Merge Robot 668deb2ff1
Merge pull request #11442 from scottschreckengaust/main
Adding `-cpu host` for qemu for MacOS
2021-09-07 13:12:40 +02:00
Scott Schreckengaust 57133bb334 Fix warning of unsupported feature on MacOS
Adding the `-cpu host` option to the `addArchOptions` function for
darwin removes the warning message, "host doesn't support requested
feature: CPUID.80000001H:ECX.svm [bit 2]" by qemu-system-x86_64 when
using the `podman machine start` command on MacOS

Closes #11421

[NO TESTS NEEDED]

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
2021-09-06 09:55:24 -07:00
Jonathan Springer c01f7725a5 TCG Accel fallback for Apple Silicon. Iss #10577
Cause qemu to fall back to using TCG acceleration when HVP acceleration
is not available on Darwin Aarch64.  Qemu prints a warning which it is
desirable to leave to embarrass the upstream Qemu into approving the HVF
patches.

[NO TESTS NEEDED]

Signed-off-by: Jonathan Springer <jspringer@us.ibm.com>
Signed-off-by: Jonathan Springer <jonpspri@gmail.com>
2021-09-05 12:31:36 -04:00