Multipass, virtualization on personal devices

Virtualization is not a new technology. It has been used for decades and I can’t imagine any organization that doesn’t use virtualization nowadays. IT administrators are even using virtualization on their notebook.

Popular virtualization tools

Tools that are widely used for virtualization on personal systems are VMware Workstation, Oracle Virtualbox, maybe even Hyper-V virtualization. On macOS systems Parallels Desktop is a popular one. Virtual machines are running for testing or developing purposes.
Besides testing on local resources many administrators are creating cloud resources in Azure, GCP or AWS for their testing activities.

Personally, I am using Parallels Desktop on my Macbook for running a few Windows desktops. Mostly used for applications that won’t run on a Mac. I am thinking about Microsoft Visio or Project.
For generic testing purposes, I use Ubuntu Multipass.

Multipass

Multipass is a tool to quickly create Ubuntu virtual machines. Multipass makes it easy to create and manage virtual Ubuntu machines… See the blogpost on the latest features on https://ubuntu.com/blog/multipass-1-11-brings-enhanced-performance-for-ubuntu-on-mac-and-windows.

Multipass is limited to just Ubuntu images, but the tool offers different images for different purposes.

Viewing all images

Using the command ‘multipass find’, all available images are displayed… These can contain different versions of Ubuntu, but also images with some software preinstalled.

Creating a new virtual machine

A new virtual machines can be created with a single command. For example the command ‘multipass launch -n test-instance 22.10’ will create and start a new instance with the name test-instance using the image 22.10.

When the image is used for the first time, it will be downloaded from the remote repository.

When the virtual machine is created succesfully, the prompt will return. The command ‘multipass list’ will generate an overview of all available (created) instances. In my case, the list consists of some powered-off instances, as well as the newly created instance.

Accessing an instance

To access an instance, you issue the command “multipass shell test-instance”. When entered, you will have a ssh session using the account ubuntu.

I don’t know what the password is for this account. I usually copy the contents of my id_rsa.pub into the authorized_keys of the virtual machine, so I can login passwordless using normal ssh session without the shell function of multipass.

Stopping and deleting VMs

Virtual machines are easily stopped and deleted when not needed anymore.

Just issue ‘multipass stop test-instance’ and ‘multipass delete-instance’.

Of course, you can retain your VMs to use them another time.

Managing VMs using GUI

When virtual machines are created, they can be started en stopped using a graphical user interface. This interface also allows you to connect to the shell of a virtual machine.


Posted

in

by

Tags:

Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.