--- trunk/vz-remove.pl 2008/02/08 20:03:16 36 +++ trunk/vz-remove.pl 2008/02/08 21:43:29 37 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Shell qw/rm vzlist/; +use Shell qw/rm vzlist vzctl/; my $vz = '/vz'; my $conf = '/etc/vz/conf'; @@ -30,6 +30,7 @@ my $c = "$conf/$VEID.conf"; if ( -e $c ) { + vzctl('stop', $VEID); unlink $c || die "can't remove $c: $!"; } else { warn "WARNING: configuration file $c doesn't exist\n";