Find the IP address of a machine I just booted

I am booting VMs via qemu (no libvirt) and sometimes they don't tell me what IP address they got when booted.  To figure it out, considering I know the IP address, I can query the network via the Address Resolution Protocol (ARP)

I know they get address in sequence, so:


ayoung@sut11sys-r112:~/devel/ampvirt$ arp -n | grep -i "52:54:00:70:0c:"
10.76.112.154            ether   52:54:00:70:0c:02   C                     virbr0
10.76.112.153            ether   52:54:00:70:0c:04   C                     virbr0
10.76.112.155            ether   52:54:00:70:0c:03   C                     virbr0

Network setup for a custom Qemu Virtual Machine

After building a custom Qemu, there are a couple ways to run a VM to get to it. The older approach to VM management is to create a block device, run the VM with a boot device, do a full install and log in to the serial console. However, if you run the Qemu/KVM machine from the command lilne, hitting control C will stop your VM, and this is annoying. I have found it worth while to set up networking and then to SSH in to the machine.

My notes here suck. I am going to try and document what I have here working, and, over time, reverse engineer how I got here.

Edit: here are the steps

Continue reading →

Limiting What an Agent can do

I do not work with AI tools. This is not advice from experience of working with AI. It is advice from working with access controls in general.

Any agent has responsibility and authority. Responsibility is what it is required to produce. Authority is the set of resources that you provide to that agent. This does not change if the agent is human or automation, and AI agents fall in to that later category.

Continue reading →

Install a custom Kernel inside a VM

When debugging Qemu, it might be helpoful to instrument Linux Kernel to see when interrupts get received, or see data on the other side of a transfer. If you have to modify the Kernel on a regular basis, it can be faster to build it in place than to build a customer RPM/DEB and install inside the VM. Here is how I have been going about updating the kernel.

Continue reading →

Tools First

I have wasted a lot of time as a developer waiting for long running processes to complete. Whether it is a Linux Kernel compile, and Ansible Playbook tearing down and recreating a system on a remote server, or a gitlab pipeline building and testing code, the common problem is that my head is in the problem being addressed there, but I cannot do anything to verify hypotheses until the process completes. I often get distracted while waiting, and find that what could have been a 5 minute turn around has become a 2 hour turn around.

Continue reading →

vim windows

I tend to want to work with three windows side by side. Two have the code I am working with, often production code on the left, test code on the right. The third window is the output from running commands to test the code.

I recently have decide to go all-in on vim, and it is progressing nicely. Thank you the Jake Worth for inspiring this. In Vim, the meta key for for doing windows operations is Ctrl-W. Here are a few commands I have gathered up from the internet. I will collect up the links where I get them at the bottom

Continue reading →