Skip to content

Commit d6dd1a5

Browse files
committed
extract: virtualbox close previous image if any
fix error if extracting more than once to same path, cause vbox manage internal database of disk and cry about duplicity
1 parent 3c21bad commit d6dd1a5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

scripts/extract_from_vm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function from_virtualbox() {
5757

5858
[ -r "$VIRTUAL_BOX_VM_ROOT/nice_$DISTRO.vdi" ] || dd "Cannot find VDI '$VIRTUAL_BOX_VM_ROOT/nice_$DISTRO.vdi'"
5959
echo "Extracting virtual disk image"
60+
VBoxManage closemedium "$NICE_EXTRACT_DISTRO_HDD_IMAGE_PATH" &> /dev/null
6061
VBoxManage clonehd --format RAW "$VIRTUAL_BOX_VM_ROOT/nice_$DISTRO.vdi" "$NICE_EXTRACT_DISTRO_HDD_IMAGE_PATH"
6162
}
6263

0 commit comments

Comments
 (0)