add enable to config to auto-start VMs

This commit is contained in:
mischa 2023-05-02 22:55:42 +02:00
parent f75da4b3c8
commit c77ca0dc4d
2 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,7 @@ sub render_vm_conf {
my $_mac = $vms{$vm_name}{'mac'} || $conf{'conf'}{'MAC_PREFIX'} . ":" . $vms{$vm_name}{'vm_number'}; 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 "vm \"%s\" {\n", $_instance;
printf $fh_vm "\tdisable\n"; printf $fh_vm "\tdisable\n" if ! $vms{$vm_name}{'enable'};
printf $fh_vm "\towner %s\n", $_owner; printf $fh_vm "\towner %s\n", $_owner;
printf $fh_vm "\tmemory %s\n", $_memory if $_memory; printf $fh_vm "\tmemory %s\n", $_memory if $_memory;
printf $fh_vm "\tboot device net\n" if (! -e $_disk); printf $fh_vm "\tboot device net\n" if (! -e $_disk);

View File

@ -11,3 +11,4 @@ hostname="deploytest1"
username="deploytest1" username="deploytest1"
memory="1G" memory="1G"
note="" note=""
enable="yes"