From 200030914f7836aa76a5b541d9896c3fcd327108 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 25 Nov 2025 17:53:53 +0100 Subject: [PATCH] pkg/machine: make mount units hook into local-fs The virtiofs mount points do not actually are network mounts so we can mount them earlier and using multi-user.target to enable them was wrong. Signed-off-by: Paul Holzinger --- pkg/machine/apple/apple.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/machine/apple/apple.go b/pkg/machine/apple/apple.go index 24a9c9b701..3ca329c8e5 100644 --- a/pkg/machine/apple/apple.go +++ b/pkg/machine/apple/apple.go @@ -78,7 +78,7 @@ func GenerateSystemDFilesForVirtiofsMounts(mounts []machine.VirtIoFs) ([]ignitio mountUnit.Add("Mount", "Where", "%s") mountUnit.Add("Mount", "Type", "virtiofs") mountUnit.Add("Mount", "Options", fmt.Sprintf("context=\"%s\"", machine.NFSSELinuxContext)) - mountUnit.Add("Install", "WantedBy", "multi-user.target") + mountUnit.Add("Install", "WantedBy", "local-fs.target") mountUnitFile, err := mountUnit.ToString() if err != nil { return nil, err @@ -102,7 +102,7 @@ func GenerateSystemDFilesForVirtiofsMounts(mounts []machine.VirtIoFs) ([]ignitio immutableRootOff.Add("Service", "Type", "oneshot") immutableRootOff.Add("Service", "ExecStart", "chattr -i /") - immutableRootOff.Add("Install", "WantedBy", "remote-fs-pre.target") + immutableRootOff.Add("Install", "WantedBy", "local-fs-pre.target") immutableRootOffFile, err := immutableRootOff.ToString() if err != nil { return nil, err @@ -118,12 +118,12 @@ func GenerateSystemDFilesForVirtiofsMounts(mounts []machine.VirtIoFs) ([]ignitio immutableRootOn := parser.NewUnitFile() immutableRootOn.Add("Unit", "Description", "Set / back to immutable after mounts are done") immutableRootOn.Add("Unit", "DefaultDependencies", "no") - immutableRootOn.Add("Unit", "After", "remote-fs.target") + immutableRootOn.Add("Unit", "After", "local-fs.target") immutableRootOn.Add("Service", "Type", "oneshot") immutableRootOn.Add("Service", "ExecStart", "chattr +i /") - immutableRootOn.Add("Install", "WantedBy", "remote-fs.target") + immutableRootOn.Add("Install", "WantedBy", "local-fs.target") immutableRootOnFile, err := immutableRootOn.ToString() if err != nil { return nil, err