]> git.proxmox.com Git - qemu-server.git/blob - PVE/VZDump/QemuServer.pm
vzdump: move include logic for volumes to method
[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 my $res = eval { mon_cmd($vmid, "backup", %$params) };
404 my $qmperr = $@;
405 $backup_job_uuid = $res->{UUID} if $res;
406
407 if ($fs_frozen) {
408 $self->qga_fs_thaw($vmid);
409 }
410
411 die $qmperr if $qmperr;
412 die "got no uuid for backup task\n" if !defined($backup_job_uuid);
413
414 $self->loginfo("started backup task '$backup_job_uuid'");
415
416 $self->resume_vm_after_job_start($task, $vmid);
417
418 $query_backup_status_loop->($self, $vmid, $backup_job_uuid);
419 };
420 my $err = $@;
421 if ($err) {
422 $self->logerr($err);
423 $self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
424 }
425 $self->restore_vm_power_state($vmid);
426
427 die $err if $err;
428 }
429
430 my $fork_compressor_pipe = sub {
431 my ($self, $comp, $outfileno) = @_;
432
433 my @pipefd = POSIX::pipe();
434 my $cpid = fork();
435 die "unable to fork worker - $!" if !defined($cpid) || $cpid < 0;
436 if ($cpid == 0) {
437 eval {
438 POSIX::close($pipefd[1]);
439 # redirect STDIN
440 my $fd = fileno(STDIN);
441 close STDIN;
442 POSIX::close(0) if $fd != 0;
443 die "unable to redirect STDIN - $!"
444 if !open(STDIN, "<&", $pipefd[0]);
445
446 # redirect STDOUT
447 $fd = fileno(STDOUT);
448 close STDOUT;
449 POSIX::close (1) if $fd != 1;
450
451 die "unable to redirect STDOUT - $!"
452 if !open(STDOUT, ">&", $outfileno);
453
454 exec($comp);
455 die "fork compressor '$comp' failed\n";
456 };
457 if (my $err = $@) {
458 $self->logerr($err);
459 POSIX::_exit(1);
460 }
461 POSIX::_exit(0);
462 kill(-9, $$);
463 } else {
464 POSIX::close($pipefd[0]);
465 $outfileno = $pipefd[1];
466 }
467
468 return ($cpid, $outfileno);
469 };
470
471 sub archive_vma {
472 my ($self, $task, $vmid, $filename, $comp) = @_;
473
474 my $conffile = "$task->{tmpdir}/qemu-server.conf";
475 my $firewall = "$task->{tmpdir}/qemu-server.fw";
476
477 my $opts = $self->{vzdump}->{opts};
478
479 my $starttime = time();
480
481 my $speed = 0;
482 if ($opts->{bwlimit}) {
483 $speed = $opts->{bwlimit}*1024;
484 }
485
486 my $diskcount = scalar(@{$task->{disks}});
487 if (PVE::QemuConfig->is_template($self->{vmlist}->{$vmid}) || !$diskcount) {
488 my @pathlist;
489 foreach my $di (@{$task->{disks}}) {
490 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
491 push @pathlist, "$di->{qmdevice}=$di->{path}";
492 } else {
493 die "implement me";
494 }
495 }
496
497 if (!$diskcount) {
498 $self->loginfo("backup contains no disks");
499 }
500
501 my $outcmd;
502 if ($comp) {
503 $outcmd = "exec:$comp";
504 } else {
505 $outcmd = "exec:cat";
506 }
507
508 $outcmd .= " > $filename" if !$opts->{stdout};
509
510 my $cmd = ['/usr/bin/vma', 'create', '-v', '-c', $conffile];
511 push @$cmd, '-c', $firewall if -e $firewall;
512 push @$cmd, $outcmd, @pathlist;
513
514 $self->loginfo("starting template backup");
515 $self->loginfo(join(' ', @$cmd));
516
517 if ($opts->{stdout}) {
518 $self->cmd($cmd, output => ">&" . fileno($opts->{stdout}));
519 } else {
520 $self->cmd($cmd);
521 }
522
523 return;
524 }
525
526 my $devlist = _get_task_devlist($task);
527
528 $self->enforce_vm_running_for_backup($vmid);
529
530 my $cpid;
531 my $backup_job_uuid;
532
533 eval {
534 $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = $SIG{PIPE} = sub {
535 die "interrupted by signal\n";
536 };
537
538 my $outfh;
539 if ($opts->{stdout}) {
540 $outfh = $opts->{stdout};
541 } else {
542 $outfh = IO::File->new($filename, "w") ||
543 die "unable to open file '$filename' - $!\n";
544 }
545 my $outfileno = fileno($outfh);
546
547 if ($comp) {
548 ($cpid, $outfileno) = $fork_compressor_pipe->($self, $comp, $outfileno);
549 }
550
551 my $qmpclient = PVE::QMPClient->new();
552 my $backup_cb = sub {
553 my ($vmid, $resp) = @_;
554 $backup_job_uuid = $resp->{return}->{UUID};
555 };
556 my $add_fd_cb = sub {
557 my ($vmid, $resp) = @_;
558
559 my $params = {
560 'backup-file' => "/dev/fdname/backup",
561 speed => $speed,
562 'config-file' => $conffile,
563 devlist => $devlist
564 };
565 $params->{'firewall-file'} = $firewall if -e $firewall;
566
567 $qmpclient->queue_cmd($vmid, $backup_cb, 'backup', %$params);
568 };
569
570 $qmpclient->queue_cmd($vmid, $add_fd_cb, 'getfd', fd => $outfileno, fdname => "backup");
571
572 my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
573
574 eval { $qmpclient->queue_execute(30) };
575 my $qmperr = $@;
576
577 if ($fs_frozen) {
578 $self->qga_fs_thaw($vmid);
579 }
580
581 die $qmperr if $qmperr;
582 die $qmpclient->{errors}->{$vmid} if $qmpclient->{errors}->{$vmid};
583
584 if ($cpid) {
585 POSIX::close($outfileno) == 0 ||
586 die "close output file handle failed\n";
587 }
588
589 die "got no uuid for backup task\n" if !defined($backup_job_uuid);
590
591 $self->loginfo("started backup task '$backup_job_uuid'");
592
593 $self->resume_vm_after_job_start($task, $vmid);
594
595 $query_backup_status_loop->($self, $vmid, $backup_job_uuid);
596 };
597 my $err = $@;
598 if ($err) {
599 $self->logerr($err);
600 $self->mon_backup_cancel($vmid) if defined($backup_job_uuid);
601 }
602
603 $self->restore_vm_power_state($vmid);
604
605 if ($err) {
606 if ($cpid) {
607 kill(9, $cpid);
608 waitpid($cpid, 0);
609 }
610 die $err;
611 }
612
613 if ($cpid && (waitpid($cpid, 0) > 0)) {
614 my $stat = $?;
615 my $ec = $stat >> 8;
616 my $signal = $stat & 127;
617 if ($ec || $signal) {
618 die "$comp failed - wrong exit status $ec" .
619 ($signal ? " (signal $signal)\n" : "\n");
620 }
621 }
622 }
623
624 sub _get_task_devlist {
625 my ($task) = @_;
626
627 my $devlist = '';
628 foreach my $di (@{$task->{disks}}) {
629 if ($di->{type} eq 'block' || $di->{type} eq 'file') {
630 $devlist .= ',' if $devlist;
631 $devlist .= $di->{qmdevice};
632 } else {
633 die "implement me (type '$di->{type}')";
634 }
635 }
636 return $devlist;
637 }
638
639 sub qga_fs_freeze {
640 my ($self, $task, $vmid) = @_;
641 return if !$self->{vmlist}->{$vmid}->{agent} || $task->{mode} eq 'stop' || !$self->{vm_was_running};
642
643 if (!PVE::QemuServer::qga_check_running($vmid, 1)) {
644 $self->loginfo("skipping guest-agent 'fs-freeze', agent configured but not running?");
645 return;
646 }
647
648 $self->loginfo("issuing guest-agent 'fs-freeze' command");
649 eval { mon_cmd($vmid, "guest-fsfreeze-freeze") };
650 $self->logerr($@) if $@;
651
652 return 1; # even on mon command error, ensure we always thaw again
653 }
654
655 # only call if fs_freeze return 1
656 sub qga_fs_thaw {
657 my ($self, $vmid) = @_;
658
659 $self->loginfo("issuing guest-agent 'fs-thaw' command");
660 eval { mon_cmd($vmid, "guest-fsfreeze-thaw") };
661 $self->logerr($@) if $@;
662 }
663
664 # we need a running QEMU/KVM process for backup, starts a paused (prelaunch)
665 # one if VM isn't already running
666 sub enforce_vm_running_for_backup {
667 my ($self, $vmid) = @_;
668
669 if (PVE::QemuServer::check_running($vmid)) {
670 $self->{vm_was_running} = 1;
671 return;
672 }
673
674 eval {
675 $self->loginfo("starting kvm to execute backup task");
676 # start with skiplock
677 my $params = {
678 skiplock => 1,
679 paused => 1,
680 };
681 PVE::QemuServer::vm_start($self->{storecfg}, $vmid, $params);
682 };
683 die $@ if $@;
684 }
685
686 # resume VM againe once we got in a clear state (stop mode backup of running VM)
687 sub resume_vm_after_job_start {
688 my ($self, $task, $vmid) = @_;
689
690 return if !$self->{vm_was_running};
691
692 if (my $stoptime = $task->{vmstoptime}) {
693 my $delay = time() - $task->{vmstoptime};
694 $task->{vmstoptime} = undef; # avoid printing 'online after ..' twice
695 $self->loginfo("resuming VM again after $delay seconds");
696 } else {
697 $self->loginfo("resuming VM again");
698 }
699 mon_cmd($vmid, 'cont');
700 }
701
702 # stop again if VM was not running before
703 sub restore_vm_power_state {
704 my ($self, $vmid) = @_;
705
706 # we always let VMs keep running
707 return if $self->{vm_was_running};
708
709 eval {
710 my $resp = mon_cmd($vmid, 'query-status');
711 my $status = $resp && $resp->{status} ? $resp->{status} : 'unknown';
712 if ($status eq 'prelaunch') {
713 $self->loginfo("stopping kvm after backup task");
714 PVE::QemuServer::vm_stop($self->{storecfg}, $vmid, 1);
715 } else {
716 $self->loginfo("kvm status changed after backup ('$status') - keep VM running");
717 }
718 };
719 warn $@ if $@;
720 }
721
722 sub mon_backup_cancel {
723 my ($self, $vmid) = @_;
724
725 $self->loginfo("aborting backup job");
726 eval { mon_cmd($vmid, 'backup-cancel') };
727 $self->logerr($@) if $@;
728 }
729
730 sub snapshot {
731 my ($self, $task, $vmid) = @_;
732
733 # nothing to do
734 }
735
736 sub cleanup {
737 my ($self, $task, $vmid) = @_;
738
739 # nothing to do ?
740 }
741
742 1;