kvm debian add ram

Change the RAM availabe to a KVM guest VM on debian GNU linux

Fireup virsh and Shutdown the guest VM vm8
$ su
# virsh
virsh# shutdown vm8


See details for guest VM vm8
virsh # dominfo vm8
Id:             -
Name:           vm8
UUID:           66952c82-9e92-17fe-eeca-839476336f36
OS Type:        hvm
State:          shut off
CPU(s):         2
Max memory:     262144 kB
Used memory:    262144 kB
Persistent:     yes
Autostart:      disable


Exit virsh
virsh# quit 


Backup the xml that defines the guest vm8
# cd /etc/libvirt/qemu/
# stor vm8.xml
devz:The directory ./stor does not exist! I will create it.
devz:vm8.xml is at ./stor/vm8.xml.0
I use devz ( it just creates a ./stor directory and saves a copy of vm8.xml in /etc/libvirt/qemu/stor/vm8.xml.0 )

I will change all the memory tags
# grep -i memory vm8.xml 
  262144
  262144
# vi vm8.xml
# grep -i memory vm8.xml 
  512000
  512000


Re-define , check , and start the vm8 guest with virsh
# virsh
virsh # define /etc/libvirt/qemu/vm8.xml
Domain vm8 defined from /etc/libvirt/qemu/vm8.xml
 virsh # dominfo vm8
Id:             -
Name:           vm8
UUID:           66952c82-9e92-17fe-eeca-839476336f36
OS Type:        hvm
State:          shut off
CPU(s):         2
Max memory:     512000 kB
Used memory:    512000 kB
Persistent:     yes
Autostart:      disable

virsh # start vm8
Domain vm8 started


done

set the guest VM to autostart and recheck
virsh # autostart vm8
Domain vm8_btcd marked as autostarted

virsh # dominfo vm8
Id:             9
Name:           vm8
UUID:           66952c82-9e92-17fe-eeca-839476336f36
OS Type:        hvm
State:          running
CPU(s):         2
CPU time:       16.6s
Max memory:     512000 kB
Used memory:    512000 kB
Persistent:     yes
Autostart:      enable

virsh # quit





KVM debian change definition --add RAM