Re: New user getting started questions

Alyssa Ross
2021-01-06T07:01:51Z

[-- Attachment #1: Type: text/plain, Size: 3924 bytes --]

Hi! Thanks for getting in touch. :)

To be honest, I'm surprised you got as far as you did -- like Michael
says, I'm currently working towards a proof of concept, so none of what
you've tried out so far is really meant for use outside of that proof of
concept.

> I've been running Qubes for a few years now and I'd like to give
> Spectrum a try, as I've been having some hardware and performance
> problems with Qubes. Is there some up-to-date guide I can follow? I
> found https://alyssa.is/using-virtio-wl/#demo and was able to see the
> weston terminal. I also tried updating to the latest commit and was
> able to get a nested wayfire window with:
>
> nix-build . -A spectrumPackages && ./result-3/bin/spectrum-vm
>
> (I'm fairly new to Nix, so not sure if this is the right way to do things)

Pretty close -- spectrumPackages is an attribute set containing lots of
derivations, which is why you end up with lots of numbered result-*
symlinks. If you do -A spectrumPackages.spectrum-vm it'll just give you
a single result symlink pointing to that, and you won't need to go
hunting for the right one. :)

> I managed to change the keyboard layout, mount a tmpfs for home, and
> increase the memory enough to start firefox, but I haven't managed to
> get much further. Things I tried so far:
>
> - I tried replacing wayfire with weston-terminal, to avoid the nested
> session. But sommelier segfaults when I do that.

I'm surprised -- this has worked for me before, although it's been a
while since I tried this so maybe I changed something.

> - I tried adding `--shared-dir /tmp/ff:ff:type=9p` to share a host
> directory. Then `mount -t 9p -o trans=virtio,version=9p2000.L ff /tmp`
> in the VM seemed to work, but `ls /tmp` crashed the VM.

Yeah, this is a known issue. I have a patch[1] for it but didn't add it
to the package since I mostly have been working with my own source
builds of crosvm.

[1]: https://spectrum-os.org/git/crosvm/commit/?id=1e318da5b57c12f67bed3b528100dbe4ec287ac5

> - I tried using `-d /dev/mapper/disk` to share an LVM partition, but
> `mount -t ext4 /dev/vdb /tmp` refused to mount it.

Never tried that, so I don't know anything about it I'm afraid.

> - I tried enabling networking with `--host_ip 10.0.0.1`, etc, but it
> said it couldn't create a tap device. I guess it needs more
> privileges.

Yeah, crosvm needs to be CAP_NET_ADMIN for that (which is difficult to
do with Nix). You can make a TAP device yourself iproute2 and use
--tap-fd to tell crosvm to use it, or you can use the mktuntap program I
wrote (with a privelege drop after running mktuntap), like this:

sudo mktuntap -pvB 3 \
sudo -u $USER -C 4 result/bin/spectrum-vm -- --tap-fd 3

> Ideally, I'd like to run a VM with each of my old Qubes filesystems,
> to get back to where I was with my Qubes setup, before investigating
> new spectrum stuff (e.g. one app per VM). Do you have any advice on
> this? I see these lists are a bit quiet - I hope someone is still
> working on this because it sounds great :-)

Like Michael said, there's a lot I need to do before it's really ready
to use like this, but I am working on it (or at least I will be again
once my anti-burnout break ends). Once I am, I hope to be more active
on the lists again. I used to post weekly status updates, and would
like to get into doing that again once I'm back because they were a
great way to keep people up to date with the project and for me to have
a record of what I'd been doing. Reading some of the old status updates
should give you a bit of a feel for where things are, although things
are a bit further along than they were when I wrote the last one because
I put the status updates on hold to try to chase a funding milestone.

Hope that's all clear -- please ask more questions if you have them,
although if it's anything particularly in the weeds I might wait until
I'm back from my break to answer. :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]