Skip to content

Instantly share code, notes, and snippets.

@jclaret
Last active February 17, 2020 23:13
Show Gist options
  • Save jclaret/1de3544ee7cc71dd6cba0e472ff6284b to your computer and use it in GitHub Desktop.
Save jclaret/1de3544ee7cc71dd6cba0e472ff6284b to your computer and use it in GitHub Desktop.
virsh list --all
virsh start vm_machine
virsh domifaddre vm_machine
yum install usbguard udisks2 usbutils
systemctl enable usbguard
systemctl start usbguard
usbguard list-rules
usbguard list-devices
usbguard list-devices --block
usbguard list-devices --blocked
usbguard generate-policy
usbguard generate-policy -X
usbguard generate-policy -X > /etc/usbguard/rules.conf
usbguard generate-policy -X -t reject > /etc/usbguard/rules.conf
ls -l /etc/usbguard/rules.conf
-rw-------. 1 root root 0 Jul 31 2018 /etc/usbguard/rules.conf
systemctl restart usbguard
virsh attach-device vm_machine usb-disk-red.xml
journalct -e -b
lsusb
lsblk
usbguard allow-device 9 -p (persisten)
udisksctl status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment