Manage your Incus Server from Windows

Incus servers are normally managed from the Linux command line with the Incus Client and the command line client is installed as a part of an Incus server. Today we are going to explore the Incus client for Windows which supports both a CLI to manage Incus servers and the remote viewer for Incus virtual machines.

To install the Incus client for Windows you need to launch a Powershell session with administrator privilege. In the Powershell window, execute the following command to install the Incus client for Windows which as of this tutorial is v0.5.

winget install LinuxContainers.Incus

Before you can use the Incus client for Windows you must log out of your Windows session and log back in. It’s not necessary to reboot.

Once you are logged back in, start a user terminal (admin not necessary) and log into your Linux Incus host server with ssh (your server name will differ).

ssh vmsrain.

We need to have our Incus server “trust” the Windows machine so that the Windows machine can manage Incus. So, from the Linux terminal session we just started, I execute the following command and I am calling my windows machine “win11-desktop”, but you can call your Windows machine anything you want.

incus config trust add win11-desktop

Now open a second Powershell window where you will execute the following command. Adjust the name and IP address of your Incus server accordingly.

incus remote add vmsrain 172.16.1.51

Answer yes to the “fingerprint” question and go back to the terminal you started on your Incus server and select and copy the “trust token” value by selecting the text of the token and cutting it with a CTRL C:

Come back to the Powershell Terminal and paste the token and press enter. The token value is unique to the system that you are trusting and so your token will be different.

Now that the trust has been added, you can log out of your Incus server and exit out of that terminal.

Back on the remaining Windows Powershell terminal we can now issue Incus commands.

We can see which Incus servers that we can administer with the following command. Note: Additional trusts must be added to allow this Windows machine to manage other Incus servers that you might have.

incus remote list

By default, your management context is the local Windows machine. Although we have an Incus client installed on Windows, there is no Incus server for Windows. So, we must change our management context to an Incus server.

incus remote switch vmsrain

At this point, all Incus commands that you can do on an Incus server will work from the incus client in Windows.

For example, I can create and start an Incus Virtual Machine with the following command.

incus launch images:ubuntu/22.04/desktop --vm test

Since the Incus client for Windows has its own “remote viewer”, I can display the GUI interface of the Incus VM with this command:

incus console test --type=vga

You can normally connect to the non-GUI console of any incus container or incus VM with the shell command:

incus shell test

However, this command is not available in the incus client for Windows. Instead, use the following command:

incus exec test bash

image

As shown in the video, you can add additional incus servers as required.

The incus client for Windows provides an easy way to administer an Incus server from Windows.