Archive for August, 2023

Aug 27 2023

snapshots of UEFI libvirt-based (KVM) virtual machines

Shut down VM and then

Listing
qemu-img snapshot -l <file>.qcow2
Create
qemu-img snapshot -c <snap-name> <file>.qcow2
Revert to 
qemu-img snapshot -a <snap-name> <file>.qcow2

Delete
qemu-img snapshot -d <snap-name> <file>.qcow2

 

Aug 18 2023

USB NIC reset

lsusb 
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
Bus 004 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 
Bus 003 Device 003: ID 04f2:b477 Chicony Electronics Co., Ltd HP HD Webcam 
Bus 003 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

then
usbreset 0bda:8153

Aug 13 2023

Windows recovery

bootrec /scanos

bootrec /fixmbr

bootrec /fixboot

bootrec /rebuildbcd

Aug 9 2023

Deletes files older than 30 days

forfiles /p "C:\sql.arch" /s /m *.* /D -30 /C "cmd /c del /Q /S @path"