Add cloneType to fusion driver

This commit is contained in:
Conrad Jones 2018-06-30 16:31:42 +01:00
parent abfb9f24d6
commit d9b6924986
2 changed files with 17 additions and 2 deletions

View File

@ -19,10 +19,18 @@ type Fusion6Driver struct {
}
func (d *Fusion6Driver) Clone(dst, src string, linked bool) error {
var cloneType string
if linked {
cloneType = "linked"
} else {
cloneType = "full"
}
cmd := exec.Command(d.vmrunPath(),
"-T", "fusion",
"clone", src, dst,
"full")
cloneType)
if _, _, err := runAndLog(cmd); err != nil {
if strings.Contains(err.Error(), "parameters was invalid") {
return fmt.Errorf(

View File

@ -16,10 +16,17 @@ type Player6Driver struct {
func (d *Player6Driver) Clone(dst, src string, linked bool) error {
// TODO(rasa) check if running player+, not just player
var cloneType string
if linked {
cloneType = "linked"
} else {
cloneType = "full"
}
cmd := exec.Command(d.Player5Driver.VmrunPath,
"-T", "ws",
"clone", src, dst,
"full")
cloneType)
if _, _, err := runAndLog(cmd); err != nil {
return err