mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-27 10:31:31 +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 !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()
|
||||
|
|
Loading…
Reference in a new issue