From a86495ea6fdd56519afc65586c0f7f9c0f4f5ab2 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Tue, 14 Dec 2021 14:16:09 -0600 Subject: Set machine timezone Added an option to podman machine init to declare the timezone of the resulting machine. the default is to use the value of the host name or else a given timezone name like America/Chicago. Fixes: #11895 Signed-off-by: Brent Baude [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude --- pkg/machine/qemu/machine.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/machine/qemu') diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 57c32bf74..19cd131e1 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -145,6 +145,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error { // Get image as usual v.ImageStream = opts.ImagePath dd, err := machine.NewFcosDownloader(vmtype, v.Name, opts.ImagePath) + if err != nil { return err } @@ -235,6 +236,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error { Name: opts.Username, Key: key, VMName: v.Name, + TimeZone: opts.TimeZone, WritePath: v.IgnitionFilePath, } return machine.NewIgnitionFile(ign) -- cgit v1.2.3-54-g00ecf