Skip to content

Conversation

@norio-nomura
Copy link
Contributor

Based on VMNET_SHARED_MODE, and VMNET_HOST_MODE

networks:
- vzShared: true
- vzHost: true

But, to sharing network between multiple VMs, VZVmnetNetworkDeviceAttachment requires VMs are launched by same process.

It depends on Code-Hex/vz#205

@norio-nomura
Copy link
Contributor Author

Currently, both vzShared and vzHost have almost the same functions as vzNAT.

# - vzNAT: true
# requires `vmType: vz` and macOS 26.0 or later.
# - vzShared: true
# - vzHost: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with lima: shared, maybe we these one should be like vz: shared ?

@AkihiroSuda
Copy link
Member

Currently, both vzShared and vzHost have almost the same functions as vzNAT.

Any advantage using them?

@norio-nomura
Copy link
Contributor Author

Currently, both vzShared and vzHost have almost the same functions as vzNAT.

Any advantage using them?

As far as the API is concerned, customization that is not supported by vzNAT should be possible.
https://github.com/Code-Hex/vz/pull/205/files#diff-d7ec6a7a97f55e264883085a4676c2b0a5466a657e0e87312accd40caa67295dR80-R106
I still don't know what can be done with those APIs (including unimplemented).

Based on `VMNET_SHARED_MODE`, and `VMNET_HOST_MODE`
```yaml
networks:
- vzShared: true
- vzHost: true
```
But, to sharing network between multiple VMs, `VZVmnetNetworkDeviceAttachment` requires VMs are launched by same process.

It depends on Code-Hex/vz#205

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the use-vz-vmnet-network-device-attachment branch from 07eebec to 270556e Compare December 3, 2025 07:59
@norio-nomura
Copy link
Contributor Author

Added limactl vz-vmnet-shared

It shares VmnetNetwork serialization between VMs using SharedMode.

  • limactl vz-vmnet-shared --enable-mach-service: register Mach service and launch
  • limactl vz-vmnet-shared --enable-mach-service=false: unregister Mach service

When the limactl executable file is updated due to rebuilds, etc., the VM using the serialization data held by the Mach server before the update cannot be booted.
It is necessary to add a version check and restart the service as appropriate.
Also, it seems that it cannot be used with an external vz driver.

@norio-nomura norio-nomura force-pushed the use-vz-vmnet-network-device-attachment branch from 270556e to 81d4cc6 Compare December 3, 2025 10:09
It shares `VmnetNetwork` serialization between VMs using SharedMode.
- `limactl vz-vmnet-shared --enable-mach-service`: register Mach service and launch
- `limactl vz-vmnet-shared --enable-mach-service=false`: unregister Mach service

When the `limactl` executable file is updated due to rebuilds, etc., the VM using the serialization data held by the Mach server before the update cannot be booted.
It is necessary to add a version check and restart the service as appropriate.
Also, it seems that it cannot be used with an external vz driver.

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the use-vz-vmnet-network-device-attachment branch from 81d4cc6 to 57553f8 Compare December 4, 2025 01:54
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

Successfully merging this pull request may close these issues.

2 participants