summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/machine.go
Commit message (Collapse)AuthorAge
* Merge pull request #12835 from baude/issue12815OpenShift Merge Robot2022-01-13
|\ | | | | Wait for podman stop to complete
| * Wait for podman stop to completeBrent Baude2022-01-12
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* 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>
* Check the mount type for future compatibilityAnders F Björklund2021-12-30
| | | | | | | | | | | | | | | | 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>
* 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>
* podman machine improve port forwardingPaul Holzinger2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Merge pull request #11802 from flouthoc/podman-machine-rm-cleanupOpenShift Merge Robot2021-10-01
|\ | | | | machine: silently cleanup dangling sockets before `rm` if possible
| * machine: silently cleanup dangling sockets before rm if possibleAditya Rajan2021-09-30
| | | | | | | | | | | | | | | | | | Try to cleanup dandling pid and machine socket if possible silently before `rm`. [NO TESTS NEEDED] Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | machine: Info on successfully stopping qemu machineAditya Rajan2021-09-30
|/ | | | | | | | | 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>
* Merge pull request #11691 from afbjorklund/machine-listOpenShift Merge Robot2021-09-22
|\ | | | | Add more information about the VM to podman machine list
| * 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>
* | Merge pull request #11701 from ashley-cui/streamOpenShift Merge Robot2021-09-22
|\ \ | | | | | | Fix machine image
| * | Fix machine imageAshley Cui2021-09-22
| |/ | | | | | | | | | | | | 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>
* / standardize logrus messages to upper caseDaniel J Walsh2021-09-22
|/ | | | | | | | 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>
* Search gvproxy with config.FindHelperBinary()Hyeon Kim2021-09-14
| | | | | | | | Closes #11531 [NO TESTS NEEDED] Signed-off-by: Hyeon Kim <simnalamburt@gmail.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>
* | 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>
* / machine: always check error of net.Dial, even after last tryGuillaume Rose2021-09-03
|/ | | | | | | | | 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>
* clean up socket and pid files from podman machineBrent Baude2021-08-30
| | | | | | | | | | | 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>
* 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>
* Set gvproxy path to /usr/libexec/podman/gvproxyBrent Baude2021-08-12
| | | | | | | | | 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>
* Revert "Use static path for gvproxy"Brent Baude2021-08-11
| | | | | | | | This reverts commit 4acc1d685066faa1dc102532ba76a81d3ec6bdc0. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* show podman machine ssh command lineBrent Baude2021-08-05
| | | | | | | | | | | | 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>
* Use static path for gvproxyBrent Baude2021-08-03
| | | | | | | | | | 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>
* Create podman temp dir on machine startbaude2021-07-02
| | | | | | | | | | | 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>
* Fix build tags for pkg/machine...Paul Holzinger2021-06-10
| | | | | | | | | | | | 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>
* Enable port forwarding on hostBrent Baude2021-06-01
| | | | | | | | | | | Using the gvproxy application on the host, we can now port forward from the machine vm on the host. It requires that 'gvproxy' be installed in an executable location. gvproxy can be found in the containers/gvisor-tap-vsock github repo. [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* Add options to podman machine sshBrent Baude2021-05-27
| | | | | | | | | | | Add options to the podman machine ssh command that ignore hostkeychecking and hosts file -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no [NO TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@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>
* Add ssh connection to root userAshley Cui2021-04-01
| | | | | | | | | | When initing a VM, create two add connections - one to user, one to root. podman machine remove removes both connections as well. [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* Remove --execute from podman machine sshbaude2021-03-31
| | | | | | | | | | | The --execute flag ended up serving no purpose. It was removed and documentation was updated. Fixed a panic when no VM name was provided. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* Merge pull request #9888 from baude/machineignOpenShift Merge Robot2021-03-31
|\ | | | | podman machine init --ignition-path
| * podman machine init --ignition-pathbaude2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | | allow for the user to provide an alternate ignition-file rather than the auto-generated one. updated docs to describe ramifications of providing an alterate ignition file. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* | Merge pull request #9885 from ashley-cui/machinelsOpenShift Merge Robot2021-03-30
|\ \ | | | | | | Add podman machine ls
| * | Add podman machine listAshley Cui2021-03-30
| |/ | | | | | | | | | | | | | | | | | | podman machine list lists all virtual machines & indicates the default VM connection, if it exists. it also can take a --format flag arg as a go template. [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #9873 from baude/correctaarch64OpenShift Merge Robot2021-03-30
|\ \ | |/ |/| resolve proper aarch64 image names
| * resolve proper aarch64 image namesbaude2021-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | when automatically downloading fcos for the Apple M1, we needed to replace a statically defined URL with the dynamically determined one. also, it appears boolean qemu options `server` and `onwait` are not defined as `server=on` and `wait=off`. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* | podman machine init user inputbaude2021-03-29
|/ | | | | | | | | users may now provide a fully qualified local file path or a URL to seed the disk-image to be used in the VM. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* Podman machine enhancementsbaude2021-03-27
| | | | | | | | | | | | | | | | | | | Podman machine remove is now called `rm`. Podman machine create now supports resizing the image to the value of --disk-size as provided. The default is to 10G. Added systemd unit file on guest via ignition that sends a Ready message to the host over a virtio-socket so that we know when the VM is booted and ready for use. Podman machine commands no longer require a VM name as an argument. A default VM name is defined and if no VM name is provided as a arg, the default will be used. [NO TESTS NEEDED] Signed-off-by: baude <bbaude@redhat.com>
* Rename podman machine create to init and clean upAshley Cui2021-03-25
| | | | | | | | | | Rename podman machine create to init because we're initing a VM, not really creating it Wire up CPUs flag Suppress QEMU GUI from popping up when not in debug mode [NO TESTS NEEDED] Signed-off-by: Ashley Cui <acui@redhat.com>
* Improvements for machinebaude2021-03-25
| | | | | | clean up ci failures and add appropriate arch,os exclusion tags Signed-off-by: baude <bbaude@redhat.com>
* Add --execute flag to podman machine sshAshley Cui2021-03-25
| | | | | | --execute, -e allows to execute a command through ssh Signed-off-by: Ashley Cui <acui@redhat.com>