I have an android vm.I use qemu along with virgl for hardware acceleration.I had to build qemu from source for sdl and virgl support. I used the following build parameters
./configure --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk --enable-spice
My build directory is
/home/username/builds/qemu/qemu/build/
My VM launch options are
./qemu-system-x86_64 -boot c -enable-kvm -smp 1 -name android -device virtio-vga,virgl=on -net nic -net user,hostfwd=tcp::4444-:5555 -cpu host -device ES1370 -m 1028 -display sdl,gl=on -hda /home/username/Documents/android.img -usb -usbdevice tablet -machine q35 -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0
I would like to connect to my VM and host using kde connect.I assume that requires setting up a bridge and tap ,tun stuff.It would be nice if some one could suggest a easy method to do the above. My ifconfig output
username@username-H81 ~ [1]> ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.40 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7288:16a8:48fe:99e4 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:c2:08:55 txqueuelen 1000 (Ethernet)
RX packets 684976 bytes 626450094 (626.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 215101 bytes 23434472 (23.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 83058 bytes 67059421 (67.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 83058 bytes 67059421 (67.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My host system - Kubuntu 20.10
Guest - android9 from android x86 with kernel 4.9
Found a easy script to set up tap interface.credits
First find the logical name of your network device In my case enp3s0.(run the command
ifconfig
andls -la /sys/class/net/
to find out the logical name ignore the device with the name lo it is a loop back device)Then run these remember to replace eth0 with the logical name of your network device name.
Launch vm with
-netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device e1000,netdev=mynet0,mac=52:55:00:d1:55:01
To make this changes permanent you have to save these changes to /etc/network/interfaces but i am not sure how.Any help on doing that would be appreciated