Always use .vmdk suffix after streamOptimized conversion
b/c vCenter gets confused by the .stream suffix
This commit is contained in:
parent
e41dc46748
commit
963e46f50d
1 changed files with 2 additions and 1 deletions
|
|
@ -3,10 +3,11 @@ package vmware
|
|||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func OpenAsStreamOptimizedVmdk(imagePath string) (*os.File, error) {
|
||||
newPath := imagePath + ".stream"
|
||||
newPath := strings.TrimSuffix(imagePath, ".vmdk") + "-stream.vmdk"
|
||||
cmd := exec.Command(
|
||||
"/usr/bin/qemu-img", "convert", "-O", "vmdk", "-o", "subformat=streamOptimized",
|
||||
imagePath, newPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue