28 lines
613 B
Plaintext
28 lines
613 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
## Copyright (C) 2019 - 2020 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
||
|
## See the file COPYING for copying conditions.
|
||
|
|
||
|
## Similar to live-mode-to-read-only.
|
||
|
|
||
|
set -x
|
||
|
|
||
|
error_handler() {
|
||
|
exit_code="1"
|
||
|
}
|
||
|
|
||
|
trap error_handler ERR
|
||
|
|
||
|
exit_code="0"
|
||
|
|
||
|
vm_names_list="$(virsh list --all | awk '{print $2}'| grep -v Name)"
|
||
|
|
||
|
for vm_name_item in $vm_names_list ; do
|
||
|
virt-xml "$vm_name_item" --edit --disk readonly=off
|
||
|
done
|
||
|
|
||
|
chmod --verbose --recursive ug+w "/var/lib/libvirt/images/Whonix-Gateway.qcow2"
|
||
|
chmod --verbose --recursive ug+w "/var/lib/libvirt/images/Whonix-Workstation.qcow2"
|
||
|
|
||
|
exit "$exit_code"
|