Structure of qubes

162 views
Skip to first unread message

acharya.sa...@gmail.com

unread,
Feb 28, 2019, 3:16:35 AM2/28/19
to qubes-users
I wanted to understand the tree structure of qubes.

So my guess is this.

dom0 is the owner of every other thing. There are 4 template VMs, fedora, debian, 2 whonix ones.

When a domain restarts, it takes it settings from the template on which it is based and it's own home directory and other couple ones which are just in it, I guess stored in ROM.

I created another fedoraDev template for my development purposes on which my work qube is based. work has no net access. When I installed pandas in my fedoraDev template, it didn't reflect in work after restarts. When I changed work netVM to sys-firewall and run "pip install pandas", there's no internet!

Also, I want to install nvidia drivers from rpmfusion for which I need to add repos. I don't know where is dnf is. It's in dom0 but it is not connected to internet. I need to make them in fedora. In my personal domain connected to internet, there's no dnf.

I need to know the structure of qubes better to understand dnf and my python pandas installation. I'm certainly missing something.

unman

unread,
Feb 28, 2019, 9:22:35 AM2/28/19
to qubes-users
Your summary of the Qubes structure is pretty good.

Where has panda been installed in the template? The only case where it
wouldnt appear in the work qube would be where it was installed in
/home/user in the template.
Check the path to library in the template and confirm it is there in the qube. You
may need to adjust your path in the qube.

In dom0 you need to use qubes-dom0-update - I suggest you read this:
https://www.qubes-os.org/doc/software-update-dom0

In dom0 and in templates, there is no direct internet connection, and
updates (whether rpm or deb) run by proxy in an updateVM.
https://www.qubes-os.org/doc/software-update-vm/ in the section on
"Updates proxy" may help.

unman

acharya.sa...@gmail.com

unread,
Feb 28, 2019, 12:56:00 PM2/28/19
to qubes-users
Yes, unman, it was installed in /home/user

I made /tmp/site_packages and added a line
export PIP_TARGET='/tmp/site_packages'
in ~./bashrc

Now, pandas is installed in /tmp/site_packages and pip3 freeze doesn't even detect it in template. Anyways, it looks solvable.

I can't get around rpmfusion though. I'm having trouble with package manager dnf. How do I add the repo? What's the repo name? Where will the GPU drivers be installed? Will I be able to use them from work qube with tensorflow-gpu?

acharya.sa...@gmail.com

unread,
Mar 2, 2019, 1:35:06 PM3/2/19
to qubes-users
I dug many things. The docs on qubes official site are old. I tried both the ways to install my NVIDIA GTX 1060 and the problem is even after installing, it's unclear whether I would be able to use it outside dom0.

