There are two parts to networking within QEMU:
- The virtual network device that is provided to the guest (e.g. a PCI network card).
- The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).
| $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
I have not been able to use ssh-keygen -e to reliably generate a private key for SSH in PEM format. This format is sometimes used by commercial products. Instead, I had to convert the key using openssl.
# generate an RSA key of size 2048 bits
ssh-keygen -t rsa -b 2048 -f jabba -C 'ronnie-jabba'
# copy key to 10.1.56.50 and add to authorized_keys| #!/bin/busybox sh | |
| # 1) Download a prebuilt BusyBox binary here: | |
| # https://busybox.net/downloads/binaries/ | |
| # | |
| # 2) Prepare your kernel | |
| # cp /boot/vmlinuz vmlinuz | |
| # | |
| # 3) Copy the files | |
| # install -Dm0755 busybox-x86_64 initramfs/bin/busybox |
| # Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. | |
| # I used this to connect to my university's wireless network on Arch linux. | |
| # Here's the command I used: | |
| # | |
| # wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf | |
| # | |
| network={ | |
| ssid="YOUR_SSID" | |
| scan_ssid=1 |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" | |
| ) |
| 1. Take a backup of docker.service file. | |
| $ cp /lib/systemd/system/docker.service /lib/systemd/system/docker.service.orig | |
| 2. Modify /lib/systemd/system/docker.service to tell docker to use our own directory | |
| instead of default /var/lib/docker. In this example, I am using /p/var/lib/docker | |
| Apply below patch. | |
| $ diff -uP -N /lib/systemd/system/docker.service.orig /lib/systemd/system/docker.service | |
| --- /lib/systemd/system/docker.service.orig 2018-12-05 21:24:20.544852391 -0800 |
| # Remap prefix from 'C-b' to 'C-a'. | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| # Reload config file. | |
| bind-key r source-file ~/.tmux.conf\; display ' Reloaded tmux config.' | |
| # Split panes using | and -. | |
| bind-key | split-window -h -c '#{pane_current_path}' |
| #!/bin/bash | |
| set -xe | |
| # $0 host dev remote_ip | |
| # host is 1 or 2 | |
| # on vmA | |
| # ./mk-vx.sh 1 ens3 10.10.10.9 | |
| # on vmB | |
| # ./mk-vx.sh 2 ens3 10.10.10.15 |