Last active
January 1, 2022 15:00
-
-
Save leveled/5a53e2852be46555e0b0faa190708fbf to your computer and use it in GitHub Desktop.
Setting up kvm/qemu on Debian headless
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin | |
sudo adduser $USER libvirt | |
sudo adduser $USER libvirt-qemu | |
newgrp libvirt | |
newgrp libvirt-qemu | |
id #Verify group memberships | |
virsh --connect qemu:///system | |
virsh --connect qemu:///system command | |
virsh --connect qemu:///system list --all | |
#Verify kvm installation | |
egrep --color 'vmx|svm' /proc/cpuinfo | |
#Configure bridge interface network connection | |
sudo vi /etc/network/interfaces.d/br0 | |
``` | |
## make sure all config related to eth0 deleted ## | |
auto br0 | |
iface br0 inet static | |
address 192.168.2.23 ## set up/netmask/broadcast/gateway as per your setup | |
broadcast 192.168.2.255 | |
netmask 255.255.255.0 | |
gateway 192.168.2.254 | |
bridge_ports eth0 # replace eth0 with your actual interface name | |
bridge_stp off # disable Spanning Tree Protocol | |
bridge_waitport 0 # no delay before a port becomes available | |
bridge_fd 0 # no forwarding delay | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment