Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qemu-4.0.0-r3 upgrade from 3.1.0-r4 fails(solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 380
Location: Canada

PostPosted: Tue May 28, 2019 4:38 pm    Post subject: qemu-4.0.0-r3 upgrade from 3.1.0-r4 fails(solved) Reply with quote

With qemu-3.1.0-r4
the following virtual machine works fine when run under sudo

Code:
#!/bin/sh
export QEMU_AUDIO_DRV=pa
 
  exec  qemu-system-x86_64 -enable-kvm   -rtc base=localtime  \
        -cpu   qemu64  -smp 8 \
     -drive file=win10c.img,if=virtio,format=raw,cache=unsafe \
        -m 8G \
          -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no,vhost=on, -net user,smb=//home/owner/,hostname=Invariant \
        -soundhw   hda\
         -vga cirrus \
        -name Windows10 \
        "$@"
       
        #qemu64




When run with qem-4.0.0-r3 it fails with this error message
Quote:
qemu-system-x86_64:
Fontconfig error: Cannot scan config file "infinality/conf.d"
qemu-system-x86_64: -net tap,ifname=tap0,script=no,downscript=no,vhost=on,: warning: tap: open vhost char device failed: No such file or directory
audio: warning: Using timer based audio emulation


The audio warning is unimportant to me.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Guru
Guru


Joined: 25 Sep 2007
Posts: 380
Location: Canada

PostPosted: Wed May 29, 2019 11:50 pm    Post subject: Reply with quote

Solution involves setting up tap device properly configured for qemu.
(Step 1) Install net-misc/bridge-utils from the gentoo portage tree.
(Step 2) Configure you kernel for tun/tap devices. In drivers,network device drivers, enable as built in (not modules)
ip-vlan and IP-Vlan based tap driver.
(Step3) Run the following as root
Code:
#!/bin/sh
ip tuntap add name tap0 mode tap
ifconfig tap0  0.0.0.0 up
brctl addbr br0
brctl stp br0 off
ifconfig br0 10.10.10.2 netmask 255.255.255.0


(Step 4) I changed the line
Quote:
-net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no,vhost=on,

to
Quote:
-net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no,vhost=off
in my virtual machine.

Notes: (1) have read that this will not work with wifi connections-I have only used it with ethernet.
(2) I have also read that his leaves your virtual qemu machine exposed to the "outside" but I am behind a NAT ed home router that I trust.
(3) I don't know why my machine even had networking under qem-3. perhaps qemu-3 used some other networking default whereas qemu-4
requires you set the network up more carefully. However this networking performance is as good as if I were not in the virtual qemu machine.
(4) I run the virtual machine under my own user identity.
(5) Step 3 should not be repeated if you close your virtual machine and then restart it.
(6) I offer no guarantees regarding security and performance for anyone else but this does seem to work for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum