VirtualBox

Opened 10 years ago

Last modified 10 years ago

#12866 new enhancement

VBoxManage clonehd should fail early if not enough disk space

Reported by: David Biesack Owned by:
Component: virtual disk Version: VirtualBox 4.3.8
Keywords: Cc:
Guest type: other Host type: other

Description

Given a 40GB .vmdk file, trying to clone the disk

VBoxManage clonehd in.vmdk out.vdi --format vdi

will churn happily until it runs out of disk space many minutes later.

The command should first verify that there is sufficient space for the output file (which will be roughly the same size), and fail early if there is insufficient space.

Care should be be taken for the case that the output file is in a symlinked diretory; you need to check the canonical location.

A --force option could bypass that check (for example, if there is some other job running concurrently that will free up space for the new file).

Same should be true for modifyhd or other operations that create virtual disk or other large files.

Change History (1)

comment:1 by Frank Mehnert, 10 years ago

I see the problem but this is common behavior on multi-tasking hosts. Such a file check would probably make sense for some people but

  1. The resulting cloned VM disk image could in fact be smaller than the original file (if the original file contains a lot of sectors containing of 00-filled blocks)
  2. The check could succeed but during the clone operation the disk is filled by a concurrent application.

Nevertheless I will keep this ticket open.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use