Copy templates at start of tool not vm

This commit is contained in:
dump_stack() 2020-01-09 23:24:18 +00:00
parent 2146397906
commit 8b271a3e5e
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -256,18 +256,12 @@ func start(l *libvirt.Libvirt, name string, verbose, online, stateless bool,
}
}
// Copy templates
err := prepareTemplates(appvmPath)
if err != nil {
log.Fatal(err)
}
if !isRunning(l, vmName) {
if !verbose {
go stupidProgressBar()
}
err = generateAppVM(l, name, vmName, appvmPath, sharedDir,
err := generateAppVM(l, name, vmName, appvmPath, sharedDir,
verbose, online)
if err != nil {
log.Fatal(err)
@ -430,6 +424,12 @@ func main() {
log.Fatal(err)
}
// Copy templates
err = prepareTemplates(configDir)
if err != nil {
log.Fatal(err)
}
kingpin.Command("list", "List applications")
autoballonCommand := kingpin.Command("autoballoon", "Automatically adjust/reduce app vm memory")
minMemory := autoballonCommand.Flag("min-memory", "Set minimal memory (megabytes)").Default("1024").Uint64()