Skip to content

Instantly share code, notes, and snippets.

View drewdomi's full-sized avatar
😝
Bleh

Andrew Domingues drewdomi

😝
Bleh
View GitHub Profile

How to Restore a Virtual Machine in virt-manager/virsh

This guide covers the complete restoration process for a KVM/QEMU virtual machine using libvirt (virt-manager/virsh) from backup files.


Prerequisites

Required backup files:

  • vm-disk. qcow2 — Virtual machine disk image

AI Instructions 2.0: Technical Advisor (Andrew Domingues)

1. Core Persona & Stance

  • Role: High-level Technical Advisor. Critical, direct, and results-oriented.
  • Tone: No praise, no smoothing, no comfort. Sharp, professional, and strictly factual.
  • Validation: Verify all claims. Question assumptions, challenge weak reasoning, and explicitly expose blind spots, self-deception, or opportunity costs.
  • Output: Do not deliver unverified or unrealistic solutions. If data is missing, state it clearly and flag risks. Prioritize facts over assumptions.

2. Language & Communication

AI Instructions — Andrew Domingues

General Stance

  • Act as a high-level advisor: critical, direct.
  • Validate claims and conclusions; do not deliver anything unverified or unrealistic.
  • Question assumptions, challenge reasoning, expose blind spots.

Communication

  • If reasoning is weak, say why.
  • Call out self-deception, omissions, and excuses explicitly.

Fingerprint Reader Setup on Linux - Synaptics Sensors

Complete guide for configuring Synaptics fingerprint readers (including Metallica MIS Touch) on Linux distributions using python-validity and fprintd.

Device Compatibility

This guide specifically covers Synaptics fingerprint sensors that require proprietary drivers:

  • Synaptics Metallica MIS Touch (06cb:009a)
  • Synaptics Prometheus (06cb:0081)

PipeWire Restart Guide - Arch Linux

Quick reference for restarting PipeWire audio services without logging out.

Quick Fix - Restart PipeWire Services

# Stop all PipeWire services
systemctl --user stop pipewire pipewire-pulse wireplumber

How to Remove Specific Strings and Files from Commit History Using BFG Repo-Cleaner

This guide explains how to use BFG Repo-Cleaner to rewrite your Git repository's history to remove sensitive data (like passwords, API keys, or IP addresses) and unwanted files. This is extremely useful for cleaning up your repository before making it public or sharing with others.


⚠️ Prerequisites & Warnings

  • Backup your repository before running BFG. History rewriting is destructive.
  • Coordinate with collaborators. All contributors will need to re-clone the repository after the rewrite and force-push.
  • Use on a fresh clone or bare repo for best results.

Fixing virt-manager VM Internet Connectivity Issues on Arch Linux

Problem Description

When using virt-manager on Arch Linux, virtual machines may successfully obtain IP addresses from the NAT network (typically 192.168.122.x) but fail to access the internet. This manifests as:

  • ✅ VM gets IP address from DHCP (e.g., 192.168.122.112/24)
  • ✅ VM can ping the gateway (192.168.122.1)
  • ✅ DNS resolution works inside the VM
  • ❌ VM cannot reach external IP addresses (e.g., 8.8.8.8)

File Copying in Linux: cp vs rsync (with Examples)

1. What Is the cp Command?

  • cp is a standard Unix/Linux command for copying files and directories locally.
  • It is simple and fast for everyday file management.

2. When to Use cp

IPv6 Connectivity Fix for K3s Clusters

This document explains how to resolve IPv6 internet connectivity issues in K3s clusters running on Rocky Linux with firewall-cmd.

Problem Description

When K3s is configured with IPv6 support (dual-stack), pods may have IPv6 addresses but cannot reach external IPv6 services on the internet. This happens because:

  1. Missing IPv6 NAT/Masquerading: Unlike IPv4, IPv6 requires explicit masquerading rules for container networks
  2. Firewall Configuration: firewall-cmd needs masquerading enabled for NAT to work