]> git.proxmox.com Git - qemu-server.git/blob - PVE/VZDump/QemuServer.pm
avoid backup command timeout with pbs
[qemu-server.git] / PVE / VZDump / QemuServer.pm
1 package PVE::VZDump::QemuServer;
2
3 use strict;
4 use warnings;
5
6 use File::Basename;
7 use File::Path;
8 use IO::File;
9 use IPC::Open3;
10
11 use PVE::Cluster qw(cfs_read_file);
12 use PVE::INotify;
13 use PVE::IPCC;
14 use PVE::JSONSchema;
15 use PVE::QMPClient;
16 use PVE::Storage::Plugin;
17 use PVE::Storage::PBSPlugin;
18 use PVE::Storage;
19 use PVE::Tools;
20 use PVE::VZDump;
21
22 use PVE::QemuConfig;
23 use PVE::QemuServer;
24 use PVE::QemuServer::Machine;
25 use PVE::QemuServer::Monitor qw(mon_cmd);
26
27 use base qw (PVE::VZDump::Plugin);
28
29 sub new {
30 my ($class, $vzdump) = @_;
31
32 PVE::VZDump::check_bin('qm');
33
34 my $self = bless { vzdump => $vzdump }, $class;
35
36 $self->{vmlist} = PVE::QemuServer::vzlist();
37 $self->{storecfg} = PVE::Storage::config();
38
39 return $self;
40 };
41
42 sub type {
43 return 'qemu';
44 }
45
46 sub vmlist {
47 my ($self) = @_;
48 return [ keys %{$self->{vmlist}} ];
49 }
50
51 sub prepare {
52 my ($self, $task, $vmid, $mode) = @_;
53
54 $task->{disks} = [];
55
56 my $conf = $self->{vmlist}->{$vmid} = PVE::QemuConfig->load_config($vmid);
57
58 $self->loginfo("VM Name: $conf->{name}")
59 if defined($conf->{name});
60
61 $self->{vm_was_running} = 1;
62 if (!PVE::QemuServer::check_running($vmid)) {
63 $self->{vm_was_running} = 0;
64 }
65
66 $task->{hostname} = $conf->{name};
67
68 my $hostname = PVE::INotify::nodename();
69
70 my $vollist = [];
71 my $drivehash = {};
72 my $backup_volumes = PVE::QemuConfig->get_backup_volumes($conf);
73
74 foreach my $volume (@{$backup_volumes}) {
75 my $name = $volume->{key};
76 my $volume_config = $volume->{volume_config};
77 my $volid = $volume_config->{file};
78
79 if (!$volume->{included}) {
80 $self->loginfo("exclude disk '$name' '$volid' ($volume->{reason})");
81 next;
82 } elsif ($self->{vm_was_running} && $volume_config->{iothread}) {
83 if (!PVE::QemuServer::Machine::runs_at_least_qemu_version($vmid, 4, 0, 1)) {
84 die "disk '$name' '$volid' (iothread=on) can't use backup feature with running QEMU " .
85 "version < 4.0.1! Either set backup=no for this drive or upgrade QEMU and restart VM\n";
86 }
87 } else {
88 my $log = "include disk '$name' '$volid'";
89 if (defined(my $size = $volume_config->{size})) {
90 my $readable_size = PVE::JSONSchema::format_size($size);
91 $log .= " $readable_size";
92 }
93 $self->loginfo($log);
94 }
95
96 my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
97 push @$vollist, $volid if $storeid;
98 $drivehash->{$name} = $volume->{volume_config};
99 }
100
101 PVE::Storage::activate_volumes($self->{storecfg}, $vollist);
102
103 foreach my $ds (sort keys %$drivehash) {
104 my $drive = $drivehash->{$ds};
105
106 my $volid = $drive->{file};
107 my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
108
109 my $path = $volid;
110 if ($storeid) {
111 $path = PVE::Storage::path($self->{storecfg}, $volid);
112 }
113 next if !$path;
114
115 my ($size, $format) = eval { PVE::Storage::volume_size_info($self->{storecfg}, $volid, 5) };
116 die "no such volume '$volid'\n" if $@;
117
118 my $diskinfo = {
119 path => $path,
120 volid => $volid,
121 storeid => $storeid,
122 format => $format,
123 virtdev => $ds,
124 qmdevice => "drive-$ds",
125 };
126
127 if (-b $path) {
128 $diskinfo->{type} = 'block';
129 } else {
130 $diskinfo->{type} = 'file';
131 }
132
133 push @{$task->{disks}}, $diskinfo;
134 }
135 }
136
137 sub vm_status {
138 my ($self, $vmid) = @_;
139
140 my $running = PVE::QemuServer::check_running($vmid) ? 1 : 0;
141
142 return wantarray ? ($running, $running ? 'running' : 'stopped') : $running;
143 }
144
145 sub lock_vm {
146 my ($self, $vmid) = @_;
147
148 PVE::QemuConfig->set_lock($vmid, 'backup');
149 }
150
151 sub unlock_vm {
152 my ($self, $vmid) = @_;
153
154 PVE::QemuConfig->remove_lock($vmid, 'backup');
155 }
156
157 sub stop_vm {
158 my ($self, $task, $vmid) = @_;
159
160 my $opts = $self->{vzdump}->{opts};
161
162 my $wait = $opts->{stopwait} * 60;
163 # send shutdown and wait
164 $self->cmd ("qm shutdown $vmid --skiplock --keepActive --timeout $wait");
165 }
166
167 sub start_vm {
168 my ($self, $task, $vmid) = @_;
169
170 $self->cmd ("qm start $vmid --skiplock");
171 }
172
173 sub suspend_vm {
174 my ($self, $task, $vmid) = @_;
175
176 $self->cmd ("qm suspend $vmid --skiplock");
177 }
178
179 sub resume_vm {
180 my ($self, $task, $vmid) = @_;
181
182 $self->cmd ("qm resume $vmid --skiplock");
183 }
184
185 sub assemble {
186 my ($self, $task, $vmid) = @_;
187
188 my $conffile = PVE::QemuConfig->config_file($vmid);
189
190 my $outfile = "$task->{tmpdir}/qemu-server.conf";
191 my $firewall_src = "/etc/pve/firewall/$vmid.fw";
192 my $firewall_dest = "$task->{tmpdir}/qemu-server.fw";
193
194 my $outfd = IO::File->new (">$outfile") ||
195 die "unable to open '$outfile'";
196 my $conffd = IO::File->new ($conffile, 'r') ||
197 die "unable open '$conffile'";
198
199 my $found_snapshot;
200 my $found_pending;
201 while (defined (my $line = <$conffd>)) {
202 next if $line =~ m/^\#vzdump\#/; # just to be sure
203 next if $line =~ m/^\#qmdump\#/; # just to be sure
204 if ($line =~ m/^\[(.*)\]\s*$/) {
205 if ($1 =~ m/PENDING/i) {
206 $found_pending = 1;
207 } else {
208 $found_snapshot = 1;
209 }
210 }
211 next if $found_snapshot || $found_pending; # skip all snapshots and pending changes config data
212
213 if ($line =~ m/^unused\d+:\s*(\S+)\s*/) {
214 $self->loginfo("skip unused drive '$1' (not included into backup)");
215 next;
216 }
217 next if $line =~ m/^lock:/ || $line =~ m/^parent:/;
218
219 print $outfd $line;
220 }
221
222 foreach my $di (@{$task->{disks}}) {
223 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
224 my $storeid = $di->{storeid} || '';
225 my $format = $di->{format} || '';
226 print $outfd "#qmdump#map:$di->{virtdev}:$di->{qmdevice}:$storeid:$format:\n";
227 } else {
228 die "internal error";
229 }
230 }
231
232 if ($found_snapshot) {
233 $self->loginfo("snapshots found (not included into backup)");
234 }
235 if ($found_pending) {
236 $self->loginfo("pending configuration changes found (not included into backup)");
237 }
238
239 PVE::Tools::file_copy($firewall_src, $firewall_dest) if -f $firewall_src;
240 }
241
242 sub archive {
243 my ($self, $task, $vmid, $filename, $comp) = @_;
244
245 my $opts = $self->{vzdump}->{opts};
246 my $scfg = $opts->{scfg};
247
248 if ($self->{vzdump}->{opts}->{pbs}) {
249 $self->archive_pbs($task, $vmid);
250 } else {
251 $self->archive_vma($task, $vmid, $filename, $comp);
252 }
253 }
254
255 my $query_backup_status_loop = sub {
256 my ($self, $vmid, $job_uuid) = @_;
257
258 my $starttime = time ();
259 my $last_time = $starttime;
260 my ($last_percent, $last_total, $last_zero, $last_transferred) = (-1, 0, 0, 0);
261 my $transferred;
262
263 my $get_mbps = sub {
264 my ($mb, $delta) = @_;
265 return ($mb > 0) ? int(($mb / $delta) / (1000 * 1000)) : 0;
266 };
267
268 while(1) {
269 my $status = mon_cmd($vmid, 'query-backup');
270
271 my $total = $status->{total} || 0;
272 $transferred = $status->{transferred} || 0;
273 my $percent = $total ? int(($transferred * 100)/$total) : 0;
274 my $zero = $status->{'zero-bytes'} || 0;
275 my $zero_per = $total ? int(($zero * 100)/$total) : 0;
276
277 die "got unexpected uuid\n" if !$status->{uuid} || ($status->{uuid} ne $job_uuid);
278
279 my $ctime = time();
280 my $duration = $ctime - $starttime;
281
282 my $rbytes = $transferred - $last_transferred;
283 my $wbytes = $rbytes - ($zero - $last_zero);
284
285 my $timediff = ($ctime - $last_time) || 1; # fixme
286 my $mbps_read = $get_mbps->($rbytes, $timediff);
287 my $mbps_write = $get_mbps->($wbytes, $timediff);
288
289 my $statusline = "status: $percent% ($transferred/$total), sparse ${zero_per}% ($zero), duration $duration, read/write $mbps_read/$mbps_write MB/s";
290
291 my $res = $status->{status} || 'unknown';
292 if ($res ne 'active') {
293 $self->loginfo($statusline);
294 if ($res ne 'done') {
295 die (($status->{errmsg} || "unknown error") . "\n") if $res eq 'error';
296 die "got unexpected status '$res'\n";
297 } elsif ($total != $transferred) {
298 die "got wrong number of transfered bytes ($total != $transferred)\n";
299 }
300 last;
301 }
302 if ($percent != $last_percent && ($timediff > 2)) {
303 $self->loginfo($statusline);
304 $last_percent = $percent;
305 $last_total = $total if $total;
306 $last_zero = $zero if $zero;
307 $last_transferred = $transferred if $transferred;
308 $last_time = $ctime;
309 }
310 sleep(1);
311 }
312
313 my $duration = time() - $starttime;
314 if ($transferred && $duration) {
315 my $mb = int($transferred / (1000 * 1000));
316 my $mbps = $get_mbps->($transferred, $duration);
317 $self->loginfo("transferred $mb MB in $duration seconds ($mbps MB/s)");
318 }
319 };
320
321 sub archive_pbs {
322 my ($self, $task, $vmid) = @_;
323
324 my $conffile = "$task->{tmpdir}/qemu-server.conf";
325 my $firewall = "$task->{tmpdir}/qemu-server.fw";
326
327 my $opts = $self->{vzdump}->{opts};
328 my $scfg = $opts->{scfg};
329
330 my $starttime = time();
331
332 my $server = $scfg->{server};
333 my $datastore = $scfg->{datastore};
334 my $username = $scfg->{username} // 'root@pam';
335 my $fingerprint = $scfg->{fingerprint};
336
337 my $repo = "$username\@$server:$datastore";
338 my $password = PVE::Storage::PBSPlugin::pbs_get_password($scfg, $opts->{storage});
339
340 my $diskcount = scalar(@{$task->{disks}});
341 if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$diskcount) {
342 my @pathlist;
343 foreach my $di (@{$task->{disks}}) {
344 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
345 push @pathlist, "$di->{qmdevice}.img:$di->{path}";
346 } else {
347 die "implement me (type $di->{type})";
348 }
349 }
350
351 if (!$diskcount) {
352 $self->loginfo("backup contains no disks");
353 }
354
355 local $ENV{PBS_PASSWORD} = $password;
356 local $ENV{PBS_FINGERPRINT} = $fingerprint if defined($fingerprint);
357 my $cmd = [
358 '/usr/bin/proxmox-backup-client',
359 'backup',
360 '--repository', $repo,
361 '--backup-type', 'vm',
362 '--backup-id', "$vmid",
363 '--backup-time', $task->{backup_time},
364 ];
365
366 push @$cmd, "qemu-server.conf:$conffile";
367 push @$cmd, "fw.conf:$firewall" if -e $firewall;
368 push @$cmd, @pathlist if scalar(@pathlist);
369
370 $self->loginfo("starting template backup");
371 $self->loginfo(join(' ', @$cmd));
372
373 $self->cmd($cmd);
374
375 return;
376 }
377
378 # get list early so we die on unkown drive types before doing anything
379 my $devlist = _get_task_devlist($task);
380
381 $self->enforce_vm_running_for_backup($vmid);
382
383 my $backup_job_uuid;
384 eval {
385 $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = $SIG{PIPE} = sub {
386 die "interrupted by signal\n";
387 };
388
389 my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
390
391 my $params = {
392 format => "pbs",
393 'backup-file' => $repo,
394 'backup-id' => "$vmid",
395 'backup-time' => $task->{backup_time},
396 password => $password,
397 devlist => $devlist,
398 'config-file' => $conffile,
399 };
400 $params->{fingerprint} = $fingerprint if defined($fingerprint);
401 $params->{'firewall-file'} = $firewall if -e $firewall;
402
403 $params->{timeout} = 60; # give some time to connect to the backup server
404
405 my $res = eval { mon_cmd($vmid, "backup", %$params) };
406 my $qmperr = $@;
407 $backup_job_uuid = $res->{UUID} if $res;
408
409 if ($fs_frozen) {
410 $self->qga_fs_thaw($vmid);
411 }
412
413 die $qmperr if $qmperr;
414 die "got no uuid for backup task\n" if !defined($backup_job_uuid);
415
416 $self->loginfo("started backup task '$backup_job_uuid'");
417
418 $self->resume_vm_after_job_start($task, $vmid);
419
420 $query_backup_status_loop->($self, $vmid, $backup_job_uuid);
421 };
422 my $err = $@;
423 if ($err) {
424 $self->logerr($err);
425 $self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
426 }
427 $self->restore_vm_power_state($vmid);
428
429 die $err if $err;
430 }
431
432 my $fork_compressor_pipe = sub {
433 my ($self, $comp, $outfileno) = @_;
434
435 my @pipefd = POSIX::pipe();
436 my $cpid = fork();
437 die "unable to fork worker - $!" if !defined($cpid) || $cpid < 0;
438 if ($cpid == 0) {
439 eval {
440 POSIX::close($pipefd[1]);
441 # redirect STDIN
442 my $fd = fileno(STDIN);
443 close STDIN;
444 POSIX::close(0) if $fd != 0;
445 die "unable to redirect STDIN - $!"
446 if !open(STDIN, "<&", $pipefd[0]);
447
448 # redirect STDOUT
449 $fd = fileno(STDOUT);
450 close STDOUT;
451 POSIX::close (1) if $fd != 1;
452
453 die "unable to redirect STDOUT - $!"
454 if !open(STDOUT, ">&", $outfileno);
455
456 exec($comp);
457 die "fork compressor '$comp' failed\n";
458 };
459 if (my $err = $@) {
460 $self->logerr($err);
461 POSIX::_exit(1);
462 }
463 POSIX::_exit(0);
464 kill(-9, $$);
465 } else {
466 POSIX::close($pipefd[0]);
467 $outfileno = $pipefd[1];
468 }
469
470 return ($cpid, $outfileno);
471 };
472
473 sub archive_vma {
474 my ($self, $task, $vmid, $filename, $comp) = @_;
475
476 my $conffile = "$task->{tmpdir}/qemu-server.conf";
477 my $firewall = "$task->{tmpdir}/qemu-server.fw";
478
479 my $opts = $self->{vzdump}->{opts};
480
481 my $starttime = time();
482
483 my $speed = 0;
484 if ($opts->{bwlimit}) {
485 $speed = $opts->{bwlimit}*1024;
486 }
487
488 my $diskcount = scalar(@{$task->{disks}});
489 if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$diskcount) {
490 my @pathlist;
491 foreach my $di (@{$task->{disks}}) {
492 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
493 push @pathlist, "$di->{qmdevice}=$di->{path}";
494 } else {
495 die "implement me";
496 }
497 }
498
499 if (!$diskcount) {
500 $self->loginfo("backup contains no disks");
501 }
502
503 my $outcmd;
504 if ($comp) {
505 $outcmd = "exec:$comp";
506 } else {
507 $outcmd = "exec:cat";
508 }
509
510 $outcmd .= " > $filename" if !$opts->{stdout};
511
512 my $cmd = ['/usr/bin/vma', 'create', '-v', '-c', $conffile];
513 push @$cmd, '-c', $firewall if -e $firewall;
514 push @$cmd, $outcmd, @pathlist;
515
516 $self->loginfo("starting template backup");
517 $self->loginfo(join(' ', @$cmd));
518
519 if ($opts->{stdout}) {
520 $self->cmd($cmd, output => ">&" . fileno($opts->{stdout}));
521 } else {
522 $self->cmd($cmd);
523 }
524
525 return;
526 }
527
528 my $devlist = _get_task_devlist($task);
529
530 $self->enforce_vm_running_for_backup($vmid);
531
532 my $cpid;
533 my $backup_job_uuid;
534
535 eval {
536 $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = $SIG{PIPE} = sub {
537 die "interrupted by signal\n";
538 };
539
540 my $outfh;
541 if ($opts->{stdout}) {
542 $outfh = $opts->{stdout};
543 } else {
544 $outfh = IO::File->new($filename, "w") ||
545 die "unable to open file '$filename' - $!\n";
546 }
547 my $outfileno = fileno($outfh);
548
549 if ($comp) {
550 ($cpid, $outfileno) = $fork_compressor_pipe->($self, $comp, $outfileno);
551 }
552
553 my $qmpclient = PVE::QMPClient->new();
554 my $backup_cb = sub {
555 my ($vmid, $resp) = @_;
556 $backup_job_uuid = $resp->{return}->{UUID};
557 };
558 my $add_fd_cb = sub {
559 my ($vmid, $resp) = @_;
560
561 my $params = {
562 'backup-file' => "/dev/fdname/backup",
563 speed => $speed,
564 'config-file' => $conffile,
565 devlist => $devlist
566 };
567 $params->{'firewall-file'} = $firewall if -e $firewall;
568
569 $qmpclient->queue_cmd($vmid, $backup_cb, 'backup', %$params);
570 };
571
572 $qmpclient->queue_cmd($vmid, $add_fd_cb, 'getfd', fd => $outfileno, fdname => "backup");
573
574 my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
575
576 eval { $qmpclient->queue_execute(30) };
577 my $qmperr = $@;
578
579 if ($fs_frozen) {
580 $self->qga_fs_thaw($vmid);
581 }
582
583 die $qmperr if $qmperr;
584 die $qmpclient->{errors}->{$vmid} if $qmpclient->{errors}->{$vmid};
585
586 if ($cpid) {
587 POSIX::close($outfileno) == 0 ||
588 die "close output file handle failed\n";
589 }
590
591 die "got no uuid for backup task\n" if !defined($backup_job_uuid);
592
593 $self->loginfo("started backup task '$backup_job_uuid'");
594
595 $self->resume_vm_after_job_start($task, $vmid);
596
597 $query_backup_status_loop->($self, $vmid, $backup_job_uuid);
598 };
599 my $err = $@;
600 if ($err) {
601 $self->logerr($err);
602 $self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
603 }
604
605 $self->restore_vm_power_state($vmid);
606
607 if ($err) {
608 if ($cpid) {
609 kill(9, $cpid);
610 waitpid($cpid, 0);
611 }
612 die $err;
613 }
614
615 if ($cpid && (waitpid($cpid, 0) > 0)) {
616 my $stat = $?;
617 my $ec = $stat >> 8;
618 my $signal = $stat & 127;
619 if ($ec || $signal) {
620 die "$comp failed - wrong exit status $ec" .
621 ($signal ? " (signal $signal)\n" : "\n");
622 }
623 }
624 }
625
626 sub _get_task_devlist {
627 my ($task) = @_;
628
629 my $devlist = '';
630 foreach my $di (@{$task->{disks}}) {
631 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
632 $devlist .= ',' if $devlist;
633 $devlist .= $di->{qmdevice};
634 } else {
635 die "implement me (type '$di->{type}')";
636 }
637 }
638 return $devlist;
639 }
640
641 sub qga_fs_freeze {
642 my ($self, $task, $vmid) = @_;
643 return if !$self->{vmlist}->{$vmid}->{agent} || $task->{mode} eq 'stop' || !$self->{vm_was_running};
644
645 if (!PVE::QemuServer::qga_check_running($vmid, 1)) {
646 $self->loginfo("skipping guest-agent 'fs-freeze', agent configured but not running?");
647 return;
648 }
649
650 $self->loginfo("issuing guest-agent 'fs-freeze' command");
651 eval { mon_cmd($vmid, "guest-fsfreeze-freeze") };
652 $self->logerr($@) if $@;
653
654 return 1; # even on mon command error, ensure we always thaw again
655 }
656
657 # only call if fs_freeze return 1
658 sub qga_fs_thaw {
659 my ($self, $vmid) = @_;
660
661 $self->loginfo("issuing guest-agent 'fs-thaw' command");
662 eval { mon_cmd($vmid, "guest-fsfreeze-thaw") };
663 $self->logerr($@) if $@;
664 }
665
666 # we need a running QEMU/KVM process for backup, starts a paused (prelaunch)
667 # one if VM isn't already running
668 sub enforce_vm_running_for_backup {
669 my ($self, $vmid) = @_;
670
671 if (PVE::QemuServer::check_running($vmid)) {
672 $self->{vm_was_running} = 1;
673 return;
674 }
675
676 eval {
677 $self->loginfo("starting kvm to execute backup task");
678 # start with skiplock
679 my $params = {
680 skiplock => 1,
681 paused => 1,
682 };
683 PVE::QemuServer::vm_start($self->{storecfg}, $vmid, $params);
684 };
685 die $@ if $@;
686 }
687
688 # resume VM againe once we got in a clear state (stop mode backup of running VM)
689 sub resume_vm_after_job_start {
690 my ($self, $task, $vmid) = @_;
691
692 return if !$self->{vm_was_running};
693
694 if (my $stoptime = $task->{vmstoptime}) {
695 my $delay = time() - $task->{vmstoptime};
696 $task->{vmstoptime} = undef; # avoid printing 'online after ..' twice
697 $self->loginfo("resuming VM again after $delay seconds");
698 } else {
699 $self->loginfo("resuming VM again");
700 }
701 mon_cmd($vmid, 'cont');
702 }
703
704 # stop again if VM was not running before
705 sub restore_vm_power_state {
706 my ($self, $vmid) = @_;
707
708 # we always let VMs keep running
709 return if $self->{vm_was_running};
710
711 eval {
712 my $resp = mon_cmd($vmid, 'query-status');
713 my $status = $resp && $resp->{status} ? $resp->{status} : 'unknown';
714 if ($status eq 'prelaunch') {
715 $self->loginfo("stopping kvm after backup task");
716 PVE::QemuServer::vm_stop($self->{storecfg}, $vmid, 1);
717 } else {
718 $self->loginfo("kvm status changed after backup ('$status') - keep VM running");
719 }
720 };
721 warn $@ if $@;
722 }
723
724 sub mon_backup_cancel {
725 my ($self, $vmid) = @_;
726
727 $self->loginfo("aborting backup job");
728 eval { mon_cmd($vmid, 'backup-cancel') };
729 $self->logerr($@) if $@;
730 }
731
732 sub snapshot {
733 my ($self, $task, $vmid) = @_;
734
735 # nothing to do
736 }
737
738 sub cleanup {
739 my ($self, $task, $vmid) = @_;
740
741 # nothing to do ?
742 }
743
744 1;