added staggered option to vm.conf, #disable vms

This commit is contained in:
mischa 2020-05-24 11:29:22 +02:00
parent 0ea8bcbda3
commit b4f4b09d07
1 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@
# 2019/09/29 added: doas.conf for pkill option
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
# 2020/05/22 changed: set the hosts password for the users
# 2020/05/24 changed: add staggered option to vm.conf and #disable
#
use 5.024;
use strict;
@ -77,7 +78,8 @@ sub render_vm_conf {
open my $fh_vm, ">", "$_etc/vm.conf";
printf $fh_vm "#\n# File generated by deploy.pl\n#\n";
printf $fh_vm "socket owner :%s\n\n", $conf{'conf'}{'VMDUSERS'};
printf $fh_vm "socket owner :%s\n", $conf{'conf'}{'VMDUSERS'};
printf $fh_vm "staggered start parallel 2 delay 30\n\n";
printf $fh_vm "switch \"%s\" {\n", $conf{'conf'}{'SWITCH'};
printf $fh_vm "\tinterface %s\n", $conf{'conf'}{'INTERFACE'};
printf $fh_vm "}\n\n";
@ -101,7 +103,7 @@ sub render_vm_conf {
my $_mac = $vms{$vm_name}{'mac'} || $conf{'conf'}{'MAC_PREFIX'} . ":" . $vms{$vm_name}{'vm_number'};
printf $fh_vm "vm \"%s\" {\n", $_instance;
printf $fh_vm "\tdisable\n";
printf $fh_vm "\t#disable\n";
printf $fh_vm "\towner %s\n", $_owner;
printf $fh_vm "\tmemory %s\n", $_memory if $_memory;
printf $fh_vm "\tboot \"%s\"\n", $_boot if (! -e $_disk);