VOOZH about

URL: https://thenewstack.io/use-podman-to-create-and-work-with-virtual-machines/

⇱ Use Podman to Create and Work with Virtual Machines - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-04-06 06:00:36
Use Podman to Create and Work with Virtual Machines
Cloud Native Ecosystem / Containers / Linux

Use Podman to Create and Work with Virtual Machines

Red Hat's Podman can not only be used to manage containers, but it is handy for building and maintaining virtual machines as well.
Apr 6th, 2024 6:00am by Jack Wallen
👁 Featued image for: Use Podman to Create and Work with Virtual Machines
Feature image via Podman site.

When you think of Red Hat’s Podman, one thing comes to mind: containers. That’s because Podman was created as a tool for creating and managing containerized applications and services.

But Podman has another trick up its sleeve. With the help of the QEMU emulator, Podman is capable of creating a basic Fedora CoreOS virtual machine that can be used for containers, containerized workloads or for the development of such containerized applications (so long as they work within the realm of Fedora CoreOS).

For those who aren’t familiar with Fedora CoreOS, it was created specifically to be optimized to run containerized applications. Fedora CoreOS was initially released on Nov. 6, 2003, and has been steadily growing since. As the name implies, Fedora CoreOS is kept to a bare minimum by design, so it only has what you need.

Podman makes deploying Fedora CoreOS virtual machines a breeze. By doing this, you don’t have to worry about pulling down the latest version of Fedora CoreOS from Docker Hub or any other third-party repository. That means the virtual machines are clean.

But how do you start working with these virtual machines? Let me show you how.

What You’ll Need

To work with Podman Machines, you’ll want to have a Ubuntu-based Linux distribution. Although the version of Podman on RHEL-based distributions supports the Machines command, it’s not currently possible to install the necessary QEMU software to make it work. That’s why I’m going to focus my demonstration on Ubuntu. You’ll also need a user with sudo privileges for the installation.

That’s it. Let’s make some VM magic.

Installing Podman and the Requirements

Ubuntu doesn’t ship with Podman installed. The good news is that it can be installed from the standard repositories. So log into your Ubuntu system, open a terminal window, and install Podman with the command:

sudo apt-get install podman -y

You’ll be prompted for your user password in order to gain admin privileges. Once that installation is complete, you’ll then need to install the required QEMU software, which is accomplished with the command:

sudo apt-get install qemu-system -y

When that completes, there’s one (or two) more step(s) you must take. First, download the gvproxy file and save it to the proper location with the command:

Finally, you need to make sure the KVM kernel module is loaded, which means the machine you’re running on must support KVM. This can be done with one of the following:

sudo modprobe kvm-intel
sudo modprobe kvm-amd

You’re now ready to move on to creating your first Fedora CoreOS virtual machine.

Deploying a Virtual Machine

Podman virtual machines are managed with the podman machine command (along with various options). First, view the current machines with the command:

podman machine list

You shouldn’t see any virtual machines listed because we haven’t created any. To create your first VM, you initialize it with the command:

podman machine init

The above command will create a new VM with a randomly generated name. You can also generate one with a user-specified name like this:

podman machine init NAME

Where NAME is the name of the machine you want to deploy.

Now, if you view the available VMs (with the command podman machine list), you should see one listed, either with a randomly generated or user-created name.

Let’s say you created a new VM called vm1. To start that machine, issue the command:

podman machine start vm1

The virtual machine will start, and when you receive your prompt back, you’re ready to go.

SSH into Your Virtual Machine

With the virtual machine running, it’s now time to access it, which is done via SSH. Before you try to run the standard ssh command, that’s not how it works in this case. To SSH into your virtual machine, you run the command:

podman machine ssh NAME

Where NAME is the name of the virtual machine. If you didn’t supply a name when you created the VM, you could simply issue the command:

podman machine ssh

At this point, you’ll find yourself inside the running virtual machine, where you can start developing your containerized application. When you’re finished, you can exit from the machine with the command:

exit

Finally, you can stop the virtual machine with the command:

podman machine stop

Of course, if you gave the VM a custom name, that command would be:

podman machine stop NAME

Where NAME is the name of the machine you wish to stop.

You can deploy as many virtual machines as you like. I would recommend, however, that you always give your VM a unique identifying name to indicate the containerized app or service you’re building.

You can also delete a VM with the command:

podman machine rm NAME

Where NAME is the name of the VM you wish to delete.

And that, my friends, is all there is to deploying virtual machines with the Podman application.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
Red Hat is a sponsor of The New Stack. 
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.