You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Phil Lembo
plembo
Enterprise Architect, sysadmin, identity management engineer now focused on collaboration solutions for a global Fortune 200 company.
Change a SATA boot disk to virtio in a Windows KVM guest on Ubuntu 22.04 LTS
The problem here is that every Linux distro, and releases within distros, does things differently even when it comes to "common" services like qemu-kvm/libvirt.
Not sure why distro publishers continue to insist on that, but it results in a lot of wasted time downstream. My message, if I could get any of them to pay attention, would be: STOP IT!
I recently created a new Windows 11 guest in KVM on my Ubuntu 22 LTS Desktop system. My main motivation was to try running a game my kids had created, which I knew was going to require 3D accelerated graphics (whose installation is a matter for a different gist).
The installation went well. The trick, at least on Ubuntu 22.04's configuration of KVM, was to create a fresh guest and be sure to use the dropdown on the Overview tab to select a UEFI firmware (in my case, OVMF_CODE_4M.ms.fd) and to add an Emulated TPM 2.0 device (pass-through didn't work for me). Note, I did try and fail to
Of Big Endians and Little Endians: File encoding and digital accessibility
Of Big Endians and Little Endians: File encoding and digital accessibility
I figured it out. And learned a valuable lesson. In exploratory data analysis work rule number one is "Read the damn docs. Carefully".
North Carolina's State Board of Elections makes a lot of useful data public. This is probably one of the best ways to ensure electoral integrity, and gives all citizens the ability to see and use data that they've already paid for. The alternative is a relatively closed system like in many north eastern states where only big money interests and their clients, like the major parties, have access to anything close to raw data.
Historical voter registration snapshots are taken at every election, so that analysts and historians can see what the state of the electorate was for each vote.
The state also provides weekly running updates of current voter registrations.
S3 for the files, CloudFront for an HTTPS front end (S3 doesn't do HTTPS). Using Namecheap for DNS. Example site for this gist is named "www.example.com".
Create an S3 bucket
Go to S3 and Create bucket.
Name (www.example.com) bucket, choose region, and accept the defaults.
Upload files and folders
Use GUI or AWS CLI to copy files and folders to bucket.
Amazon Web Services' Simple Storage Service, a/k/a "S3", is a flexible object storage facility that is widely used by government, enterprises, and even small business for serving and backing up files. Creating a storage "bucket" is easy enough, but most consumers find the permissioning system to be indecipherable. That wasn't as much of a problem for me, as I've been through a few rounds of AWS training, including for S3. But it also wasn't straightforward. I'm creating this gist mostly to avoid having to puzzle things out for my next S3 project.
Overview
The goal is to backup files on my home server to an S3 bucket. In the example that follows "example.com" is my home domain.
Third party software
aws-cli is the official command-line tool for AWS.
rclone is "rsync for cloud storage", a reliable and efficient tool for synchronizing storage nodes. Instructions for
NOTE: Removing snapd may impact the operation of Ubuntu Pro.
I don't currently use snaps, and have had to work hard at avoiding them [1]. So far the effort has been worth it, because Ubuntu has continued to provide a stable desktop Linux system that is compatible with a broad range of modern hardware.
Getting rid of snaps in Ubuntu 22.04 LTS is basically a 4 step process:
Getting short of space on a 120G boot/root SSD on Ubuntu Server, decided to replace it with a bigger NVME (IDE) 250G drive.
Using the latest Clonezilla, the process was really painless. After cloning, there was still over 100G unallocated space on the larger
drive for expansion of a new parition. The paritions of the clone had the same disk UUIDs and flags as the original.
First setup Debian system package repo (Ubiquiti Support and Help Center). For EdgeOS 2.x this will be the repo for Debian 9 "Stretch".
$ configure
# set system package repository stretch components 'main contrib non-free'
# set system package repository stretch distribution stretch
# set system package repository stretch url http://http.us.debian.org/debian
Some distributions create the defaut KVM (libvirtd) storage pool for images when they install KVM, others do this upon the creation of the first KVM guest. Creating the default pool from scratch is pretty straightforward. Here's how to do it with virsh.
First verify there is no existing default pool:
$ virsh pool-list --all
Name State Autostart
-----------------------------
Relocate an existing libvirtd (KVM) images directory
By default, KVM (libvirtd) images on Ubuntu and most other Linux distributions are found in /var/lib/libvirt/images. This can be inconvenient if you don't have a separate /var partition that can grow over time to accommodate multiple large images.
You can simply rename the images folder to something else and then symlink to a larger space with it (e.g. ln -s /data1/libvirt/images /var/lib/libvirt/images). That's what I used to do.
But that can lead to all sorts of unanticipated trouble. The right way to have your images on a bigger disk is to change the path for libvirt's default storage pool to a partition on that big disk, which is logically where KVM is going to create them.