Update kvm-debian things, ssh and networking

This commit is contained in:
IntenseWebs 2024-01-17 06:06:08 -06:00
parent 6faf1eb501
commit 7c5d39f8af
4 changed files with 40 additions and 4 deletions

View File

@ -28,6 +28,11 @@ sudo vi /etc/hostname
ctp1.intensewebs.com
sudo systemctl restart networking
# Frozen SSH afterwards do this:
<enter>
~
.
___________________________________________________________________________
# OPTIONAL NOT NEEDED METHODS
# IF DESIRING TO USE Netork Manager: sudo apt install network-manager

View File

@ -14,8 +14,7 @@ vi /etc/sudoers
sudo apt install openssh-server
systemctl enable sshd
systemctl start sshd
firewall-cmd --add-service=ssh --permanent
firewall-cmd --reload
# sudo firewall-cmd --add-service=ssh --permanent && firewall-cmd --reload
# Switchback to normal user and add public key to authorized_keys
cd ~

Binary file not shown.

View File

@ -1,14 +1,21 @@
https://linuxways.net/debian/how-to-install-kvm-on-debian-12/
# Checks Intel
grep -e 'vmx' /proc/cpuinfo
# Checks AMD-V
grep -e 'svm' /proc/cpuinfo
# Check both Intel and AMD
grep -E --color=auto 'vmx|svm|0xc0f' /proc/cpuinfo
lscpu | grep Virtualization
lsmod | grep kvm
sudo modprobe vhost_net
lsmod | grep vhost
cat /sys/module/kvm_amd/parameters/nested
# sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager -y
Debian /usr/bin/qemu-system-x86_64
Almalinux /usr/libexec/qemu-kvm
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin virt-viewer -y
sudo apt install libvirt-daemon-system qemu-kvm qemu-system libvirt-clients bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin virt-viewer -y
sudo apt install virt-manager -y
sudo systemctl start libvirtd
sudo systemctl enable --now libvirtd
@ -16,6 +23,31 @@ sudo systemctl enable --now libvirtd
sudo usermod -a -G libvirt,kvm $USER
sudo reboot
**WARNING** Be on server as root. nmtui for graphical. RECOMMENDED using nmtui
sudo virsh net-list --all
# sudo virsh net-start host-bridge
# sudo virsh net-autostart host-bridge
sudo modprobe vhost_net
sudo vi /etc/modules
# Add vhost_net
ip addr
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
iface br0 inet static
address 192.168.1.203
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.131
dns-domain intensewebs.com
dns-nameservers 192.168.1.140 192.168.1.141 192.168.1.124
bridge_ports enp1s0
bridge_stp off
bridge_waitport 0
bridge fd 0
______________________________________________________________________________
**WARNING** Be on server as root. nmtui for graphical. RECOMMENDED using nmtui
# create file if not created
sudo vi /etc/sysctl.d/bridge.conf