Qubes in 4 GiB...yes it can work with minimal templates

[EDIT: Well…phooey. It turns out that my system had 8GiB originally, not 4GiB, and I didn’t realize it. I thought it was 4 because I used the wrong command to check. (The correct command is xl info not free.) I even went and bought an 8GiB stick thinking all I had was 4GiB. It didn’t work much better if at all. I then realized that this stick was also saying 4GiB because of the wrong command I was using; got that sorted out…but never went back and checked the original stick until today (7 March '23). And it was an 8 GiB stick. Therefore, the entire premise of this post is BS; I was NOT running qubes on 4GiB with minimal templates. My apologies.]

I decided to take my Librem 13 v 3 and switch it to Qubes OS, using (initially) the same ISO from last March’s testing repository as I did with my “main” (desktop) computer. I stuck an old 1TB SSD into the laptop, divided it into two partitions (one for Qubes, the other for not-really-offline storage), then let Qubes reclaim the first partition (so now there’s a boot partition and all the other stuff LUKS needs).

I was able after a couple of days to largely duplicate my desktop’s setup. (I use salt, but I control it with bash scripts…so I was able to bring over the entire subdirectory under /srv/salt and use most of it. [The laptop has no ethernet, so I couldn’t do that; other things I didn’t do because they didn’t make sense.] I’ll be backporting that because I made changes to make it easier to use on both systems.)

One thing that surprised the daylights out of me though: I would occasionally get messages that I didn’t have enough memory to start another VM. On further investigation, I discovered my laptop only has 4 GB of RAM!!!

(The bare minimum for Qubes to work is supposed to be 6 with 16 recommended.)

Thanks to minimal templates, I’m able to run sys-net, sys-firewall, sys-cacher and a browser VM, but not much more than that. (I need to try cutting the browser VM’s memory.) I could probably run multiple non-browser qubes as long as it’s not video or image editing.

Anyway, I found it really cool I could get something functional in only 4 GiB of RAM! I’m sure it has everything to do with using minimal templates. (If anyone is curious, they’re Debian 11 based.)

(Note: Some will suggest I get more RAM. I would love to. In fact, I’ve tried that. It wouldn’t boot off a 16 Gib stick, but there’s an 8GiB stick in the system right now. The OS still only sees 4GiB of RAM even though the mem test clearly shows 8 GiB. I’m about to head over to the Purism forum to try to figure that one out. EDIT: Nope, I was an idiot. Should have used xl info to check memory.)

1 Like

Almost sounds like you’re in a 32 bit mode or something.

I could see that making some sense…except as far as I know Qubes doesn’t run in 32 bit at all.

A rather chagrined update:

I was trying to determine total system memory with free -h in dom0. But dom0 itself is a VM (thanks to the fact that Xen runs on the bare metal, even the “executive” is a VM, unlike with things like Oralcull’s Virtual Box–vastly better! Yay Qubes!), so what I was getting was the memory available to dom0. I should have understood this implication earlier.

And so, even on my main box, which I know has a lot more than 4 GiB on it, free -h in dom0 says I have 4 GiB. (It should have 64 GiB but now that I mention it; I’d like to check it too and make sure I am getting what I paid for.)

So now what I need to know is…how to check the actual total system memory, preferably from within a running QubesOS. I guessing there’s a command in dom0 to do that…but it’s not free -h.

xl info

1 Like

Yes, I just now found that–got the right duckduckgo fu! And it says 8106 MB.

Thanks!

I saw somewhere a way to reduce dom0s usage, which might be an appropriate thing to do (it’s not as if I can run a zillion VMs; which dom0 would need a lot of memory to deal with) and perhaps 5 GiB to play with instead of 4 GiB (after dom0).

Anyway, the main point of this post remains: I was able to get Qubes running in 4 GiB as long as I only had one browser VM running (plus sys-net, sys-firewall, sys-cacher); and could do multiple other VMs at once–by using minimal templates.

Running ‘xentop’ in dom0 is another way you can see how much ram you’ve got.

1 Like