The officially official Devuan Forum!

You are not logged in.

#1 2024-01-03 14:13:00

ks
Member
Registered: 2018-05-08
Posts: 28  

[SOLVED] Qemu networking client to host fails

On my last devuan installation I used to be able to run win7 via qemu once a month for a legacy app that's no longer updated using the following command:

  kvm -hda ~/.qemu_disks/win7.qcow2 -m 4096 -net nic,vlan=1 -net user,vlan=1,name=ks

That fails now with Daedalus, but after googling for a couple of hours I haven't been able to get my windows 7 vm running due to the change in network params. All I really need is to get files from linux to the VM, verifying them under win7 with a commercial app and copying a "report" from VM back to linux. For data in/out I use winscp which works quite well.

I'd prefer not to have to buy a box just to run windows once a month. Can someone chime in and tell me how to get networking going again?

tia

ks

Offline

#2 2024-01-03 16:01:15

siva
Member
Registered: 2018-01-25
Posts: 282  

Re: [SOLVED] Qemu networking client to host fails

Can you post any logs or error messages related to this issue?

From your POV, what exactly happens when you try to run that command?

Edit:

- Semi-related but you might also want to look into a shared drive. https://shallowsky.com/blog/linux/qemu- … older.html
- Isn't -net deprecated? You may want to try the -nic or -netdev options instead. https://wiki.qemu.org/Documentation/Networking

For example, I have a QEMU system that uses a NAT and Host-Only network with the following configuration:

~$ qemu-system-x86_64 \
...
# NAT/Shared network
-device e1000,mac=D6:CF:07:FD:63:BD,netdev=net0 \
-netdev user,id=net0 \

# Host-Only network.
-device e1000,mac=B6:4D:E5:F7:B9:94,netdev=net1 \
-netdev tap,id=net1,ifname=tap0 \
...

For a host-only network, you may need to define the interface yourself. There are a few guides on how to do so. This one worked for me, but you may need to install dnsmasq and tweak the interface names or IP ranges: https://alberand.com/host-only-networki … visor.html. I updated the above code block to reflect the guide.

Last edited by siva (2024-01-03 17:10:35)

Offline

#3 2024-01-03 19:31:51

ks
Member
Registered: 2018-05-08
Posts: 28  

Re: [SOLVED] Qemu networking client to host fails

The 3rd example at wiki.qemu.org under User Networking did the trick. What I've been reading earlier was all very elaborate and more confusing than explaining. This wiki example is shorter than what I've been using, so it wins already. It also has the benefit of doing exactly what I wanted.

This is what I wound up with:

	qemu-system-x86_64 -enable-kvm -m 3G -hda win7.qcow2	-netdev user,id=net0	-device e1000,netdev=net0

thanks

ks

PS: forgot about error messages. All it said was that vlan was deprecated, logfiles didn't have any entries.

Last edited by ks (2024-01-03 19:33:47)

Offline

#4 2024-01-03 20:02:11

siva
Member
Registered: 2018-01-25
Posts: 282  

Re: [SOLVED] Qemu networking client to host fails

Yeah their official wiki is pretty straightforward. Glad everything worked out.

Offline

Board footer