I want to run a virtual machine using QEMU and KVM on my Arch Linux host with a configuration such that I can ssh into the guest OS from my host, but I want to prevent the guest OS from being able to communicate with the internet. Currently, I use the following command line to invoke qemu:

qemu-system-x86_64 -enable-kvm -net user,hostfwd=tcp::8022-:22 -net nic,model=virtio -m 1G,slots=2,maxmem=3G -cpu host -M 1.6 -machine type=pc,accel=kvm -boot order=c -drive file="image.img",format=raw,aio=native,cache=none;

How should I configure qemu / host OS to prevent the guest from accessing the internet without limiting my ability to ssh into the guest to share files?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.