Commit Graph

74 Commits

Author SHA1 Message Date
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
OpenShift Merge Robot bbd03df3e1
Merge pull request #11439 from coypoop/libvirt-unused
Remove unused stubs intended to start a machine with libvirt
2021-09-04 15:01:29 +02:00
Michael Anckaert e151f4c9f7 Fix #11418 - Default TMPDIR to /tmp on OS X
Signed-off-by: Michael Anckaert <michael.anckaert@sinax.be>
2021-09-04 08:40:57 +02:00
Ashley Cui 7a667c4ac3 Use default username for podman machine ssh
When using the defaut conection for podman machine ssh, use the default
username too.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-03 16:40:13 -04:00
Maya Rashish 274a3bc80b Remove unused stubs intended to start a machine with libvirt
[NO TESTS NEEDED]

Signed-off-by: Maya Rashish <maya@NetBSD.org>
2021-09-03 22:43:38 +03:00
Maya Rashish 8d9e19b035 Spell "build linux darwin" as "build !windows".
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>
2021-09-03 13:38:14 +03:00
Guillaume Rose 90998176d9 machine: always check error of net.Dial, even after last try
When net.Dial always fail in the above loop, the code following the loop
is executed. This error check prevents this.

[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-09-03 09:10:35 +02:00
Brent Baude a2a166345e clean up socket and pid files from podman machine
to avoid segvs, we should clean up as much of the socket and regular
files from podman machine as possible on stop.  also, on start, we
should add logic to remove these files before starting in case the start
process is stopped prematurely (due to an error for example).

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-30 12:29:06 -05:00
Ashley Cui 3f22e52964 Allow setting of machine stream and image path from containers.conf
Default is "testing"

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-08-24 14:18:55 -04:00
Guillaume Rose b19812b5a2 machine: compute sha256 as we read the image file
It avoids to have the full file in memory.

[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-08-19 16:54:50 +02:00
Guillaume Rose 0434571920 machine: check for file exists instead of listing directory
[NO TESTS NEEDED]

Signed-off-by: Guillaume Rose <gurose@redhat.com>
2021-08-19 16:54:44 +02:00
Brent Baude 9fc9465630 Set gvproxy path to /usr/libexec/podman/gvproxy
We have reverted the previous patches to look for the gvproxy binary in
/usr/lib/podman and have again decided to use /usr/libexec/podman

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-12 09:11:09 -05:00
Brent Baude 643178c1ec Revert "Use static path for gvproxy"
This reverts commit 4acc1d6850.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-11 14:39:00 -05:00
Brent Baude e52187e7fe show podman machine ssh command line
A user contributed a one line PR that enabled logging the podman machine
ssh command for debug. The user was not able to complete the submission
so this PR replaces that.

[NO TESTS NEEDED]

Replaces #10798

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-05 12:38:21 -05:00
Brent Baude 4acc1d6850 Use static path for gvproxy
Given that we do not want to support gvproxy for anything other than
podman machine, we have decided to use a static path of
/usr/lib/podman/gvproxy instead of a lookpath.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-03 09:25:06 -05:00
baude 0c9dc86dea Create podman temp dir on machine start
If the tempdir for the OS does not have a podman/, machine start will fail.  An example would be after a reboot.  We now create the podman dir if it does not exist.

Fixes #10824

[NO TESTS NEEDED]

Signed-off-by: baude <baude@baudes-Mac-mini.localdomain>
Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-07-02 12:41:51 -05:00
Paul Holzinger c3a14103fb Fix build tags for pkg/machine...
Podman machine is only intended for amd64 and arm64 architectures, set
the correct buildtags so that the `pkg/machine`, `pkg/machine/qemu` and
`pkg/machine/libvirt` packages compile correctly.

[NO TESTS NEEDED]

Fixes #10625

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-06-10 10:25:16 +02:00