File: fs-freeze.pl

package info (click to toggle)
libsys-virt-perl 11.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,088 kB
  • sloc: perl: 2,187; sh: 12; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 366 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- perl -*-
use strict;
use warnings;
use Sys::Virt;

die "syntax: $0 URI DOMAIN-NAME MOUNT-POINTS\n" unless int(@ARGV) >= 2;

my $uri = shift @ARGV;
my $domname = shift @ARGV;

my @mountpoints = @ARGV;

print "Addr $uri\n";
my $con = Sys::Virt->new(address => $uri, readonly => 0);

my $dom = $con->get_domain_by_name($domname);

$dom->fs_freeze(\@mountpoints);