I found a better method. I have a Ryzen 3 2200G APU which I intend to use for basic qubes graphics in dom0 and want to install NVIDIA GTX card in the work domain fedoraDev as a secondary card. In this way dom0 would remain more secure and I could use tensorflow-gpu in work VM(atleast that's my conjecture). However, when I change the settings in Booting menu to Integrated Graphics Device and change the connection of HDMI to motherboard from Graphics Card, Qubes doesn't bootup. It stops at

Starting Show Plymouth Boot Screen...

It doesn't move forward.

I have 2 questions, is this configuration of APU for dom0 and GPU for 1 cloned template possible? And how to boot with IGD after installing with GPU?

Thanks

acharya.sa...@gmail.com

unread,
Mar 3, 2019, 9:42:45 AM3/3/19
to qubes-users
I updated the kernel of dom0 to 4.20 and qubes booted with Integrated Graphics from Ryzen APU as in one of the earlier posts.

When I change the NVIDIA pci device (VGA compatible controller) from dom0 to fedoraDev template, my system crashes which means it's using GTX 1060 as graphics after initial booting up. How to change this? After this, I intend to do just the 1st part of

https://www.qubes-os.org/doc/install-nvidia-driver/

that is building kernels in fedoraDev template so that NVIDIA Graphics Card is installed for template based VMs.

Please help guys. I don't know anything here in the hardware software interaction area.

awokd

unread,
Mar 3, 2019, 10:51:31 AM3/3/19
to qubes...@googlegroups.com
acharya.sa...@gmail.com:
> I updated the kernel of dom0 to 4.20 and qubes booted with Integrated Graphics from Ryzen APU as in one of the earlier posts.

Good, was going to suggest that.

> When I change the NVIDIA pci device (VGA compatible controller) from dom0 to fedoraDev template, my system crashes which means it's using GTX 1060 as graphics after initial booting up. How to change this? After this, I intend to do just the 1st part of
>
> https://www.qubes-os.org/doc/install-nvidia-driver/
>
> that is building kernels in fedoraDev template so that NVIDIA Graphics Card is installed for template based VMs.
>
> Please help guys. I don't know anything here in the hardware software interaction area.
>

Your other question on using the Nvidia card in a VM is also known as
graphics card passthrough. It's a good idea, but several have tried and
I am not aware of anyone who has succeeded under Qubes 4.0. You can try
to hide it so Qubes doesn't try to initialize it with
xen-pciback.hide=(08:00.0), replacing the 08:00.0 with the BDF for the card.

acharya.sa...@gmail.com

unread,
Mar 3, 2019, 1:14:45 PM3/3/19
to qubes-users
Thanks awokd,

Is xen-pciback compiled in the kernel or is it compiled as a module in qubes?

awokd

unread,
Mar 3, 2019, 3:40:38 PM3/3/19
to qubes...@googlegroups.com
acharya.sa...@gmail.com wrote:

> Is xen-pciback compiled in the kernel or is it compiled as a module in qubes?

Not sure of the answer, but all you should have to do to use that option
is add it to your kernel= line.


acharya.sa...@gmail.com

unread,
Mar 4, 2019, 12:51:05 AM3/4/19
to qubes-users
> Not sure of the answer, but all you should have to do to use that option
> is add it to your kernel= line.

I think this is an important decision. I need to be sure. There are 2 different ways to proceed as shown here...

https://wiki.xen.org/wiki/Xen_PCI_Passthrough

It maybe a point of no return if I choose the wrong path. In fact, that can be the reason people haven't been able to implement. I want to be correct at each step.

unman

unread,
Mar 4, 2019, 10:13:40 AM3/4/19
to qubes-users
lsmod confirms that is LKM : you can also check by looking in
/proc/modules

acharya.sa...@gmail.com

unread,
Mar 4, 2019, 12:19:46 PM3/4/19
to qubes-users
> lsmod confirms that is LKM : you can also check by looking in
> /proc/modules

Thank you. I'm on it! :D
I'm not switching back to Ubuntu, I'm getting things done here.

acharya.sa...@gmail.com

unread,
Mar 11, 2019, 7:40:18 AM3/11/19
to qubes-users
I tried booting up with just the APU plugged in and found out that the recent kernel is also not compatible with the APU providing the graphics. My sys-firewall and sys-whonix wouldn't start.

I went back to square 1, installing NVIDIA drivers in dom0 with rpm and found that earlier I was using the wrong kernel-devel tool. Installed kernel-latest-vm 4.20.3-1 which upgrade the kernels of my fedora template and installed the compatible kernel-latest-devel.

When executing,

sudo rpmbuild --nodeps -D "kernels 4.20.3-1.pvops.qubes.x86_64" --rebuild nvidia-kmod-410.66-1.fc29.src.rpm

I get the following

error: Package has no %description: kmod-nvidia-4.20.3-1.pvops.qubes.x86_64

Checked the spec file in rpmbuild folder and it contains %description line
And I do not see any file named kmod-nvidia-4.20.3-1.pvops.qubes.x86_64 anywhere. Please help.

acharya.sa...@gmail.com

unread,
Mar 12, 2019, 11:57:24 AM3/12/19
to qubes-users
Can someone from the qubes managers please try

yumdownloader --resolve xorg-x11-drv-nvidia
yumdownloader --source nvidia-kmod

sudo dnf install kernel-latest-devel-4.20.3-1.pvops.qubes.x86_64.rpm rpm-build kmodtool

sudo rpmbuild --nodeps -D "kernels 4.20.3-1.pvops.qubes.x86_64" --rebuild nvidia-kmod-410.66-1.fc29.src.rpm

in a Fedora 29 template. This should work according to docs but doesn't with the above error.

acharya.sa...@gmail.com

unread,
Mar 12, 2019, 11:59:31 AM3/12/19
to qubes-users
I mean Fedora 29 qube above, not template.
Reply all
Reply to author
Forward
0 new messages