@@ -9,20 +9,21 @@ import (
9
9
"github.com/abiosoft/colima/daemon"
10
10
"github.com/abiosoft/colima/daemon/process/inotify"
11
11
"github.com/abiosoft/colima/daemon/process/vmnet"
12
+ "github.com/abiosoft/colima/environment/container/incus"
12
13
"github.com/abiosoft/colima/environment/vm/lima/limaconfig"
13
14
"github.com/abiosoft/colima/util"
14
15
)
15
16
16
17
func (l * limaVM ) startDaemon (ctx context.Context , conf config.Config ) (context.Context , error ) {
17
- isQEMU := conf . VMType == limaconfig . QEMU
18
- isVZ := conf .VMType == limaconfig .VZ
18
+ // vmnet is used by QEMU and always used by incus (even with VZ)
19
+ useVmnet := conf .VMType == limaconfig .QEMU || conf . Runtime == incus . Name
19
20
20
- // network daemon is only needed for qemu
21
- conf .Network .Address = conf .Network .Address && isQEMU
21
+ // network daemon is only needed for vmnet
22
+ conf .Network .Address = conf .Network .Address && useVmnet
22
23
23
- // limited to macOS (with Qemu driver )
24
- // or vz with inotify enabled
25
- if ! util .MacOS () || (isVZ && ! conf .MountINotify ) {
24
+ // limited to macOS (with vmnet required )
25
+ // or with inotify enabled
26
+ if ! util .MacOS () || (! conf . MountINotify && ! conf .Network . Address ) {
26
27
return ctx , nil
27
28
}
28
29
@@ -48,7 +49,7 @@ func (l *limaVM) startDaemon(ctx context.Context, conf config.Config) (context.C
48
49
}
49
50
50
51
// add network processes to daemon
51
- if isQEMU {
52
+ if useVmnet {
52
53
a .Add (func () error {
53
54
if conf .Network .Address {
54
55
a .Stage ("preparing network" )
@@ -104,7 +105,7 @@ func (l *limaVM) startDaemon(ctx context.Context, conf config.Config) (context.C
104
105
105
106
// network failure is not fatal
106
107
if err := a .Exec (); err != nil {
107
- if isQEMU {
108
+ if useVmnet {
108
109
func () {
109
110
installed , _ := ctx .Value (networkInstalledKey ).(bool )
110
111
if ! installed {
0 commit comments