Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-07-06 Thread tomhet
Man, this is amazing! It finally works! I spend over 20 hours fighting with systemd (depending on shutdown target, all or some qubes targets, doing PreStart=- but nothing worked) and in desperation I tried nasty hack of replacing /usr/sbin/shutdown with my script, but it was not called when shu

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-27 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Mon, Jun 27, 2016 at 03:47:14PM -0700, tom...@gmail.com wrote: > Hi Marek, > > In Qubes Manager's VM context menu 'Shutdown VM' seems to do equivalent of > 'virsh shutdown VM', i.e. power button press. I'd like to catch it, so my > shutdown s

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-27 Thread tomhet
Hi Marek, In Qubes Manager's VM context menu 'Shutdown VM' seems to do equivalent of 'virsh shutdown VM', i.e. power button press. I'd like to catch it, so my shutdown script is executed also via Qubes Manager shutdown. In /var/lib/qubes/vm-templates/storage/storage.conf I have " destroy".

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-12 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sun, Jun 12, 2016 at 12:57:19PM -0700, tom...@gmail.com wrote: > > > > Hi Marek, > > Mounting as you advised works like charm when doing it via Qubes VM Manager: > "qrexec-client-vm dom0 storage.block.attach" from rc.local of appvm. > > But

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-12 Thread tomhet
Hi Marek, Mounting as you advised works like charm when doing it via Qubes VM Manager: "qrexec-client-vm dom0 storage.block.attach" from rc.local of appvm. But when setting 'storage' VM to auto-start I find such things in the log (and no storage is attached: 125626-Jun 12 18:27:11 dom0

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-07 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, Jun 07, 2016 at 02:07:52PM -0700, tom...@gmail.com wrote: > Thanks for details, Marek ! > > > If you want to call it automatically at VM startup, you can create qrexec > > service for that > Cool, this was my first idea, but I was unable to

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-07 Thread tomhet
Thanks for details, Marek ! > If you want to call it automatically at VM startup, you can create qrexec > service for that Cool, this was my first idea, but I was unable to implement it. Q1: If taking this way I'll need to have opposite (umount & detach) operation at VM shutdown (to avoid refres

Re: [qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-07 Thread Marek Marczykowski-Górecki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, Jun 07, 2016 at 01:08:24PM -0700, tom...@gmail.com wrote: > Hi, here's my way: > - In storage VM I've created '/rw/config/fstab' with content that will be > appended to /etc/fstab on each boot. It contains UUIDs of partitions with > target

[qubes-users] Re: Automatically mount block devices when appvm launches

2016-06-07 Thread tomhet
Hi, here's my way: - In storage VM I've created '/rw/config/fstab' with content that will be appended to /etc/fstab on each boot. It contains UUIDs of partitions with target mount point. Note the 'auto' attribute: --- [user@storage config]$ cat /rw/config/fstab # This should have been appended t