Blame
Date:
Sun Jan 29 05:00:28 2023 UTC
Message:
Daily backup
01
2023-01-22
jrmu
version=pmwiki-2.2.130 ordered=1 urlencoded=1
02
2023-01-22
jrmu
agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
03
2023-01-22
jrmu
author=miniontoby
04
2023-01-22
jrmu
charset=UTF-8
05
2023-01-22
jrmu
csum=fixed the .iso
06
2023-01-22
jrmu
ctime=1627536240
07
2023-01-22
jrmu
host=45.136.74.157
08
2023-01-22
jrmu
name=Vmm.Configure
09
2023-01-22
jrmu
rev=5
10
2023-01-22
jrmu
targets=
11
2023-01-22
jrmu
text=(:title Configure vmm on OpenBSD:)%0a%0aYou will need to install vmm-firmware (which appears to be free software):%0a%0a[@%0a$ doas pkg_add vmm-firmware%0a@]%0a%0aBy default, there are only four tap interfaces. We need to create sufficient devices for all our virtual machines:%0a%0a[@%0a# cd /dev%0a# for i in $(jot 50 4 50); do sh MAKEDEV tap$i; done%0a@]%0a%0aWe need to increase arpq because we may have so many virtual machines on the same switch:%0a%0a[@%0a# sysctl net.inet.ip.arpq.maxlen=1024%0a# echo "net.inet.ip.arpq.maxlen=1024" >> /etc/sysctl.conf%0a@]%0a%0aWe will need to permit IPv4 and IPv6 forwarding for our virtual machines:%0a%0a[@%0a# sysctl net.inet.ip.forwarding=1%0a# echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf%0a# sysctl net.inet6.ip6.forwarding=1%0a# echo "net.inet6.ip6.forwarding=1" >> /etc/sysctl.conf%0a@]%0a%0aNext we must create /etc/hostname.bridge0:%0a%0a[@%0aadd if0%0a@]%0a%0awhere if0 is the interface device.%0a%0aWe edit /etc/vm.conf:%0a%0a[@%0asocket owner :vmdusers%0a%0aswitch "switch0" {%0a interface bridge0%0a}%0a%0avm "user123" {%0a owner user123%0a memory 512M%0a cdrom "/home/iso/install69.iso"%0a disk /home/user123/user123.qcow2%0a interface { %0a locked lladdr aa:bb:cc:dd:ee:01%0a switch "switch0"%0a }%0a}%0a@]%0a%0a***WARNING***: Do ***not*** use aa:bb:cc:dd:ee:xx. Make sure to choose your own random lladdr. However, make sure not to pick a broadcast MAC address. If the first octet of the address is an odd number (such as f1:xx:xx:xx:xx:xx or f3:xx:xx:xx:xx:xx), it will appear as a broadcast device and may be the cause of routing issues. Networking will no longer work as a result.%0a%0aNext we will need to download our [[https://openbsd.org/ftp.html|ISO for OpenBSD]].%0a%0a[@%0a$ doas useradd -m -g =uid -c "iso" -d /home/iso -s /sbin/nologin iso%0a$ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso%0a$ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/SHA256.sig%0a$ signify -C -p /etc/signify/openbsd-70-base.pub -x SHA256.sig install70.iso%0aSignature Verified%0ainstall70.iso: OK%0a$ doas mv install70.iso /home/iso/%0a$ doas mv SHA256.sig /home/iso/%0a$ doas chown -R iso:iso /home/iso/%0a@]%0a%0aIf the signature does not verify, don't proceed.%0a%0aWe will want to enable and start vmd:%0a%0a[@%0a$ doas rcctl enable vmd%0a$ doas rcctl start vmd %0a@]%0a%0aWe need to create a new group vmdusers for each of our users so they can access the serial console:%0a%0a[@%0a# groupadd vmdusers%0a# chown root:vmdusers /var/run/vmd.sock%0a@]%0a%0aFor each virtual machine, we create a user and a disk image using install.pl:%0a%0a[@%0a$ ./install.pl%0a@]%0a%0a[@%0a# vmctl create -s 20G user.qcow2%0a@]%0a%0aYou will need to add this crontab entry for a user to prevent the networking from timing out:%0a%0aFor openbsd:%0a%0a[@%0a@reboot /usr/bin/tmux new -d 'while true; do /sbin/ping -i5 38.87.162.1; done' \;%0a@]%0a%0aIf some users are using the wrong IPs, you can run tcpdump with the -e flag to show the lladdr of tcp packets.%0a
12
2023-01-22
jrmu
time=1660205276
13
2023-01-22
jrmu
title=Configure vmm on OpenBSD
14
2023-01-22
jrmu
author:1660205276=miniontoby
15
2023-01-22
jrmu
csum:1660205276=fixed the .iso
16
2023-01-22
jrmu
diff:1660205276:1648211416:=67c67%0a%3c $ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso%0a---%0a> $ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install69.iso%0a
17
2023-01-22
jrmu
host:1660205276=45.136.74.157
18
2023-01-22
jrmu
author:1648211416=mkf
19
2023-01-22
jrmu
csum:1648211416=clean up a bit
20
2023-01-22
jrmu
diff:1648211416:1636148691:minor=109a110,112%0a> %0a> For debian:%0a> %0a
21
2023-01-22
jrmu
host:1648211416=2.178.144.54
22
2023-01-22
jrmu
author:1636148691=mkf
23
2023-01-22
jrmu
csum:1636148691=so we look cool now.
24
2023-01-22
jrmu
diff:1636148691:1635242518:=67,69c67,69%0a%3c $ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install69.iso%0a%3c $ ftp https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/SHA256.sig%0a%3c $ signify -C -p /etc/signify/openbsd-70-base.pub -x SHA256.sig install70.iso%0a---%0a> $ ftp https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/install69.iso%0a> $ ftp https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/SHA256.sig%0a> $ signify -C -p /etc/signify/openbsd-69-base.pub -x SHA256.sig install69.iso%0a71,72c71,72%0a%3c install70.iso: OK%0a%3c $ doas mv install70.iso /home/iso/%0a---%0a> install69.iso: OK%0a> $ doas mv install68.iso /home/iso/%0a111a112,115%0a> %0a> [@%0a> @reboot /usr/bin/tmux new -d 'while true; do /usr/bin/ping -i5 38.87.162.1; done' \;%0a> @]%0a
25
2023-01-22
jrmu
host:1636148691=2.178.144.223
26
2023-01-22
jrmu
author:1635242518=jrmu
27
2023-01-22
jrmu
diff:1635242518:1627536240:minor=61c61%0a%3c ***WARNING***: Do ***not*** use aa:bb:cc:dd:ee:xx. Make sure to choose your own random lladdr. However, make sure not to pick a broadcast MAC address. If the first octet of the address is an odd number (such as f1:xx:xx:xx:xx:xx or f3:xx:xx:xx:xx:xx), it will appear as a broadcast device and may be the cause of routing issues. Networking will no longer work as a result.%0a---%0a> ***WARNING***: Do ***not*** use aa:bb:cc:dd:ee:xx. Make sure to choose your own random lladdr. However, make sure not to pick a broadcast MAC address. If the first octet of the address is an odd number (such as f1:xx:xx:xx:xx:xx or f3:xx:xx:xx:xx:xx), it will appaer as a broadcast device and may be the cause of routing issues. Networking will no longer work as a result.%0a
28
2023-01-22
jrmu
host:1635242518=125.231.56.80
29
2023-01-22
jrmu
author:1627536240=jrmu
30
2023-01-22
jrmu
diff:1627536240:1627536240:=1,118d0%0a%3c (:title Configure vmm on OpenBSD:)%0a%3c %0a%3c You will need to install vmm-firmware (which appears to be free software):%0a%3c %0a%3c [@%0a%3c $ doas pkg_add vmm-firmware%0a%3c @]%0a%3c %0a%3c By default, there are only four tap interfaces. We need to create sufficient devices for all our virtual machines:%0a%3c %0a%3c [@%0a%3c # cd /dev%0a%3c # for i in $(jot 50 4 50); do sh MAKEDEV tap$i; done%0a%3c @]%0a%3c %0a%3c We need to increase arpq because we may have so many virtual machines on the same switch:%0a%3c %0a%3c [@%0a%3c # sysctl net.inet.ip.arpq.maxlen=1024%0a%3c # echo "net.inet.ip.arpq.maxlen=1024" >> /etc/sysctl.conf%0a%3c @]%0a%3c %0a%3c We will need to permit IPv4 and IPv6 forwarding for our virtual machines:%0a%3c %0a%3c [@%0a%3c # sysctl net.inet.ip.forwarding=1%0a%3c # echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf%0a%3c # sysctl net.inet6.ip6.forwarding=1%0a%3c # echo "net.inet6.ip6.forwarding=1" >> /etc/sysctl.conf%0a%3c @]%0a%3c %0a%3c Next we must create /etc/hostname.bridge0:%0a%3c %0a%3c [@%0a%3c add if0%0a%3c @]%0a%3c %0a%3c where if0 is the interface device.%0a%3c %0a%3c We edit /etc/vm.conf:%0a%3c %0a%3c [@%0a%3c socket owner :vmdusers%0a%3c %0a%3c switch "switch0" {%0a%3c interface bridge0%0a%3c }%0a%3c %0a%3c vm "user123" {%0a%3c owner user123%0a%3c memory 512M%0a%3c cdrom "/home/iso/install69.iso"%0a%3c disk /home/user123/user123.qcow2%0a%3c interface { %0a%3c locked lladdr aa:bb:cc:dd:ee:01%0a%3c switch "switch0"%0a%3c }%0a%3c }%0a%3c @]%0a%3c %0a%3c ***WARNING***: Do ***not*** use aa:bb:cc:dd:ee:xx. Make sure to choose your own random lladdr. However, make sure not to pick a broadcast MAC address. If the first octet of the address is an odd number (such as f1:xx:xx:xx:xx:xx or f3:xx:xx:xx:xx:xx), it will appaer as a broadcast device and may be the cause of routing issues. Networking will no longer work as a result.%0a%3c %0a%3c Next we will need to download our [[https://openbsd.org/ftp.html|ISO for OpenBSD]].%0a%3c %0a%3c [@%0a%3c $ doas useradd -m -g =uid -c "iso" -d /home/iso -s /sbin/nologin iso%0a%3c $ ftp https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/install69.iso%0a%3c $ ftp https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/SHA256.sig%0a%3c $ signify -C -p /etc/signify/openbsd-69-base.pub -x SHA256.sig install69.iso%0a%3c Signature Verified%0a%3c install69.iso: OK%0a%3c $ doas mv install68.iso /home/iso/%0a%3c $ doas mv SHA256.sig /home/iso/%0a%3c $ doas chown -R iso:iso /home/iso/%0a%3c @]%0a%3c %0a%3c If the signature does not verify, don't proceed.%0a%3c %0a%3c We will want to enable and start vmd:%0a%3c %0a%3c [@%0a%3c $ doas rcctl enable vmd%0a%3c $ doas rcctl start vmd %0a%3c @]%0a%3c %0a%3c We need to create a new group vmdusers for each of our users so they can access the serial console:%0a%3c %0a%3c [@%0a%3c # groupadd vmdusers%0a%3c # chown root:vmdusers /var/run/vmd.sock%0a%3c @]%0a%3c %0a%3c For each virtual machine, we create a user and a disk image using install.pl:%0a%3c %0a%3c [@%0a%3c $ ./install.pl%0a%3c @]%0a%3c %0a%3c [@%0a%3c # vmctl create -s 20G user.qcow2%0a%3c @]%0a%3c %0a%3c You will need to add this crontab entry for a user to prevent the networking from timing out:%0a%3c %0a%3c For openbsd:%0a%3c %0a%3c [@%0a%3c @reboot /usr/bin/tmux new -d 'while true; do /sbin/ping -i5 38.87.162.1; done' \;%0a%3c @]%0a%3c %0a%3c For debian:%0a%3c %0a%3c [@%0a%3c @reboot /usr/bin/tmux new -d 'while true; do /usr/bin/ping -i5 38.87.162.1; done' \;%0a%3c @]%0a%3c %0a%3c %0a%3c If some users are using the wrong IPs, you can run tcpdump with the -e flag to show the lladdr of tcp packets.%0a
31
2023-01-22
jrmu
host:1627536240=38.87.162.8
IRCNow