User Tools

Site Tools


kvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kvm [2022/09/19 02:48] – [Debian] vissiekvm [2023/06/01 00:52] (current) – [Debian] vissie
Line 7: Line 7:
 <code> <code>
  
-sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst+sudo apt install --no-install-recommends qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst dnsmasq qemu-utils ovmf 
 +#  Some apps does not get installed with --no-install-recommends and seemds to be added: qemu-utils dnsmasq 
 +# ovmf is for uf
 sudo systemctl status libvirtd.service sudo systemctl status libvirtd.service
 sudo virsh net-list --all sudo virsh net-list --all
Line 21: Line 23:
  
 </code> </code>
 +
 +=====Stop all iptables rules=====
 +I had issues where these rules were interfering with my iptables manual rules. This worked
 +  So edit your network (virsh net-edit) to <forward mode='open'/>.
 +
 +
  
 If you want to offload the mechanism of “virtio-net” and want to improve the performance of KVM VMs then add “vhost_net” kernel module on your system using the beneath command, If you want to offload the mechanism of “virtio-net” and want to improve the performance of KVM VMs then add “vhost_net” kernel module on your system using the beneath command,
Line 54: Line 62:
 </code> </code>
  
 +======Setup Bridges Network======
 +  sudo vim /etc/network/interfaces
 +<sxh bash; gutter: false>  
 +# This file describes the network interfaces available on your system
 +
 +source /etc/network/interfaces.d/*
 +
 +# The loopback network interface
 +auto lo
 +iface lo inet loopback
 +
 +# The primary network interface
 +# allow-hotplug enp0s31f6
 +#iface enp0s31f6 inet dhcp
 +#auto enp0s31f6
 +
 +auto br0
 +iface br0 inet dhcp
 +    bridge_ports enp0s31f6
 +    bridge_stp off
 +    bridge_fd 0
 +    bridge_maxwait 0   
 +</sxh>
  
 ====== Allow ping in host====== ====== Allow ping in host======
Line 171: Line 202:
 </code> </code>
  
 +
 +<code>
 +qemu-system-x86_64 \
 +  -boot d \
 +  -cdrom "Bliss-v14.10-x86_64-OFFICIAL-opengapps-20221027.iso" \
 +  -bios /usr/share/ovmf/x64/OVMF.fd \
 +  -nodefaults \
 +  -enable-kvm \
 +  -smp 8 \
 +  -device intel-hda \
 +  -device hda-duplex \
 +  -device virtio-vga-gl \
 +  -net nic \
 +  -net user,hostfwd=tcp::5555-:5555 \
 +  -cpu host \
 +  -m 4096 \
 +  -display sdl,gl=on \
 +  -hda Android.img
 +</code>
 ===== Stop a running domain ===== ===== Stop a running domain =====
 <code> <code>
kvm.1663580926.txt.gz · Last modified: 2022/09/19 02:48 by vissie