[pve-devel] [PATCH 02/21] plugin : add volume_snapshot

Dietmar Maurer dietmar at proxmox.com
Thu Sep 6 10:40:35 CEST 2012


Does format 'qed' supports snapshots now? 

> +sub volume_snapshot {
> +    my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
> +
> +    die "can't snapshot this image format" if $volname !~
> + m/\.(qcow2|qed)$/;
> +
> +    return 1 if $running;
> +
> +    my $path = $class->path($scfg, $volname);
> +
> +    my $cmd = ['/usr/bin/qemu-img', 'snapshot','-c', $snap, $path];
> +
> +    run_command($cmd, timeout => 1);
> +
> +    return undef;
> +}
> +



More information about the pve-devel mailing list