vmparser writer functions follow a read-merge-write pattern: each function reads the existing vms/<vmname>.json file, replaces only the target section with the new value, then serialises the full VM struct back to disk using json.MarshalIndent. This means calling VMParserWriterCPU to update CPU settings will never touch the disk, memory, or network sections of the same file.
Import
Writing by resource
- VMInfo
- CPU
- Memory
- Network
- Disk
Update the Signature:
vm identity section. The VM name is derived from info.Name, so the file path is vms/<info.Name>.json.VMParserWriterInfo(info VMInfo) errorNote that this writer takes a VMInfo value directly (not a vmname string) because the name is embedded in the struct.