summaryrefslogtreecommitdiff
path: root/virt-install
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2020-01-15 10:28:53 -0500
committerCole Robinson <crobinso@redhat.com>2020-01-15 11:07:42 -0500
commit5e63e87a8a13b0f2f325519f9f1f69d3a0f74821 (patch)
treeb307682cecf738a8e7be5b611d2e0327b6203302 /virt-install
parent925948a19ec38a3e0627d80c7b8ef7a9613b57c9 (diff)
downloadvirt-manager-5e63e87a8a13b0f2f325519f9f1f69d3a0f74821.tar.gz
cli: Default lxc:/// memory to 1024, and print it
My previous patch was misguided as pointed out by Pavel: https://github.com/virt-manager/virt-manager/issues/73#issuecomment-574680435 And it was setting incorrect memory, which I missed because the tests are busted here. Add a hack to work around that Bump up the default to 1024, and print it, so the user can tell if the default is not to their liking Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'virt-install')
-rwxr-xr-xvirt-install7
1 files changed, 5 insertions, 2 deletions
diff --git a/virt-install b/virt-install
index 0056a218..9d574fc8 100755
--- a/virt-install
+++ b/virt-install
@@ -455,10 +455,13 @@ def set_cli_defaults(options, guest):
if guest.os.is_container():
if not memory_specified(guest):
+ mbram = 1024
# LXC doesn't even do anything with memory settings, but libvirt
# XML requires it anyways. Fill in 64 MiB
- log.debug("Setting container default --memory 64")
- guest.currentMemory = 64 // 1024
+ cli.print_stdout(
+ _("Using container default --memory {megabytes}").format(
+ megabytes=mbram))
+ guest.currentMemory = mbram * 1024
return
if (options.unattended and