Error Creating Ubuntu VM in Qubes 3.2

149 views
Skip to first unread message

Person

unread,
Sep 8, 2017, 10:59:05 PM9/8/17
to qubes-users
I wanted to have an Ubuntu VM, so I downloaded the ISO image in sys-net and created a QVM. When I attempt to start the QVM, it says there are no bootable devices, and there is a problem copying the file to dom0 so that I can boot from (it doesn't show up). I have tried running a command on the terminal, but it says that the directory doesn't exist.

Directly copying the ISO to the QVM doesn't work, because qrerex agent is not installed on it (I can't find any way to actually install it, too).

Person

unread,
Sep 13, 2017, 8:40:48 PM9/13/17
to qubes-users
I tried again. The website qubes-os.org had instructions to enter this code: --cdrom=[appvm]:[/path/to/iso/within/appvm] in dom0. How exactly do I find the path to the ISO?

Unman

unread,
Sep 14, 2017, 5:58:10 PM9/14/17
to Person, qubes-users
On Wed, Sep 13, 2017 at 05:40:48PM -0700, Person wrote:
> I tried again. The website qubes-os.org had instructions to enter this code: --cdrom=[appvm]:[/path/to/iso/within/appvm] in dom0. How exactly do I find the path to the ISO?
>

You said that you downloaded the iso on sys-net - where did you download
it TO?
If you really cant remember and you have many files on sys-net then you can use 'find':
open a terminal in sys-net , 'find -name *iso' should do it.

unman

Person

unread,
Sep 23, 2017, 10:24:25 PM9/23/17
to qubes-users
I believe I downloaded to [sys-net] Downloads. I can find the file easily if I just go to sys-net and click "Files".

However, I can't find the terminal you are speaking of in sys-net specifically. I tried it on dom0 instead, but it doesn't work.

Person

unread,
Sep 27, 2017, 5:30:07 PM9/27/17
to qubes-users
On Sunday, September 24, 2017 at 10:24:25 AM UTC+8, Person wrote:
> I believe I downloaded to [sys-net] Downloads. I can find the file easily if I just go to sys-net and click "Files".
>
> However, I can't find the terminal you are speaking of in sys-net specifically. I tried it on dom0 instead, but it doesn't work.

Is there any other way to install the server, or should I download a different operating system on the QVM instead?

Person

unread,
Sep 29, 2017, 10:46:19 PM9/29/17
to qubes-users
I tried copying the Ubuntu ISO to dom0 instead of the standalone VM directly, because the standalone VM only finds things to boot from in dom0.

I have not received any messages from Qubes that this transfer does not work, but when I look in dom0, the Ubuntu file is gone.

Unman

unread,
Sep 30, 2017, 7:23:15 PM9/30/17
to Person, qubes-users
On Sat, Sep 23, 2017 at 07:24:25PM -0700, Person wrote:
> I believe I downloaded to [sys-net] Downloads. I can find the file easily if I just go to sys-net and click "Files".
>
> However, I can't find the terminal you are speaking of in sys-net specifically. I tried it on dom0 instead, but it doesn't work.
>

Some basics:
You can add a shortcut to the menu using the "Add more shortcuts" option
for the qube. If you do this you will see an option for (at minimum)
xterm. This will give you a menu item to launch a terminal in your chosen
qube.
Alternatively, you can open a terminal in dom0 and use:
qvm-run <qube> xterm
To open a terminal in the qube (add -a if the qube is not running and it
will automatically start.)

So much for the terminal.

You say you can find the file easily, but not where it is. I assume it's
in /home/user/Downloads
Then the command would be
qvm-start <hvm> --cdrom=sys-net:/home/user/Downloads/<name of iso>

I don't understand what your final sentence means.

Unman

unread,
Sep 30, 2017, 7:33:25 PM9/30/17
to Person, qubes-users
On Fri, Sep 29, 2017 at 07:46:19PM -0700, Person wrote:
> I tried copying the Ubuntu ISO to dom0 instead of the standalone VM directly, because the standalone VM only finds things to boot from in dom0.
>
> I have not received any messages from Qubes that this transfer does not work, but when I look in dom0, the Ubuntu file is gone.
>

Have you read this?
https://www.qubes-os.org/doc/copy-from-dom0/
Make sure that you run the command correctly from a dom0 terminal.
qvm-run --pass-io <qube> 'cat /home/user/Downloads/<ubuntu_iso_name>' > ubuntu_iso_name

