appvm
appvm copied to clipboard
Permission problems
appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/14 22:20:52 internal error: process exited while connecting to monitor: 2020-07-14T21:20:52.185266Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied
appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/14 22:20:52 internal error: process exited while connecting to monitor: 2020-07-14T21:20:52.185266Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied
please, delete ~/appvm/.fake.qcow2
cd ~/appvm
ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:23 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:23 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ sudo rm .fake.qcow2 ls -al total 36 drwx------ 5 potong potong 4096 Jul 15 08:24 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/15 08:25:09 internal error: process exited while connecting to monitor: 2020-07-15T07:25:08.964875Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ sudo chown potong:potong .fake.qcow2 ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 potong potong 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/15 08:25:55 internal error: process exited while connecting to monitor: 2020-07-15T07:25:55.396023Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/
cd ~/appvm ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:23 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:23 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ sudo rm .fake.qcow2 ls -al total 36 drwx------ 5 potong potong 4096 Jul 15 08:24 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/15 08:25:09 internal error: process exited while connecting to monitor: 2020-07-15T07:25:08.964875Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ sudo chown potong:potong .fake.qcow2 ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 potong potong 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/ appvm start chromium /nix/store/gr8x944bv3cwhk4i5751yhbqix1b16lh-nixos-vm 2020/07/15 08:25:55 internal error: process exited while connecting to monitor: 2020-07-15T07:25:55.396023Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied ls -al total 232 drwx------ 5 potong potong 4096 Jul 15 08:25 ./ drwxr-xr-x 43 potong potong 20480 Jul 14 13:04 ../ drwx------ 2 potong potong 4096 Jul 12 11:09 base/ drwx------ 2 potong potong 4096 Jul 12 11:04 chromium/ -r-------- 1 root root 196616 Jul 15 08:25 .fake.qcow2 drwx------ 2 potong potong 4096 Jul 12 11:09 gnused/
Okay. Are you using master version?
I installed appvm as of the instructions in https://appvm.readthedocs.io/en/latest/installation.html I used:
nix-env -if https://code.dumpstack.io/tools/appvm/archive/master.tar.gz
to install it and also:
nix-channel --add https://nixos.org/channels/nixos-20.03 nixpkgs nix-channel --update
nix-channel --list home-manager https://github.com/rycee/home-manager/archive/master.tar.gz nixpkgs https://nixos.org/channels/nixos-20.03 appvm --help usage: appvm [
] [ ...] Flags: --help Show context-sensitive help (also try --help-long and --help-man).
Commands: help [
...] Show help. list List applications
autoballoon [
] Automatically adjust/reduce app vm memory start [
] Start application stop
Stop application drop
Remove application data generate [
] [ ] Generate appvm definition search
Search for application sync Synchronize remote repos for applications
appvm --version appvm: error: unknown long flag '--version', try --help
I installed appvm as of the instructions in https://appvm.readthedocs.io/en/latest/installation.html
what's your os?
cat /etc/os-release NAME="Linux Mint" VERSION="20 (Ulyana)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20" VERSION_ID="20" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.ubuntu.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=ulyana UBUNTU_CODENAME=focal
Is there any other diagnostics I can retrieve?
Dunno yet)
Please, run echo 'remember_owner = 0' | tee -a /etc/libvirt/qemu.conf
echo 'remember_owner = 0' | tee -a /etc/libvirt/qemu.conf tee: /etc/libvirt/qemu.conf: Permission denied remember_owner = 0 ls -al /etc/libvirt/qemu.conf -rw------- 1 root root 32372 Jul 12 09:45 /etc/libvirt/qemu.conf
oof
echo 'remember_owner = 0' | sudo tee -a /etc/libvirt/qemu.conf
I ran the following:
echo 'remember_owner = 0' | sudo tee -a /etc/libvirt/qemu.conf remember_owner = 0
and then:
appvm start chromium /nix/store/yfkc2fib1x416ixiqxcb65qinkg2dj6w-nixos-vm 2020/07/15 10:36:31 internal error: process exited while connecting to monitor: 2020-07-15T09:36:30.572294Z qemu-system-x86_64: -blockdev {"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}: Could not reopen file: Permission denied
Can you send output of groups
?
I believe I may have found the answer.
I had previously set user = 'potong'
and group = 'kvm'
(potong being my user name).
I reverted user = 'root'
and group = 'root'
and commented out the now appended remember_owner = 0
Then restarted libvirtd with systemctl restart libvirtd
appvm start chromium /nix/store/yfkc2fib1x416ixiqxcb65qinkg2dj6w-nixos-vm
appvm list Started VM: chromium
Available VM: chromium gnused appvm stop chromium
Started VM:
Available VM: chromium gnused
groups potong adm cdrom sudo dip plugdev lpadmin sambashare libvirt libvirt-qemu
I believe I may have found the answer.
I had previously set
user = 'potong'
andgroup = 'kvm'
(potong being my user name).I reverted
user = 'root'
andgroup = 'root'
and commented out the now appendedremember_owner = 0
Then restarted libvirtd with
systemctl restart libvirtd
the prolem is that with that everything in ~/appvm is owned by root :(