mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-23 16:41:29 +00:00
Copy templates at start of tool not vm
This commit is contained in:
parent
2146397906
commit
8b271a3e5e
14
appvm.go
14
appvm.go
|
@ -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 !isRunning(l, vmName) {
|
||||||
if !verbose {
|
if !verbose {
|
||||||
go stupidProgressBar()
|
go stupidProgressBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
err = generateAppVM(l, name, vmName, appvmPath, sharedDir,
|
err := generateAppVM(l, name, vmName, appvmPath, sharedDir,
|
||||||
verbose, online)
|
verbose, online)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
@ -430,6 +424,12 @@ func main() {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy templates
|
||||||
|
err = prepareTemplates(configDir)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
kingpin.Command("list", "List applications")
|
kingpin.Command("list", "List applications")
|
||||||
autoballonCommand := kingpin.Command("autoballoon", "Automatically adjust/reduce app vm memory")
|
autoballonCommand := kingpin.Command("autoballoon", "Automatically adjust/reduce app vm memory")
|
||||||
minMemory := autoballonCommand.Flag("min-memory", "Set minimal memory (megabytes)").Default("1024").Uint64()
|
minMemory := autoballonCommand.Flag("min-memory", "Set minimal memory (megabytes)").Default("1024").Uint64()
|
||||||
|
|
Loading…
Reference in a new issue