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