use PVE::INotify;
use PVE::JSONSchema;
use PVE::Tools;
-use PVE::Cluster qw(cfs_read_file);
+use PVE::Cluster;
use PVE::RPCEnvironment;
+use PVE::Storage;
use PVE::QemuServer;
$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
$storeid = $info->{storeid} || 'local';
}
- my $cfg = cfs_read_file('storage.cfg');
+ my $cfg = PVE::Storage::config();
my $scfg = PVE::Storage::storage_config($cfg, $storeid);
my $alloc_size = int(($filesize + 1024 - 1)/1024);
exec 'dd', 'ibs=256K', 'obs=256K', "of=$path";
die "couldn't exec dd: $!\n";
} else {
- exec '/usr/lib/qemu-server/sparsecp', $path;
- die "couldn't exec sparsecp: $!\n";
+ exec '/bin/cp', '--sparse=always', '/dev/stdin', $path;
+ die "couldn't exec cp: $!\n";
}
}