Any way to auto-attach SATA devices to VM's set to start on boot?

I have this drive with partitions that go with specific VM’s. It’s not a huge deal to attach them manually every time I reboot (plus manually running each VM’s startup script afterward), but y’know it’d sure be nice if I didn’t have to do all that and instead could walk away after typing my disk decryption password. One of the partitions already auto-mounts because it’s a Qubes VM pool, so maybe there’s a way to hijack that mechanism for my purposes?

EDIT: title says “SATA device” but it’s actually a bcache (/dev/bcache0), if that makes any difference

Try with --persistent

qvm-block (or qvm-usb) attach --persistent VMName dom0:xxxx (or sys-usb:xxx)

Ah yes that did it! Thanks :smiley:

1 Like