Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #based on tutorial at https://christitus.com/vm-setup-in-linux/
- #Check Virtualization Extension
- #should return greater than 0
- egrep -c '(vmx|svm)' /proc/cpuinfo
- sudo apt install qemu-kvm qemu-system qemu-utils python3 python3-pip libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
- sudo systemctl status libvirtd.service
- #Start Default Network for Networking
- sudo virsh net-start default
- sudo virsh net-autostart default
- #Check status with
- sudo virsh net-list --all
- #Add User to libvirt to Allow Access to VMs
- sudo usermod -aG libvirt $USER
- sudo usermod -aG libvirt-qemu $USER
- sudo usermod -aG kvm $USER
- sudo usermod -aG input $USER
- sudo usermod -aG disk $USER
- #reboot for permissions to take effect
- #Get ISO
- wget -c "http://mirror.slitaz.org/iso/rolling/slitaz-rolling.iso"
- qemu-system-i386 -enable-kvm -m 2G -smp 2 -boot d -cdrom slitaz-rolling.iso
- -enable-kvm → KVM to boost performance
- -m 4G → 4GB RAM
- -smp 2 → 2CPUs
- -hda myVirtualDisk.qcow2 → our 20GB variable-size disk
- -boot d → boots the first virtual CD drive
- -cdrom linuxmint-21.1-cinnamon-64bit.iso → Linux Mint ISO
- -netdev user,id=net0,net=192.168.0.0/24,dhcpstart=192.168.0.9 → NAT with DHCP
- -device virtio-net-pci,netdev=net0 → network card
- -vga qxl → powerful graphics card
- -device AC97 → sound card
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement