From 8e7eeaa4dd14621bda15e396fcd7b9187bc500c5 Mon Sep 17 00:00:00 2001 From: Anders F Björklund Date: Sun, 5 Sep 2021 22:16:59 +0200 Subject: Implement virtfs volumes for podman machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow using the built-in 9pfs feature of qemu, mounting host directories into vm mountpoints. The volumes are generic, the mounts are specific. Wait for the machine to be "running", otherwise the SSH function might throw an error instead. Increase the default msize from 8 KiB to 128 KiB [NO NEW TESTS NEEDED] Signed-off-by: Anders F Björklund --- cmd/podman/machine/init.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman/machine/init.go') diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index 14e87c201..b913a252e 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -88,6 +88,10 @@ func init() { flags.StringVar(&initOpts.ImagePath, ImagePathFlagName, cfg.Machine.Image, "Path to qcow image") _ = initCmd.RegisterFlagCompletionFunc(ImagePathFlagName, completion.AutocompleteDefault) + VolumeFlagName := "volume" + flags.StringArrayVarP(&initOpts.Volumes, VolumeFlagName, "v", []string{}, "Volumes to mount, source:target") + _ = initCmd.RegisterFlagCompletionFunc(VolumeFlagName, completion.AutocompleteDefault) + IgnitionPathFlagName := "ignition-path" flags.StringVar(&initOpts.IgnitionPath, IgnitionPathFlagName, "", "Path to ignition file") _ = initCmd.RegisterFlagCompletionFunc(IgnitionPathFlagName, completion.AutocompleteDefault) -- cgit v1.2.3-54-g00ecf