Page 1 of 1

VBoxManage clonehd ... --existing

Posted: 31. Aug 2011, 21:29
by saberman
The manual describes the effect of the --existing option as:
existing Perform the clone operation to an already existing destination medium. Only the portion
of the source medium which fits into the destination medium is copied. This means
if the destination medium is smaller than the source only a part of it is copied, and if the
destination medium is larger than the source the remaining part of the destination medium
is unchanged.

Is the size of the target medium used to determine how much is copied the physical size or the logical size. That is, if the target medium is a dynamic vdi that is physically 40GB in size and has a maximum size of 60GB what would happen if a dynamic vdi with a physical size of 50GB and a logical size of 55GB were to be cloned into the exisiting target using the --existing option? Would the target be expanded to 50GB and all 50GB copied or would only the first 40GB be copied? Would the maximum size of the target medium after the copy still be 60GB or would it be 55GB? Would a new uuid be generated and inserted into the target medium or would it still have the uuid it had before the clonehd process was run?

Re: VBoxManage clonehd ... --existing

Posted: 1. Sep 2011, 11:22
by mpack
Think about why this constraint exists and you answer your own question.

Re: VBoxManage clonehd ... --existing

Posted: 1. Sep 2011, 16:07
by saberman
mpack wrote:Think about why this constraint exists and you answer your own question.
Which constraint?

Re: VBoxManage clonehd ... --existing

Posted: 1. Sep 2011, 22:31
by mpack
saberman wrote:
mpack wrote:Think about why this constraint exists and you answer your own question.
Which constraint?
Eh? How about the one you quoted from the manual and then asked about?

Never mind, lets cut to the chase. If you use any disk imaging tool then it has the same constraint: if the two drives involved in the copy have different sizes then the smaller drive dictates the max copy size.

Re: VBoxManage clonehd ... --existing

Posted: 2. Sep 2011, 02:52
by saberman
mpack wrote:Never mind, lets cut to the chase. If you use any disk imaging tool then it has the same constraint: if the two drives involved in the copy have different sizes then the smaller drive dictates the max copy size.
That does not address the specific examples I posed. Nor does it address the question of how the special data structures are handled.

Is a target drive that is physically smaller than the source but logically bigger the smaller or the bigger of the two drives?

Re: VBoxManage clonehd ... --existing

Posted: 2. Sep 2011, 10:24
by mpack
I did not address your scenarios because they are irrelevant. The constraint you quoted from the user manual is caused by drive size differences as I just explained. The current sizes of certain host files... has no bearing. It is the drive sizes which matter.

I did miss your question about whether the target UUID changes. It does not, otherwise there would be no practical difference compared to normal clonehd operation.