How can I create a template HVM of any OS?

Hello everybody. I have installed Manjaro Linux in a standalone HVM, but my original plan was to create a template VM and use it to create a VM based on that template. But it looks like (at least on GUI) I am unable to create a VM with a operating system of my choice, and use it as a template. Is there any way to make my standalone Manjaro HVM a template VM, or Qubes was not made for that?

You cant do this after the fact.
You need to create a templateVM from the start.
At the command line:
qvm-create -C TemplateVM ....
Configure it as hvm, and allocate memory, etc as usual.
Install whatever you like.

NB - If you donā€™t make use of the private storage, then any qubes using
the template will be effectively disposable.

1 Like

Ehhhhh Iā€™m feeling so stupid right now heheā€¦ I first tried to do this writing

qvm-create --class StandaloneVM --label <label> --property virt_mode=hvm <vmname>

Witch I have read here: Standalones and HVMs | Qubes OS

But it was not working. But now you told me to use qvm-create, so I decided to try again and it worked! And you know what I was doing wrong? I typed

--label <black>

and

virt_mode=hvm <ManjaroTemplate>

instead of

--label black

and

virt_mode=hvm ManjaroTemplate

.

I was typing the <> keys!!!

Canā€™t believe it was just a syntax error!

You have posted a simple comment, but thanks for motivate me trying qvm-create once again unman.

This seems to be a common problem, but Iā€™m not sure what to do about it.

In this case, the example should have been written as:

--label <YOUR_COLOR>

But would that have made it obvious not to type the < and >?

3 Likes

The problem is that this is widely, perhaps almost universally, adopted,
and has been for years.
The open group specifications state that:

frequently names of parameters that require substitution by actual
values are shown with embedded <underscore> characters. Alternatively,
parameters are shown as follows:
<parameter name>

Iā€™ve seen angle brackets used more often.

It is, of course, a symptom of people copying without understanding. I
donā€™t know how you deal with that.

1 Like

Well, since Iā€™m kind of a beginner, it was not obvious for me to write just what was between < and > , but I think just writing something like

Note: < and > should not be typed.

But if it is a common writing pattern, I think just time would tell me that

1 Like

Youā€™re right, itā€™s not obvious.
Sometimes, when I am posting instructions I include something like your
proposal, or ā€˜replace ā€œā€ with the name of your qube.ā€™

2 Likes

An idea I had is we could write an example right below the instruction.

Something like:
.
.
.
.
.

Creating a template

From the dom0 command line, a template can be created by using this syntax:

qvm-create --class TemplateVM --label <YOUR_COLOR> --property virt_mode=hvm <NEW_STANDALONE_NAME>

For example, if you want to create a template with the name ā€œManjaroTemplateā€ with a black padlock label, it would be:

qvm-create --class TemplateVM --label black --property virt_mode=hvm ManjaroTemplate

.
.
.
.
.

Was it a good idea @adw ?

The problem is that sometimes we canā€™t provide an example because it depends on specifics of the userā€™s situation. Well, we can make up an example, but it might be close to useless. So, this may not work in every case, but it can work for some of them.

1 Like