| Summary: | Virt-v2v create preallocated file when convert a sparse ESX guest. | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | yuping zhang <yupzhang> | |
| Component: | virt-v2v | Assignee: | Matthew Booth <mbooth> | |
| Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.7 | CC: | leiwang, mbooth, mkenneth, mshao, qguan, rjones, rwu, whuang, yupzhang | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 709648 (view as bug list) | Environment: | ||
| Last Closed: | 2011-09-07 10:16:03 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 709648 | |||
|
Description
yuping zhang
2011-05-31 10:35:50 UTC
The default allocation is hard code as preallocated for ESX image:
1. The target volume allocation type will be created according to src sparse type in Source.pm:
# /usr/lib/perl5/vendor_perl/5.8.8/Sys/VirtV2V/Connection/Source.pm
sub copy_storage
{
...
$dst = $target->create_volume(
$src->get_name(),
defined($output_format) ? $output_format : $src->get_format(),
$src->get_size(),
defined($output_sparse) ? $output_sparse : $src->is_sparse()
);
...
}
2. While the src sparse type is hard code as 0 (prealloc) for ESX image:
# /usr/lib/perl5/vendor_perl/5.8.8/Sys/VirtV2V/Connection/LibVirtSource.pm
sub get_volume
{
...
if ($uri->scheme eq "esx") {
$format = "raw";
$transfer = $self->_get_transfer($path, 0, $format, 0);
$name = $transfer->esx_get_name();
$size = $transfer->esx_get_size();
$usage = $size;
$is_sparse = 0; <--- hard code as prealloc
$is_block = 0;
}
...
}
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. |