mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 12:30:17 +00:00
fix #1131: activate volume before copying efidisk
before copying the efidisk image to a storage, we first have to activate the volume also, add the -n flag to qemu-img convert (prevents creation of the target volume) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
e22b5f22a5
commit
02daf96a15
@ -137,9 +137,12 @@ my $create_disks = sub {
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||
my $qemufmt = PVE::QemuServer::qemu_img_format($scfg, $volname);
|
||||
my $path = PVE::Storage::path($storecfg, $volid);
|
||||
my $efidiskcmd = ['/usr/bin/qemu-img', 'convert', '-f', 'raw', '-O', $qemufmt];
|
||||
my $efidiskcmd = ['/usr/bin/qemu-img', 'convert', '-n', '-f', 'raw', '-O', $qemufmt];
|
||||
push @$efidiskcmd, $ovmfvars;
|
||||
push @$efidiskcmd, $path;
|
||||
|
||||
PVE::Storage::activate_volumes($storecfg, [$volid]);
|
||||
|
||||
eval { PVE::Tools::run_command($efidiskcmd); };
|
||||
my $err = $@;
|
||||
die "Copying of EFI Vars image failed: $err" if $err;
|
||||
|
Loading…
Reference in New Issue
Block a user