Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTM Qemu VM: cannot set subnet, invalid parameter net #5128

Closed
davidbitterlich opened this issue Mar 17, 2023 · 4 comments
Closed

UTM Qemu VM: cannot set subnet, invalid parameter net #5128

davidbitterlich opened this issue Mar 17, 2023 · 4 comments
Milestone

Comments

@davidbitterlich
Copy link

davidbitterlich commented Mar 17, 2023

Describe the issue
Unable to start QEMU when setting a specific Guest Network subnet (VM settings -> devices -> Network -> Shared Network -> advanced settings)
I am able to successfully change the settings, but when I try to start QEMU afterwards, I get an error message that QEMU was stopped because of the invalid parameter 'net'.

Bildschirm­foto 2023-03-17 um 09 58 50
Bildschirm­foto 2023-03-17 um 09 59 18

I don't know if I misconfigured something in the settings, so please inform me about what I did wrong and close this issue in case I did something wrong. I also took a look in the official documentation https://docs.getutm.app/settings-qemu/devices/network/network/ but did not find any information where I could have done a mistake.

Basically what I want to achieve is that my VM(s) always have the same subnet and that this does not randomly switch, as currently they do randomly from 192.168.65.0/24 to 192.168.67.0/24 and I hoped that I could prevent UTM from doing that using these settings...

Configuration

  • UTM Version: 4.1.6 (75)
  • macOS Version: 13.2.1
  • Mac Chip (Intel, M1, ...): M2 Max

Crash log
No crash and therefore no crash log

Debug log
debug.log

Upload VM
config.plist.zip

@mprzybylski
Copy link

I have the same problem when trying to specify a non-default subnet for a host-only interface.
Configuration:

  • UTM Version: 4.1.6 (75)
  • macOS Version: 13.2.1 (22D68)
  • Mac Chip: M1 Max

** Debug log**
debug.log

Upload VM
config.plist.zip

@davidbitterlich
Copy link
Author

davidbitterlich commented Mar 24, 2023

So far I've figured out that the subnet is anyhow defined in /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist --- and this was the main reason why I even tried to change the subnet in UTM settings

My workaround to the subnet problem is to change the subnet there manually, but this is not a permanent solution for this problem. Actually I'm not even sure if this problem is caused by UTM itself or caused by Apple's Virtualization.Framework itself, but I hope that on clever developer who is familiar to UTM could find a solution or fix for this :)

@brad-x
Copy link

brad-x commented Mar 28, 2023

Main issue is the syntax for the vmnet-shared netdev changed during its development and UTM just needs an update to the new ones - example QEMU arguments:

-netdev vmnet-shared,start-address=10.0.2.1,end-address=10.0.2.254,subnet-mask=255.255.255.0

With that fix wired up to the UI, specifying alternate subnets and etc will work as expected

@davidbitterlich
Copy link
Author

This topic should be treated as a bug since the UI needs an update to properly set the netdev. It is clear that the QEMU command line interface has changed between the updates and UTM needs to respect the adjusted settings.

As a workaround I played around a bit with the settings and tried to add these parameters manually to the QEMU command - which did not work, since the id is missing (first complainment) and second there is already a netdev passed to QEMU via UTM - so I removed it and it seemed to work, since it fired up my VM and I saw on my host that the network bridge was created with the correct inet address (in my test scenario it was 192.168.66.1).

@osy osy added this to the v4.2 milestone Apr 5, 2023
@osy osy closed this as completed in 97c7fef Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants