Skip to content

Commit

Permalink
Backport a few virt PRs (saltstack#272)
Browse files Browse the repository at this point in the history
* Fix virt update when cpu and memory are changed

If CPU is changed, the memory change would be short circuited. This is a
regression introduced by PR saltstack#58332

* virt: add VM memory tunning support

* avoid comparing string with integer

* fix pre-commit failure

* Properly fix memory setting regression in virt.update

The 'mem' property in the virt.update value should indicate the result
of a live memory setting. The value should be an int in KiB. Fixing the
code and tests for this.

* virt: add stop_on_reboot parameter in guest states and definition

It can be needed to force a VM to stop instead of rebooting. A typical
example of this is when creating a VM using a install CDROM ISO or when
using an autoinstallation profile. Forcing a shutdown allows libvirt to
pick up another XML definition for the new start to remove the
firstboot-only options.

* virt: expose live parameter in virt.defined state

Allow updating the definition of a VM without touching the live
instance. This can be helpful since live update may change the device
names in the guest.

Co-authored-by: firefly <guoqing_li@pm.me>
Co-authored-by: gqlo <escita@pm.me>
  • Loading branch information
3 people authored and meaksh committed Dec 17, 2020
1 parent 21990c9 commit 72a6fa3
Show file tree
Hide file tree
Showing 8 changed files with 687 additions and 34 deletions.
1 change: 1 addition & 0 deletions changelog/57639.added
@@ -0,0 +1 @@
Memory Tuning Support which allows much greater control of memory allocation
1 change: 1 addition & 0 deletions changelog/58589.added
@@ -0,0 +1 @@
Allow handling special first boot definition on virtual machine

0 comments on commit 72a6fa3

Please sign in to comment.