diff options
author | Brent Baude <bbaude@redhat.com> | 2022-03-29 15:04:35 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2022-03-30 09:22:40 -0500 |
commit | a06df4fc1aca86ddc4007f4957b53509e8d39e19 (patch) | |
tree | 48a2dd58653d11813814effd38f2d0bb47035b52 /pkg/machine/qemu/options_darwin_arm64.go | |
parent | ff8834f0232f128b781ec23d66a5676da0670847 (diff) | |
download | podman-a06df4fc1aca86ddc4007f4957b53509e8d39e19.tar.gz podman-a06df4fc1aca86ddc4007f4957b53509e8d39e19.tar.bz2 podman-a06df4fc1aca86ddc4007f4957b53509e8d39e19.zip |
Machine refactor part 2
This PR further implements a more structured approach to handling the
files needed by machine. More files are now made as MachineFile which
can then have a symlink (using a shorter path) to them. Also added Set
and Get methods for many of the files.
The next part of the refactor will implement the use of symlinks on
MacOS.
Signed-off-by: Brent Baude <bbaude@redhat.com>
[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/qemu/options_darwin_arm64.go')
-rw-r--r-- | pkg/machine/qemu/options_darwin_arm64.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/machine/qemu/options_darwin_arm64.go b/pkg/machine/qemu/options_darwin_arm64.go index 5b6cdc86d..4c954af00 100644 --- a/pkg/machine/qemu/options_darwin_arm64.go +++ b/pkg/machine/qemu/options_darwin_arm64.go @@ -11,7 +11,7 @@ var ( ) func (v *MachineVM) addArchOptions() []string { - ovmfDir := getOvmfDir(v.ImagePath, v.Name) + ovmfDir := getOvmfDir(v.ImagePath.GetPath(), v.Name) opts := []string{ "-accel", "hvf", "-accel", "tcg", @@ -23,13 +23,13 @@ func (v *MachineVM) addArchOptions() []string { } func (v *MachineVM) prepare() error { - ovmfDir := getOvmfDir(v.ImagePath, v.Name) + ovmfDir := getOvmfDir(v.ImagePath.GetPath(), v.Name) cmd := []string{"/bin/dd", "if=/dev/zero", "conv=sync", "bs=1m", "count=64", "of=" + ovmfDir} return exec.Command(cmd[0], cmd[1:]...).Run() } func (v *MachineVM) archRemovalFiles() []string { - ovmDir := getOvmfDir(v.ImagePath, v.Name) + ovmDir := getOvmfDir(v.ImagePath.GetPath(), v.Name) return []string{ovmDir} } |