diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-19 17:23:38 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-19 17:23:38 +0100 |
commit | 7f11952199af28797d49e42e1a336275412538c8 (patch) | |
tree | 5b973af8edd5aadac0651723b82d4d3d9edf4c23 /source4 | |
parent | a31a2f082f26785967d8cb302ca940e76d513ac6 (diff) | |
download | samba-7f11952199af28797d49e42e1a336275412538c8.tar.gz samba-7f11952199af28797d49e42e1a336275412538c8.tar.bz2 samba-7f11952199af28797d49e42e1a336275412538c8.zip |
Allow loading kvm snapshots.
(This used to be commit 8ef295bb9cba4a47ff19894364e9d5f4dc15a935)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/selftest/target/Kvm.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/selftest/target/Kvm.pm b/source4/selftest/target/Kvm.pm index 7799cb7ec0..b1ad8fcefa 100644 --- a/source4/selftest/target/Kvm.pm +++ b/source4/selftest/target/Kvm.pm @@ -101,9 +101,13 @@ sub start($$$) my $opts = (defined($ENV{KVM_OPTIONS})?$ENV{KVM_OPTIONS}:"-nographic"); + if (defined($ENV{KVM_SNAPSHOT})) { + $opts .= " -loadvm $ENV{KVM_SNAPSHOT}"; + } + my ($ifup_script, $dhcpd_pidfile, $ip_address) = $self->write_kvm_ifup($path, "192.168.9"); - system("kvm $opts -daemonize -pidfile $pidfile -snapshot $image -net nic -net tap,script=$ifup_script"); + system("kvm $opts -monitor unix:$path/kvm.monitor,server,nowait -daemonize -pidfile $pidfile -snapshot $image -net nic -net tap,script=$ifup_script"); return (read_pidfile($pidfile), read_pidfile($dhcpd_pidfile), $ip_address); } |