From b5f54a9b23e8d9418700494da9aa78d8db354c43 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 15 Mar 2021 14:52:43 -0500 Subject: introduce podman machine podman machine allows podman to create, manage, and interact with a vm running some form of linux (default is fcos). podman is then configured to be able to interact with the vm automatically. while this is usable on linux, the real push is to get this working on both current apple architectures in macos. Ashley Cui contributed to this PR and was a great help. [NO TESTS NEEDED] Signed-off-by: baude --- docs/source/machine.rst | 6 ++- docs/source/markdown/podman-machine-create.1.md | 17 ++++--- docs/source/markdown/podman-machine-destroy.1.md | 65 ++++++++++++++++++++++++ docs/source/markdown/podman-machine-ssh.1.md | 33 ++++++++++++ docs/source/markdown/podman-machine.1.md | 2 + 5 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 docs/source/markdown/podman-machine-destroy.1.md create mode 100644 docs/source/markdown/podman-machine-ssh.1.md (limited to 'docs') diff --git a/docs/source/machine.rst b/docs/source/machine.rst index 5fdfef6b4..aefceb3a5 100644 --- a/docs/source/machine.rst +++ b/docs/source/machine.rst @@ -1,7 +1,9 @@ Machine ====== -:doc:`create ` Create a new virtual machine -:doc:`start ` Start a virtual machine +:doc:`create ` Create a new virtual machine +:doc:`destroy ` Destroy a virtual machine +:doc:`ssh ` SSH into a virtual machine +:doc:`start ` Start a virtual machine :doc:`stop ` Stop a virtual machine diff --git a/docs/source/markdown/podman-machine-create.1.md b/docs/source/markdown/podman-machine-create.1.md index 8282e3d56..1e199bb77 100644 --- a/docs/source/markdown/podman-machine-create.1.md +++ b/docs/source/markdown/podman-machine-create.1.md @@ -22,20 +22,21 @@ tied to the Linux kernel. Number of CPUs. -#### **--memory**, **-m**=*number* +#### **--ignition-path** -Memory (in MB). +Fully qualified path of the ignition file -#### **--kernel-path**=*path* +#### **--image-path** -Print usage statement. +Fully qualified path of the uncompressed image file -#### **--device**=_device_[**:**_permissions_] +#### **--memory**, **-m**=*number* + +Memory (in MB). -Add a device to the virtual machine. Optional *permissions* parameter -can be used to specify device permissions. **ro** means the device is read-only. +#### **--name** -Example: **--device=/dev/xvdc:ro**. +Name to assign to the VM #### **--help** diff --git a/docs/source/markdown/podman-machine-destroy.1.md b/docs/source/markdown/podman-machine-destroy.1.md new file mode 100644 index 000000000..7c5421418 --- /dev/null +++ b/docs/source/markdown/podman-machine-destroy.1.md @@ -0,0 +1,65 @@ +% podman-machine-destroy(1) + +## NAME +podman\-machine\-destroy - Destroy a virtual machine + +## SYNOPSIS +**podman machine destroy** [*options*] *name* + +## DESCRIPTION + +Destroy a virtual machine and its related files. What is actually deleted +depends on the virtual machine type. For all virtual machines, the generated +SSH keys and the podman system connection are deleted. The ignition files +generated for that VM are also destroyed as is its image file on the filesystem. + +Users get a display of what will be deleted and are required to confirm unless the option `--force` +is used. + + +## OPTIONS + +#### **--help** + +Print usage statement. + +#### **--force** + +Delete without confirmation + +#### **--save-ignition** + +Do not delete the generated ignition file + +#### **--save-image** + +Do not delete the VM image + +#### **--save-keys** + +Do not delete the SSH keys for the VM. The system connection is always +deleted. + +## EXAMPLES + +Destroy a VM named "test1" + +``` +$ podman machine destroy test1 + +The following files will be deleted: + +/home/user/.ssh/test1 +/home/user/.ssh/test1.pub +/home/user/.config/containers/podman/machine/qemu/test1.ign +/home/user/.local/share/containers/podman/machine/qemu/test1_fedora-coreos-33.20210315.1.0-qemu.x86_64.qcow2 +/home/user/.config/containers/podman/machine/qemu/test1.json + +Are you sure you want to continue? [y/N] y +``` + +## SEE ALSO +podman-machine (1) + +## HISTORY +March 2021, Originally compiled by Ashley Cui diff --git a/docs/source/markdown/podman-machine-ssh.1.md b/docs/source/markdown/podman-machine-ssh.1.md new file mode 100644 index 000000000..c0679347e --- /dev/null +++ b/docs/source/markdown/podman-machine-ssh.1.md @@ -0,0 +1,33 @@ +% podman-machine-ssh(1) + +## NAME +podman\-machine\-ssh - SSH into a virtual machine + +## SYNOPSIS +**podman machine ssh** *name* + +## DESCRIPTION + +SSH into a Podman-managed virtual machine. + +Podman on MacOS requires a virtual machine. This is because containers are Linux - +containers do not run on any other OS because containers' core functionality are +tied to the Linux kernel. + +## OPTIONS + +#### **--help** + +Print usage statement. + +## EXAMPLES + +``` +$ podman machine ssh myvm +``` + +## SEE ALSO +podman-machine (1) + +## HISTORY +March 2021, Originally compiled by Ashley Cui diff --git a/docs/source/markdown/podman-machine.1.md b/docs/source/markdown/podman-machine.1.md index 167a6a9e9..b31d8f788 100644 --- a/docs/source/markdown/podman-machine.1.md +++ b/docs/source/markdown/podman-machine.1.md @@ -14,6 +14,8 @@ podman\-machine - Manage Podman's virtual machine | Command | Man Page | Description | | ------- | ------------------------------------------------------- | ----------------------------- | | create | [podman-machine-create(1)](podman-machine-create.1.md) | Create a new virtual machine | +| destroy | [podman-machine-destroy(1)](podman-machine-destroy.1.md)| Destroy a virtual machine | +| ssh | [podman-machine-ssh.1.md(1)](podman-machine-ssh.1.md) | SSH into a virtual machine | | start | [podman-machine-start(1)](podman-machine-start.1.md) | Start a virtual machine | | stop | [podman-machine-stop(1)](podman-machine-stop.1.md) | Stop a virtual machine | -- cgit v1.2.3-54-g00ecf