summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/qemu/machine.go')
-rw-r--r--pkg/machine/qemu/machine.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index fde520f03..f09107c71 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -172,8 +172,16 @@ func (v *MachineVM) Init(opts machine.InitOptions) (bool, error) {
// Add arch specific options including image location
v.CmdLine = append(v.CmdLine, v.addArchOptions()...)
- // TODO: add to opts
- volumeType := VolumeTypeVirtfs
+ var volumeType string
+ switch opts.VolumeDriver {
+ case "virtfs":
+ volumeType = VolumeTypeVirtfs
+ case "": // default driver
+ volumeType = VolumeTypeVirtfs
+ default:
+ err := fmt.Errorf("unknown volume driver: %s", opts.VolumeDriver)
+ return false, err
+ }
mounts := []Mount{}
for i, volume := range opts.Volumes {