Skip to content

Commit

Permalink
Add ballooning feature for memory
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed Dec 9, 2019
1 parent 60b5ec0 commit 383738a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func resourceVmQemu() *schema.Resource {
Optional: true,
Default: 512,
},
"balloon": {
Type: schema.TypeInt,
Optional: true,
Default: 0,
},
"cores": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -449,6 +454,7 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
BootDisk: d.Get("bootdisk").(string),
Agent: d.Get("agent").(int),
Memory: d.Get("memory").(int),
Balloon: d.Get("balloon").(int),
QemuCores: d.Get("cores").(int),
QemuSockets: d.Get("sockets").(int),
QemuVcpus: d.Get("vcpus").(int),
Expand Down Expand Up @@ -640,6 +646,7 @@ func resourceVmQemuUpdate(d *schema.ResourceData, meta interface{}) error {
BootDisk: d.Get("bootdisk").(string),
Agent: d.Get("agent").(int),
Memory: d.Get("memory").(int),
Balloon: d.Get("balloon").(int),
QemuCores: d.Get("cores").(int),
QemuSockets: d.Get("sockets").(int),
QemuVcpus: d.Get("vcpus").(int),
Expand Down Expand Up @@ -739,6 +746,7 @@ func resourceVmQemuRead(d *schema.ResourceData, meta interface{}) error {
d.Set("bootdisk", config.BootDisk)
d.Set("agent", config.Agent)
d.Set("memory", config.Memory)
d.Set("balloon", config.Balloon)
d.Set("cores", config.QemuCores)
d.Set("sockets", config.QemuSockets)
d.Set("vcpus", config.QemuVcpus)
Expand Down

0 comments on commit 383738a

Please sign in to comment.