diff --git a/pkg/machine/hyperv/machine.go b/pkg/machine/hyperv/machine.go index d93febe3aa..473676a40d 100644 --- a/pkg/machine/hyperv/machine.go +++ b/pkg/machine/hyperv/machine.go @@ -178,6 +178,7 @@ func (m *HyperVMachine) Init(opts machine.InitOptions) (bool, error) { // VSOCK-CONNECT:2 <- shortcut to connect to the hostvm ready := `[Unit] After=remove-moby.service sshd.socket sshd.service +After=systemd-user-sessions.service OnFailure=emergency.target OnFailureJobMode=isolate [Service] diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index e2d9c91e79..783f5cd368 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -334,6 +334,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) { ready := `[Unit] Requires=dev-virtio\\x2dports-%s.device After=remove-moby.service sshd.socket sshd.service +After=systemd-user-sessions.service OnFailure=emergency.target OnFailureJobMode=isolate [Service]