mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 22:13:15 +00:00
image convert: collect options in hash argument
In preparation to add another option and to improve style for the callers. One of the test cases that specified $is_zero_initialized is for a non-existent storage, so the option was not added there. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Reviewed-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Link: https://lore.proxmox.com/20250404133204.239783-16-f.ebner@proxmox.com
This commit is contained in:
parent
2973783125
commit
d5d3501a0b
@ -7771,8 +7771,14 @@ sub convert_iscsi_path {
|
|||||||
die "cannot convert iscsi path '$path', unknown format\n";
|
die "cannot convert iscsi path '$path', unknown format\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The possible options are:
|
||||||
|
# bwlimit - The bandwidth limit in KiB/s.
|
||||||
|
# is-zero-initialized - If the destination image is zero-initialized.
|
||||||
|
# snapname - Use this snapshot of the source image.
|
||||||
sub qemu_img_convert {
|
sub qemu_img_convert {
|
||||||
my ($src_volid, $dst_volid, $size, $snapname, $is_zero_initialized, $bwlimit) = @_;
|
my ($src_volid, $dst_volid, $size, $opts) = @_;
|
||||||
|
|
||||||
|
my ($bwlimit, $snapname) = $opts->@{qw(bwlimit snapname)};
|
||||||
|
|
||||||
my $storecfg = PVE::Storage::config();
|
my $storecfg = PVE::Storage::config();
|
||||||
my ($src_storeid) = PVE::Storage::parse_volume_id($src_volid, 1);
|
my ($src_storeid) = PVE::Storage::parse_volume_id($src_volid, 1);
|
||||||
@ -7830,7 +7836,7 @@ sub qemu_img_convert {
|
|||||||
|
|
||||||
push @$cmd, $src_path;
|
push @$cmd, $src_path;
|
||||||
|
|
||||||
if (!$dst_is_iscsi && $is_zero_initialized) {
|
if (!$dst_is_iscsi && $opts->{'is-zero-initialized'}) {
|
||||||
push @$cmd, "zeroinit:$dst_path";
|
push @$cmd, "zeroinit:$dst_path";
|
||||||
} else {
|
} else {
|
||||||
push @$cmd, $dst_path;
|
push @$cmd, $dst_path;
|
||||||
@ -8291,7 +8297,12 @@ sub clone_disk {
|
|||||||
push $cmd->@*, "bs=$bs", "osize=$size", "if=$src_path", "of=$dst_path";
|
push $cmd->@*, "bs=$bs", "osize=$size", "if=$src_path", "of=$dst_path";
|
||||||
run_command($cmd);
|
run_command($cmd);
|
||||||
} else {
|
} else {
|
||||||
qemu_img_convert($drive->{file}, $newvolid, $size, $snapname, $sparseinit, $bwlimit);
|
my $opts = {
|
||||||
|
bwlimit => $bwlimit,
|
||||||
|
'is-zero-initialized' => $sparseinit,
|
||||||
|
snapname => $snapname,
|
||||||
|
};
|
||||||
|
qemu_img_convert($drive->{file}, $newvolid, $size, $opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8376,7 +8387,7 @@ sub create_efidisk($$$$$$$$) {
|
|||||||
my $volid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, undef, $vars_size);
|
my $volid = PVE::Storage::vdisk_alloc($storecfg, $storeid, $vmid, $fmt, undef, $vars_size);
|
||||||
PVE::Storage::activate_volumes($storecfg, [$volid]);
|
PVE::Storage::activate_volumes($storecfg, [$volid]);
|
||||||
|
|
||||||
qemu_img_convert($ovmf_vars, $volid, $vars_size_b, undef, 0);
|
qemu_img_convert($ovmf_vars, $volid, $vars_size_b);
|
||||||
my $size = PVE::Storage::volume_size_info($storecfg, $volid, 3);
|
my $size = PVE::Storage::volume_size_info($storecfg, $volid, 3);
|
||||||
|
|
||||||
return ($volid, $size/1024);
|
return ($volid, $size/1024);
|
||||||
|
@ -70,7 +70,8 @@ sub do_import {
|
|||||||
local $SIG{PIPE} = sub { die "interrupted by signal $!\n"; };
|
local $SIG{PIPE} = sub { die "interrupted by signal $!\n"; };
|
||||||
|
|
||||||
PVE::Storage::activate_volumes($storecfg, [$dst_volid]);
|
PVE::Storage::activate_volumes($storecfg, [$dst_volid]);
|
||||||
PVE::QemuServer::qemu_img_convert($src_path, $dst_volid, $src_size, undef, $zeroinit);
|
PVE::QemuServer::qemu_img_convert(
|
||||||
|
$src_path, $dst_volid, $src_size, { 'is-zero-initialized' => $zeroinit });
|
||||||
PVE::Storage::deactivate_volumes($storecfg, [$dst_volid]);
|
PVE::Storage::deactivate_volumes($storecfg, [$dst_volid]);
|
||||||
PVE::QemuConfig->lock_config($vmid, $create_drive) if !$params->{'skip-config-update'};
|
PVE::QemuConfig->lock_config($vmid, $create_drive) if !$params->{'skip-config-update'};
|
||||||
};
|
};
|
||||||
|
@ -55,7 +55,7 @@ my $storage_config = {
|
|||||||
my $tests = [
|
my $tests = [
|
||||||
{
|
{
|
||||||
name => 'qcow2raw',
|
name => 'qcow2raw',
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "qcow2", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "qcow2", "-O", "raw",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw"
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw"
|
||||||
@ -63,7 +63,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "raw2qcow2",
|
name => "raw2qcow2",
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "local:$vmid/vm-$vmid-disk-0.qcow2", 1024*10, undef, 0, undef ],
|
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "local:$vmid/vm-$vmid-disk-0.qcow2", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "qcow2",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "qcow2",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2"
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2"
|
||||||
@ -71,7 +71,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "local2rbd",
|
name => "local2rbd",
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "rbd-store:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "rbd-store:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw", "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none"
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw", "rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none"
|
||||||
@ -79,7 +79,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "rbd2local",
|
name => "rbd2local",
|
||||||
parameters => [ "rbd-store:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "rbd-store:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw"
|
"rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none", "/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw"
|
||||||
@ -87,7 +87,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "local2zos",
|
name => "local2zos",
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "--target-image-opts",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "--target-image-opts",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
||||||
@ -96,7 +96,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "zos2local",
|
name => "zos2local",
|
||||||
parameters => [ "zfs-over-iscsi:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "zfs-over-iscsi:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "--image-opts", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "--image-opts", "-O", "raw",
|
||||||
"file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
|
"file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
|
||||||
@ -105,7 +105,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "zos2rbd",
|
name => "zos2rbd",
|
||||||
parameters => [ "zfs-over-iscsi:vm-$vmid-disk-0", "rbd-store:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "zfs-over-iscsi:vm-$vmid-disk-0", "rbd-store:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "--image-opts", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "--image-opts", "-O", "raw",
|
||||||
"file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
|
"file.driver=iscsi,file.transport=tcp,file.initiator-name=foobar,file.portal=127.0.0.1,file.target=iqn.2019-10.org.test:foobar,file.lun=1,driver=raw",
|
||||||
@ -114,7 +114,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "rbd2zos",
|
name => "rbd2zos",
|
||||||
parameters => [ "rbd-store:vm-$vmid-disk-0", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "rbd-store:vm-$vmid-disk-0", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "--target-image-opts",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "--target-image-opts",
|
||||||
"rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
|
"rbd:cpool/vm-$vmid-disk-0:mon_host=127.0.0.42;127.0.0.21;[\\:\\:1]:auth_supported=none",
|
||||||
@ -123,7 +123,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "local2lvmthin",
|
name => "local2lvmthin",
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "local-lvm:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "local:$vmid/vm-$vmid-disk-0.raw", "local-lvm:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.raw",
|
||||||
@ -132,7 +132,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "lvmthin2local",
|
name => "lvmthin2local",
|
||||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"/dev/pve/vm-$vmid-disk-0",
|
"/dev/pve/vm-$vmid-disk-0",
|
||||||
@ -141,7 +141,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "zeroinit",
|
name => "zeroinit",
|
||||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 1, undef ],
|
parameters => [
|
||||||
|
"local-lvm:vm-$vmid-disk-0",
|
||||||
|
"local:$vmid/vm-$vmid-disk-0.raw",
|
||||||
|
1024*10,
|
||||||
|
{ 'is-zero-initialized' => 1 },
|
||||||
|
],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"/dev/pve/vm-$vmid-disk-0",
|
"/dev/pve/vm-$vmid-disk-0",
|
||||||
@ -150,12 +155,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "notexistingstorage",
|
name => "notexistingstorage",
|
||||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "not-existing:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 1, undef ],
|
parameters => [ "local-lvm:vm-$vmid-disk-0", "not-existing:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => "storage 'not-existing' does not exist\n",
|
expected => "storage 'not-existing' does not exist\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "vmdkfile",
|
name => "vmdkfile",
|
||||||
parameters => [ "./test.vmdk", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "./test.vmdk", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "vmdk", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "vmdk", "-O", "raw",
|
||||||
"./test.vmdk",
|
"./test.vmdk",
|
||||||
@ -164,12 +169,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "notexistingfile",
|
name => "notexistingfile",
|
||||||
parameters => [ "/foo/bar", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "/foo/bar", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => "source '/foo/bar' is not a valid volid nor path for qemu-img convert\n",
|
expected => "source '/foo/bar' is not a valid volid nor path for qemu-img convert\n",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "efidisk",
|
name => "efidisk",
|
||||||
parameters => [ "/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, undef ],
|
parameters => [ "/usr/share/kvm/OVMF_VARS-pure-efi.fd", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-O", "raw",
|
||||||
"/usr/share/kvm/OVMF_VARS-pure-efi.fd",
|
"/usr/share/kvm/OVMF_VARS-pure-efi.fd",
|
||||||
@ -178,7 +183,7 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "efi2zos",
|
name => "efi2zos",
|
||||||
parameters => [ "/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10, undef, 0, undef ],
|
parameters => [ "/usr/share/kvm/OVMF_VARS-pure-efi.fd", "zfs-over-iscsi:vm-$vmid-disk-0", 1024*10 ],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "--target-image-opts",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "--target-image-opts",
|
||||||
"/usr/share/kvm/OVMF_VARS-pure-efi.fd",
|
"/usr/share/kvm/OVMF_VARS-pure-efi.fd",
|
||||||
@ -187,7 +192,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "bwlimit",
|
name => "bwlimit",
|
||||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, undef, 0, 1024 ],
|
parameters => [
|
||||||
|
"local-lvm:vm-$vmid-disk-0",
|
||||||
|
"local:$vmid/vm-$vmid-disk-0.raw",
|
||||||
|
1024*10,
|
||||||
|
{ bwlimit => 1024 },
|
||||||
|
],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-r", "1024K", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-r", "1024K", "-f", "raw", "-O", "raw",
|
||||||
"/dev/pve/vm-$vmid-disk-0",
|
"/dev/pve/vm-$vmid-disk-0",
|
||||||
@ -196,7 +206,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "lvmsnapshot",
|
name => "lvmsnapshot",
|
||||||
parameters => [ "local-lvm:vm-$vmid-disk-0", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, 'foo', 0, undef ],
|
parameters => [
|
||||||
|
"local-lvm:vm-$vmid-disk-0",
|
||||||
|
"local:$vmid/vm-$vmid-disk-0.raw",
|
||||||
|
1024*10,
|
||||||
|
{ snapname => 'foo'},
|
||||||
|
],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-f", "raw", "-O", "raw",
|
||||||
"/dev/pve/snap_vm-$vmid-disk-0_foo",
|
"/dev/pve/snap_vm-$vmid-disk-0_foo",
|
||||||
@ -205,7 +220,12 @@ my $tests = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "qcow2snapshot",
|
name => "qcow2snapshot",
|
||||||
parameters => [ "local:$vmid/vm-$vmid-disk-0.qcow2", "local:$vmid/vm-$vmid-disk-0.raw", 1024*10, 'snap', 0, undef ],
|
parameters => [
|
||||||
|
"local:$vmid/vm-$vmid-disk-0.qcow2",
|
||||||
|
"local:$vmid/vm-$vmid-disk-0.raw",
|
||||||
|
1024*10,
|
||||||
|
{ snapname => 'snap' },
|
||||||
|
],
|
||||||
expected => [
|
expected => [
|
||||||
"/usr/bin/qemu-img", "convert", "-p", "-n", "-l", "snapshot.name=snap", "-f", "qcow2", "-O", "raw",
|
"/usr/bin/qemu-img", "convert", "-p", "-n", "-l", "snapshot.name=snap", "-f", "qcow2", "-O", "raw",
|
||||||
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
|
"/var/lib/vz/images/$vmid/vm-$vmid-disk-0.qcow2",
|
||||||
|
Loading…
Reference in New Issue
Block a user