We rely on the domain existing after xenstore-ls's main has called
exit, so that we can do our own xenstore-ls in dom0 and check the
results.
Previously, this happened by accident because the rump kernel would,
after _exit, call a minios function which crashes the domain. New
rump kernels don't do this, and instead shut down cleanly.
Setting `on_poweroff="preserve"' has the desired effect.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
our $gn = $gho->{Guest};
+sub arrangepreserve () {
+ target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub {
+ while (<EI>) {
+ next if m/^\s*on_poweroff\s*=/;
+ print EO or die $!;
+ }
+ print EO "\n","on_poweroff='preserve'\n" or die $!;
+ });
+}
+
sub start () {
my $cmd= toolstack()->{Command}." create ".
$r{ $gho->{Guest}.'_'. toolstack()->{CfgPathVar} };
}
}
+arrangepreserve();
start();
await_end();
check_output();