bash alias for a vmlookup
command (nslookup
but for Proxmox). Uses qm
and jq
.
put in .bashrc
:
function vmlookup () {
in Windows setup: SHIFT
+ F10
opens a cmd shell. Then regedit
.
[HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig]
"BypassTPMCheck"=dword:00000001
"BypassSecureBootCheck"=dword:00000001
"BypassRAMCheck"=dword:00000001
"BypassStorageCheck"=dword:00000001
"BypassCPUCheck"=dword:00000001
"BypassDiskCheck"=dword:00000001
A grep command (grepp
) in Powershell that lets you grep for a string in the text that would usually be printed in the terminal (not some other representation of the data). Output is a string, not a pipeline anymore - thus destructive.
To quickly grep through shell output without having to do where-object
gymnastics.
A way to reboot into recovery mode (Windows boots into GUI with only minimal drivers loaded):
bcdedit /set "{current}" safeboot minimal
bcdedit /deletevalue "{current}" safeboot
I have a Windows 11 23H2 VM with a SATA boot disk running on virtmanager (KVM/Qemu) on Fedora 39 that I want to convert to a virtio disk.
xml editing
xml
tab, backup the existing xml and change it:old:
# make a query at this point in time | |
$ promtool query instant http://localhost:9090 '{job=~".+"}' | |
up{instance="localhost:9090", job="prometheus"} => 1 @[1690724237.225] | |
go_memstats_alloc_bytes{instance="localhost:9090", job="prometheus"} => 29046776 @[1690724237.225] | |
... | |
# query a metric for the time range between two Unix timestamp | |
$ promtool query range --start 1690724700 --end 1690725307 --step 1m http://localhost:9090 \ | |
'go_memstats_alloc_bytes{job="prometheus"}' | |
23215032 @[1690724700] |
setting value of extended attribute "security.ima" on "/catatonit": operation not permitted
:example error message (when trying to run a k8s yaml as unpriv'ed user)
[user@host]$ podman kube play boom.yml
Error: building local pause image: building at STEP "COPY /usr/libexec/podman/catatonit /catatonit": storing "/usr/libexec/podman/catatonit": error during bulk transfer for copier.request{Request:"PUT", Root:"/", preservedRoot:"/home/opc/.local/share/containers/storage/overlay/ba320139a68ad5418cef299dd724dc9fc53737c8a3cba1ad9d30c3a25dfcca45/merged", rootPrefix:"/home/opc/.local/share/containers/storage/overlay/ba320139a68ad5418cef299dd724dc9fc53737c8a3cba1ad9d30c3a25dfcca45/merged", Directory:"/", preservedDirectory:"/home/opc/.local/share/containers/storage/overlay/ba320139a68ad5418cef299dd724dc9fc53737c8a3cba1ad9d30c3a25dfcca45/merged", Globs:[]string{}, preservedGlobs:[]string{}, StatOptions:copier.StatOptions{CheckForArchives:false, Excludes:[]string(nil)}, GetOptions:copier.GetOpt
# as demo data, let's use a copy of the alpine rootfs (which contains both binary and text files)
$ wget https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-minirootfs-3.18.0-aarch64.tar.gz
$ tar xf alpine-minirootfs-3.18.0-aarch64.tar.gz
$ ls
/bin
/etc
...
# make this dir a git repo and enable git-lfs
# we're on Ubuntu 20.04 on arm64
$ uname -a
...
Linux [...] 5.15.0 #40~20.04.1-Ubuntu [...] aarch64 [...]
...
# install build tools
$ apt-get -y update && apt-get -y install curl build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev pkg-config
# install latest Go