live import: also record volid information
Will be required for generating the blockdev starting with machine version 10.0. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
3f8c946b38
commit
5a7fc4409d
2 changed files with 4 additions and 1 deletions
|
|
@ -530,6 +530,7 @@ my sub create_disks : prototype($$$$$$$$$$$) {
|
|||
$live_import_mapping->{$ds} = {
|
||||
path => $path,
|
||||
format => $source_format,
|
||||
volid => $source,
|
||||
};
|
||||
$live_import_mapping->{$ds}->{'delete-after-finish'} = $source
|
||||
if $needs_extraction;
|
||||
|
|
@ -574,6 +575,7 @@ my sub create_disks : prototype($$$$$$$$$$$) {
|
|||
$live_import_mapping->{$ds} = {
|
||||
path => $source,
|
||||
format => $source_format,
|
||||
volid => $source,
|
||||
};
|
||||
} else {
|
||||
(undef, $dst_volid) = PVE::QemuServer::ImportDisk::do_import(
|
||||
|
|
|
|||
|
|
@ -7095,8 +7095,9 @@ sub live_import_from_files {
|
|||
if !exists($conf->{$dev});
|
||||
|
||||
my $info = $mapping->{$dev};
|
||||
my ($format, $path) = $info->@{qw(format path)};
|
||||
my ($format, $path, $volid) = $info->@{qw(format path volid)};
|
||||
die "missing path for '$dev' mapping\n" if !$path;
|
||||
die "missing volid for '$dev' mapping\n" if !$volid;
|
||||
die "missing format for '$dev' mapping\n" if !$format;
|
||||
die "invalid format '$format' for '$dev' mapping\n"
|
||||
if !grep { $format eq $_ } qw(raw qcow2 vmdk);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue