How to use Multipass, a new tool for launching virtual machines


If you want an easy-to-use VM manager for development and testing purposes, look no further than Canonical’s Multipass.

How to use Multipass, a new tool for launching virtual machines
If you want an easy-to-use VM manager for development and testing purposes, look no further than Canonical’s Multipass.
http://www.techrepublic.com/

In the never-ending quest to find the ideal method for launching virtual machines (VMs), there’s a new kid on the block named Multipass. This lightweight VM manager can be installed on Linux, Windows, and macOS, and is designed for developers to be able to launch a fresh Ubuntu environment with a single command.

For functionality, Multipass uses KVM on Linux, Hyper-V on Windows, and HyperKit on macOS. Multipass supports metadata for cloud-init, so it’s possible to simulate a small cloud deployment from your laptop or desktop.

I’m going to show you how to install Multipass on Pop!_OS Linux. You can easily install the tool on Windows or macOS in the usual fashion.

SEE: Serverless computing: A guide for IT leaders (TechRepublic Premium)

What you’ll need

How to install Multipass

We’ll be using snap to install Multipass. Log in to your Linux machine, open a terminal window, and issue the command:

sudo snap install multipass --classic --stable

The downloading and installation should take no more than a couple of minutes, depending on the speed of your network connection.

Once the snap package is installed, you’re ready to work with Multipass.

How to launch a virtual machine

The first thing you’ll want to do is find out what versions of Ubuntu are available for usage. For this, issue the command:

multipass find

You should see a listing of all the available Ubuntu images (Figure A).

Figure A

multipassb.jpg

A complete listing of the available images to be used.

Let’s say you want to launch an instance of the daily Ubuntu image (in this case 20.04). Do that with the command:

multipass launch daily:20.04

Once the instance has launched, it will report success and will list the name of the image you’ve launched (Figure B).

Figure B

multipassd.jpg

Model Guanaco has successfully launched.

You can then check to see that it’s running with the command:

multipass list

You should see model-guanaco listed as Running (Figure C).

Figure C

multipassf.jpg

Our new instance is running.

How to connect to a running virtual machine

Now that we have our VM running, we need to be able to connect to it (so we can actually use it). To do that, issue the command:

multipass shell model-guanaco

At this point, you’ll find yourself at the bash prompt of your newly launched Ubuntu VM (Figure D).

Figure D

multipassh.jpg

You can now start working with your Ubuntu 20.04 VM.

Once you’re connected, you can start installing the tools you need or go right to developing and testing. When you finish working, exit from the VM with the command:

exit

You can then stop and delete the instance with the commands:

multipass stop model-guanaco

Finally, you can delete the instance with the command:

multipass delete model-guanaco

And that’s all there is to installing and using the new Multipass VM manager. With this tool you can hone your Linux networking skills, test development, and much more. Give this tool a whirl and see if it doesn’t become your de facto standard dev VM tool.

Also see

ubuntuhero.jpg

Image: Jack Wallen



Source link




Leave a Reply

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