Science and technology

Run a Linux digital machine in Podman

Fedora CoreOS is an mechanically updating, minimal rpm-ostree-based working system for working containerized workloads securely and at scale.

Podman “is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers. Podman is based on libpod, a library for container lifecycle management.”

Magical issues occur if you use Podman Machine, a function that helps you create a fundamental Fedora CoreOS digital machine (VM) to make use of with containers and containerized workloads.

Getting began with Podman Machine

The first step is to put in Podman. If you have already got the newest model of Podman put in, you may skip the step. On my Fedora 34 machine, I put in Podman with:

$ sudo dnf set up podman

I am utilizing podman-Three.2.2-1.fc34.x86_64.

Initializing a Fedora CoreOS

Once Podman is put in, initialize it with:

❯ podman machine init vm2
Downloading VM picture: fedora-coreos-34.20210626.1.Zero-qemu.x86_64.qcow2.xz: accomplished  
Extracting compressed file

This command creates vm2 and downloads Fedora CoreOS’s qcow2 file in .xz format and extracts it.

Listing your VMs

It’s at all times necessary to know your VMs and their standing, and the record command helps with that. The following instance exhibits the names of all my VMs, the date they had been created, and the final time they had been up:

❯ podman machine record  
NAME                    VM TYPE         CREATED         LAST UP
podman-machine-default*  qemu           6 days in the past      Currently working
vm2                     qemu            11 minutes in the past  11 minutes in the past

Starting a VM

To begin a VM, run:

❯ podman machine begin
Waiting for VM …

SSHing into the VM

You can use safe shell (SSH) to entry your VM and use it to run workloads with none setup hassles:

❯ podman machine ssh  
Connecting to vm podman-machine-default. To shut connection, use `~.` or `exit`
Fedora CoreOS 34.20210611.1.Zero
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://dialogue.fedoraproject.org/c/server/coreos/
 
Last login: Wed Jun 23 13:23:36 2021 from 10.Zero.2.2
[core@localhost ~]$ uname -a
Linux localhost 5.12.9-300.fc34.x86_64 #1 SMP Thu Jun Three 13:51:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[core@localhost ~]$

Currently, Podman solely helps working one VM at a time.

Stopping your VM

To cease a working VM, use the cease command:

❯ podman machine cease

[core@localhost ~]$ Connection to localhost closed by distant host.
Connection to localhost closed.
Error: exit standing 255

I hope this helps you get began with Podman Machine. Give it a strive, and tell us what you suppose within the feedback.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular

breakingExpress.com features the latest multimedia technologies, from live video streaming to audio packages to searchable archives of news features and background information. The site is updated continuously throughout the day.

Copyright © 2017 Breaking Express, Green Media Corporation

To Top