diff --git a/vm/filemanager.go b/vm/filemanager.go index 130b378..efba4a9 100644 --- a/vm/filemanager.go +++ b/vm/filemanager.go @@ -136,7 +136,7 @@ func (fm *FileManager) luksOpen(sc *ssh.Client, fullDevPath string) error { err = sess.Wait() if err != nil { if strings.Contains(stderrBuf.String(), "Not enough available memory to open a keyslot.") { - fm.logger.Warn("Detected not enough memory to open a LUKS device, please allocate more memory using --vm-mem-alloc flag.") + fm.logger.Warn("Detected not enough memory to open a LUKS device, please allocate more memory using --vm-mem-alloc flag") } return utils.WrapErrWithLog(err, "wait for cryptsetup luksopen cmd to finish", stderrBuf.String()) diff --git a/vm/os_specifics_windows.go b/vm/os_specifics_windows.go index 0bef4d0..7993d98 100644 --- a/vm/os_specifics_windows.go +++ b/vm/os_specifics_windows.go @@ -18,3 +18,8 @@ func prepareVMCmd(cmd *exec.Cmd) { func terminateProcess(pid int) error { return exec.Command("TASKKILL", "/T", "/F", "/PID", fmt.Sprint(pid)).Run() } + +func checkDeviceSeemsMounted(path string) (bool, error) { + // We do not have mount checks on Windows. + return false, nil +} diff --git a/vm/vm.go b/vm/vm.go index 7151058..88cc660 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -11,6 +11,7 @@ import ( "os/exec" "path/filepath" "runtime" + "strings" "sync" "sync/atomic" "time" @@ -163,7 +164,7 @@ func NewVM(logger *slog.Logger, cfg VMConfig) (*VM, error) { return nil, errors.Wrapf(err, "stat extra drive #%v path", i) } - driveArgs := "file=" + shellescape.Quote(extraDrive.Path) + ",format=qcow2,if=none,id=disk" + fmt.Sprint(i) + driveArgs := "file=" + shellescape.Quote(strings.ReplaceAll(extraDrive.Path, "\\", "/")) + ",format=qcow2,if=none,id=disk" + fmt.Sprint(i) if extraDrive.SnapshotMode { driveArgs += ",snapshot=on" }