The Workstation on top of my server rack has 3 Ethernet ports. One is built in to the mother board, and and two are on a card. I want to use these three ports for different purposes. How can I tell which is which internally? The answer lies in /sys/bus/pci/devices/.
Category Archives: Sysadmin
Launching a VM From the virt-install command line interface
I do this infrequently enough that I want to record a reminder how I do it:
sudo cp ~/Downloads/rhel-server-7.6-x86_64-kvm.qcow2 /var/lib/libvirt/images/tower.qcow2 sudo virt-install --vcpus=2 --name tower --ram 4096 --import --disk /var/lib/libvirt/images/tower.qcow2 |
Manually Adding SSH Keys to a Cloud Image
Not all of my virtual machines run on OpenStack; I have to run a fair number of virtual machines on my personal workstation via libvirt. However, I like using the cloud versions of RHEL, as they most closely match what I do run in OpenStack. The disconnect is that the Cloud images are designed to accept cloud-init, which pulls the ssh public keys from a metadata web server. Without that, there are no public keys added to the cloud-user account, and the VM is unaccessable. Here is how I add the ssh keys manually.
Continue reading
Creating a Job in Ansible Tower via the REST API
Now that we can use the REST API to list inventory, it is not a big stretch to decide we want to kick off Jobs, too. Here it is in a nutshell, and some related operations for working with jobs and templates.
Continue reading
Using an Ansible Tower Inventory from Command Line Ansible
In an earlier post, I wrote about using the OpenStack Ansible inventory helper when calling and Ansible command line tools. However, When developing an playbook, often there is more information pulled from the inventory than just the set of hosts. Often, the inventory also collects variables that are used in common across multiple playbooks. For this reason, and many more, I want to be able to call an Ansible playbook or Ad-Hoc command from the command line, but use the inventory as defined by an Ansible Tower instance. It turns out this is fairly simple to do, using the REST API.
Using the OpenStack inventory helper for Ansible
While Tower makes it easy to manage custom inventory, I still want to develop using the command line. Thus, I want to generate a comparable smart inventory for my Ansible playbook as I get from tower.
Continue reading
Physical Home Cluster Setup
I’ve been building a home cluster for investigative work.  Here’s what I have so far.
Dealing with Time Wasters
Reading draws me in. While this has done me much good in my life, it also means that I can easily get sucked into reading a news site, and waste too much time. It took me a long time to figure out how to effectively block sites that I want to browse occasionally.
Command line VPN connection
I need to connect to my office via VPN. Fedora has a point and click interface, but I am trying to minimize mouse usage. So, instead I have a small bash function that does it for me.
I has an OTP that I need to enter in, so I have nmcli prompt me.
$ cat `which vpn_up ` nmcli --ask c up "Raleigh (RDU2)" |
Passwordless access to System libvirt on Fedora 28
I can connect to the system libvirtd on my system without password. I set this up some time ago, and forgot how, so figured I would document it.
Continue reading