diff --git a/pkg/machine/e2e/init_test.go b/pkg/machine/e2e/init_test.go index 96bd48fd1e..0e638ba0da 100644 --- a/pkg/machine/e2e/init_test.go +++ b/pkg/machine/e2e/init_test.go @@ -136,12 +136,11 @@ var _ = Describe("podman machine init", func() { Expect(foundMemory).To(BeNumerically(">", 3800000)) Expect(foundMemory).To(BeNumerically("<", 4200000)) - // TODO timezone setting is broken in FCOS rn. It is either ignition or a change in fedora. - // sshTimezone := sshMachine{} - // timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHCommand([]string{"date"})).run() - // Expect(err).ToNot(HaveOccurred()) - // Expect(timezoneSession).To(Exit(0)) - // Expect(timezoneSession.outputToString()).To(ContainSubstring("HST")) + sshTimezone := sshMachine{} + timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHCommand([]string{"date"})).run() + Expect(err).ToNot(HaveOccurred()) + Expect(timezoneSession).To(Exit(0)) + Expect(timezoneSession.outputToString()).To(ContainSubstring("HST")) }) It("machine init with volume", func() { diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index 4bb41376e7..ac457360d1 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -127,8 +127,11 @@ func (ign *DynamicIgnition) GenerateIgnitionConfig() error { User: GetNodeUsr("root"), }, LinkEmbedded1: LinkEmbedded1{ - Hard: BoolToPtr(false), - Target: filepath.Join("/usr/share/zoneinfo", tz), + Hard: BoolToPtr(false), + // We always want this value in unix form (/path/to/something) because this is being + // set in the machine OS (always Linux). However, filepath.join on windows will use a "\\" + // separator; therefore we use ToSlash to convert the path to unix style + Target: filepath.ToSlash(filepath.Join("/usr/share/zoneinfo", tz)), }, } ignStorage.Links = append(ignStorage.Links, tzLink)