(I don't understand what you mean by "the Ubuntu file is gone.")

If you just want a ubuntu template, I've put some packaged templates
for xenial and zesty here:
http://qubes.3isec.org/Templates




Person

unread,
Sep 30, 2017, 11:31:52 PM9/30/17
to qubes-users
When I said “I can’t find Ubuntu in dom0”, I meant that I could find the file in sys-net, but she. I copied it to dom0, I could not find the file in dom0, even though the transferral received no error messages. I apologize for any misunderstandings.

I added the XTerm to sys-net, and I used the find -name *iso command on that terminal, but the terminal didn’t reply at all (I don’t know why). So instead, I tried the
“Qvm-start <hvm> --cdrom=sys-net:/home/user/Downloads/<name of iso>“ on both dom0 and the sys-net XTerm, but the XTerm replied with “hvm: no such file or directory” and dom0 replied with “syntax error near unexpected token ‘newline’”.

As for the command “qvm-run --pass-io <qube> 'cat /home/user/Downloads/<ubuntu_iso_name>' > ubuntu_iso_name”, dom0 replies with “sys-net: no such file or directory”.

Thank you for including the link to the Ubuntu Qubes templates, it will be so much easier to get Ubuntu for Qubes. I already installed the Xenial template (I know because I tried installing thrice), but unfortunately I can’t find it anywhere on Qubes.

Unman

unread,
Oct 1, 2017, 10:46:49 AM10/1/17
to Person, qubes-users
You need to give more information:
WHERE is the file on sys-net? You say you can find it using Files - in
which directory is it to be found?
If you run a command and it gives no reply then the command has finished
without any output. In the case of 'find' it means that no file was
found - this suggests that EITHER the ubuntu image doesnt end in *iso
OR you ran the command somewhere where the file wasnt to be found.

qvm-start is a command to be run in dom0 - you say that you got an
error message - what EXACTLY did you type?

The qvm-run error shows that you have not yet found the location and
filename of the ubuntu image that you downloaded.

You say you downloaded a template and installed it - I assume that you
copied it to dom0 and installed it there?
When you say you "can't find it anywhere" what do you mean?
If you run in dom0 'qvm-ls' you should see an entry for xenial marked
Tpl - If you try to create a new VM then you should see xenial in the
list of availbale templates to use.
If neither is the case, please run this command in dom0:
'sudo dnf list installed|grep template' and confirm that the xenial
template is included in the output.

Person

unread,
Oct 1, 2017, 8:59:37 PM10/1/17
to qubes-users
The file was in Home/User/Downloads, and I did make sure to include the command. Also, the Ubuntu file did end in “.iso”.

I did run qvm-start in dom0. I believe I typed “qvm-start <Ubuntu> --cdrom=sys-net:/home/user/Downloads/<ubuntu-17.04-server-amd64.iso>”, or I did the same thing but replaced “Ubuntu” with “hvm”. (“Ubuntu” is the name of the standalone VM I made and wanted to attach the .iso to.)

As for the qvm-run error, I have no idea if I entered the location correctly or not. I typed “qvm-run --pass-io <sys-net> 'cat /home/user/Downloads/<ubuntu-17.04-server-amd64.iso>' > ubuntu-17.04-server-amd64.iso”.

I did copy the template to dom0, but I could not find it in dom0 (when I open the dom0 Boot Screen where stand-alone VMs look for things to boot from, I cannot find the template file there) and so was unable to install it in dom0. I did install Xenial in sys-net, but I couldn’t find the template when I looked at my list of VMs, even when I use the methods you listed.

I believe my main problem is copying the files to dom0 in general, because that is the only way I can make these files into VMs.

Ron Hunter-Duvar

unread,
Oct 1, 2017, 11:41:09 PM10/1/17
to qubes...@googlegroups.com
You didn't actually type the angle brackets <> around the vm and file
names, did you? If so, that would probably be your problem.

Ron

Unman

unread,
Oct 2, 2017, 7:26:25 PM10/2/17
to Person, qubes...@googlegroups.com
Ron's right - the use of angle brackets is a convention to show that a
parameter is to be substituted by an actual value. You also see
underscores used: _qube name_

Dont type them._

Similarly you will see optional arguments in square brackets: like this-
qvm-start [options] <vmname>

The options are, well, optional - and you type a VALUE for the vmname:
qvm-start Ubuntu

I hope that's clear - if it is you *should* be able to finally get the
Ubuntu iso copied into dom0.

Finally, you really need to look again at the Qubes documentation. You
install Templates in dom0. So you will need to copy the Template you
downloaded to dom0 and then install it there. If you do that you WILL see
a template available which will allow you to create xenial qubes.

Person

unread,
Oct 2, 2017, 9:54:38 PM10/2/17
to qubes-users
Apparently the brackets were one of my mistakes. My bad (and thank you for pointing that out).

I ran the copy-to-dom0 and attach-to-VM commands again, and dom0 didn’t respond. So I opened the Standalone VM and it didn’t register anything to boot from, even though I’m sure that I copied the ISO successfully to dom0. When I open the dom0 File System, from the Stanalone VM Boot Screen, I can’t find the ISO that I copied there.

Person

unread,
Oct 3, 2017, 11:37:47 PM10/3/17
to qubes-users
Because the terminal didn’t respond with an error message, I am relatively sure that the ISO was successfully copied to dom0. Copying it to dom0 wasn’t a problem, really, but finding it in dom0 was. And the “find” commands don’t seem to work for finding in dom0.

Ron Hunter-Duvar

unread,
Oct 4, 2017, 12:09:44 AM10/4/17
to qubes...@googlegroups.com
On 10/03/2017 09:37 PM, Person wrote:
> Because the terminal didn’t respond with an error message, I am relatively sure that the ISO was successfully copied to dom0. Copying it to dom0 wasn’t a problem, really, but finding it in dom0 was. And the “find” commands don’t seem to work for finding in dom0.
>
In a dom0 terminal, the file should be in whatever directory you were in
when you ran the qvm-run command, since you didn't specify a directory
in the command you showed. If you didn't change directories first, that
would either be /root if you were root or /home/user otherwise.

You should be able to find it (as root) by running:

# find /root /home -name '*.iso'

If it's not found in either of them, then you either put it somewhere
else (like /tmp or /var/lib/qubes), or the copy didn't work.

As for what to do with it once it's copied, I can't help there at this
point.

Ron

Person

unread,
Oct 6, 2017, 11:25:06 PM10/6/17
to qubes-users
Once again, dom0 did not reply. I took this as a sign that the iso was successfully copied, but the Standalone VM did not register something to boot from and I could not find it in the dom0 filesystem again. This puzzles me, because I am sure that the file was originally at the exact location I put in the command.

Person

unread,
Oct 9, 2017, 11:20:44 PM10/9/17
to qubes-users
I have copied the file to dom0 several times without error messages, so it is unlikely that the transferral was unsuccessful.

Unman

unread,
Oct 10, 2017, 7:43:13 PM10/10/17
to Person, qubes-users
On Mon, Oct 09, 2017 at 08:20:44PM -0700, Person wrote:
> I have copied the file to dom0 several times without error messages, so it is unlikely that the transferral was unsuccessful.
>

Here are some basic Linux commands that you should use in a terminal in
dom0:
pwd - this will show you the directory that you are in.
ls - this will list the contents. You would expect to see the file that
you have just created. If you use 'ls -lh' you will get a LONG listing
('l') with sizes in HUMAN format ('h').
SO you can confirm that the file you have just copied is the expected
size.

Run the command to copy the iso image.
Then use 'ls -lh' and check that the file is indeed there.
'pwd' to identify the directory.


Armed with that knowledge you will be able to put together the right
path to the iso image when you try to start using the --cdrom option.

Person

unread,
Oct 12, 2017, 6:25:29 PM10/12/17
to qubes-users
l tried the former commands again, with “ls -lh” and “pwd”, but the terminal remained unresponsive, even if it was formerly responsive.

So I tried changing the command around a little. The Qubes site mentions to enter this command: “qvm-run --pass-io <src-vm> 'cat /path/to/file_in_src_domain' > /path/to/file_name_in_dom0”, and I realized that I didn’t put in a desired path for the file in dom0. I tried using a directory in dom0 that I found, which was /home/user/Downloads. When I entered this command, dom0’s response was “Usage: qvm-run [options] [<vm-name>] [<cmd>]” and “qvm-run: error: Too many arguments”. I’m not too sure what this means, but I believe I somehow typed in the command wrong. I typed in “qvm-run —pass-io sys-net ‘cat /home/user/Downloads’ /home/user/Downloads”. (The first “/home/user/Downloads is the directory in sys-net and the second is the directory in dom0.)

Ron Hunter-Duvar

unread,
Oct 12, 2017, 8:11:02 PM10/12/17
to Person, qubes-users
Where you show the command you typed, you're missing the output redirection (the ">"). So instead of the shell doing the redirection to the file, it passes it as an argument to the qvm-run command, resulting in the error you got.

Ron

Person

unread,
Oct 13, 2017, 10:50:24 PM10/13/17
to qubes-users
The file was successfully copied to dom0. Thank you very much for all your advice!
Reply all
Reply to author
Forward
0 new messages