mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2025-05-01 09:34:23 +00:00
Implements stateless VMs
This commit is contained in:
parent
e037770c38
commit
355fb314a1
2 changed files with 70 additions and 16 deletions
6
xml.go
6
xml.go
|
@ -5,7 +5,9 @@ import "fmt"
|
|||
// You may think that you want to rewrite to proper golang structures.
|
||||
// Believe me, you shouldn't.
|
||||
|
||||
func generateXML(name string, online bool, vmNixPath, reginfo, img, sharedDir string) string {
|
||||
func generateXML(vmName string, online bool,
|
||||
vmNixPath, reginfo, img, sharedDir string) string {
|
||||
|
||||
qemuParams := `
|
||||
<qemu:commandline>
|
||||
<qemu:arg value='-device'/>
|
||||
|
@ -24,7 +26,7 @@ func generateXML(name string, online bool, vmNixPath, reginfo, img, sharedDir st
|
|||
`
|
||||
}
|
||||
|
||||
return fmt.Sprintf(xmlTmpl, "appvm_"+name, vmNixPath, vmNixPath, vmNixPath,
|
||||
return fmt.Sprintf(xmlTmpl, vmName, vmNixPath, vmNixPath, vmNixPath,
|
||||
reginfo, img, sharedDir, sharedDir, sharedDir, qemuParams)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue