Project

General

Profile

Bug #48680

Add option to overcommit memory for VM in new UI

Added by Simon Dimenstein over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Vaibhav Chauhan
Category:
GUI (new)
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Issue #40500 is back in 11.2-BETA3
After VM is shutdown it can not be restarted. The error message is:

Request Method: POST
Request URL: http://10.0.0.120/legacy/vm/start/5/
Software Version: FreeNAS-11.2-BETA3 (85d5c7542)
Exception Type: ClientException
Exception Value:

[EFAULT] Cannot guarantee memory for guest ubuntu

Exception Location: /usr/local/lib/python3.6/site-packages/middlewared/client/client.py in call, line 437

Environment:

Software Version: FreeNAS-11.2-BETA3 (85d5c7542)
Request Method: POST
Request URL: http://10.0.0.120/legacy/vm/start/5/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
42. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
163. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./freenasUI/vm/views.py" in start
86. c.call('vm.start', id)
File "./freenasUI/vm/views.py" in start
86. c.call('vm.start', id)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in call
437. raise ClientException(c.error, c.errno, c.trace, c.extra)

Exception Type: ClientException at /legacy/vm/start/5/
Exception Value: [EFAULT] Cannot guarantee memory for guest ubuntu

After box reboot all VMs that are marked autostart start without an issue


Related issues

Related to FreeNAS - Feature #40500: Refactor how memory is accountedDone

History

#1 Updated by Dru Lavigne over 1 year ago

#2 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to William Grzybowski

#3 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

Can you share the Save Debug (System - Advanced) while experiencing the issue?

#4 Updated by Simon Dimenstein over 1 year ago

  • File debug-freenas-20180928100056.tgz added

William Grzybowski wrote:

Can you share the Save Debug (System - Advanced) while experiencing the issue?

Debug file attached

#5 Updated by William Grzybowski over 1 year ago

How much memory do you have configured for each of your VMs?

#6 Updated by Simon Dimenstein over 1 year ago

William Grzybowski wrote:

How much memory do you have configured for each of your VMs?

I have total of 16GB on the box - rancher is given 8GB and ubuntu is given 2GB

#7 Updated by Simon Dimenstein over 1 year ago

Simon Dimenstein wrote:

William Grzybowski wrote:

How much memory do you have configured for each of your VMs?

I have total of 16GB on the box - rancher is given 8GB and ubuntu is given 2GB

When switched rancherOS to 6GB and ubuntu to 2GB both are starting. This points to FreeNAS reserving 8GB for operation

#8 Updated by William Grzybowski over 1 year ago

Simon Dimenstein wrote:

William Grzybowski wrote:

How much memory do you have configured for each of your VMs?

I have total of 16GB on the box - rancher is given 8GB and ubuntu is given 2GB

Ok, it wont let you start because by default it doesnt overcommit memory. Currently you dont have enough memory to support both VMs.

Its like rancher was using the 8gb even it currently isn't.

Can you try once using a CLI trick to check if it would start?

midclt call vm.start 5 '{"overcommit": true}'

#9 Updated by Simon Dimenstein over 1 year ago

William Grzybowski wrote:

Simon Dimenstein wrote:

William Grzybowski wrote:

How much memory do you have configured for each of your VMs?

I have total of 16GB on the box - rancher is given 8GB and ubuntu is given 2GB

Ok, it wont let you start because by default it doesnt overcommit memory. Currently you dont have enough memory to support both VMs.

Its like rancher was using the 8gb even it currently isn't.

Can you try once using a CLI trick to check if it would start?

midclt call vm.start 5 '{"overcommit": true}'

I had to restart my rancherOS VM (with allocated 6GB) and it would not start from GUI and CLI with the same error

root@freenas[~]# midclt call vm.start 2 '{"overcommit": true}'
[EFAULT] Cannot guarantee memory for guest rancheros
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 155, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1033, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 973, in call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 1137, in start
await self.
_init_guest_vmemory(vm, overcommit=overcommit)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/vm.py", line 906, in __init_guest_vmemory
raise CallError(f'Cannot guarantee memory for guest {vm["name"]}')
middlewared.service_exception.CallError: [EFAULT] Cannot guarantee memory for guest rancheros

Box reboot is the only reliable cure at this point - not very usable ...

#10 Updated by William Grzybowski over 1 year ago

You should either get more RAM or lower the RAM size of your VMs.

The reason it works on fresh boot is because there are no other applications running/consuming memory at this stage.

You're hitting SWAP very heavily.

#11 Updated by William Grzybowski over 1 year ago

  • Category changed from Middleware to GUI (new)
  • Status changed from Blocked to Unscreened
  • Assignee changed from William Grzybowski to Lola Yang
  • Reason for Blocked deleted (Need additional information from Author)

Lola, we need a checkbox while starting a VM, called Overcommit, sending that as a value in vm.start {"overcommit": true}

#12 Updated by Dru Lavigne over 1 year ago

  • Target version changed from Backlog to 11.2-RC2

#13 Updated by Lola Yang over 1 year ago

  • Assignee changed from Lola Yang to Vaibhav Chauhan

#14 Updated by Dru Lavigne over 1 year ago

  • Status changed from Unscreened to In Progress

#15 Updated by Dru Lavigne over 1 year ago

  • File deleted (debug-freenas-20180928100056.tgz)

#16 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Cannot guarantee memory for guest to Add option to overcommit memory for VM
  • Status changed from In Progress to Ready for Testing
  • Needs Merging changed from Yes to No

#17 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Add option to overcommit memory for VM to Add option to overcommit memory for VM in new UI

#18 Updated by Jeff Ervin over 1 year ago

37035

Test Passed FreeNAS-11.2-INTERNAL29

#19 Updated by Timothy Moore II over 1 year ago

  • Needs Doc changed from Yes to No

Docs PR: [angulargui] https://github.com/freenas/freenas-docs/pull/423. Investigation shows no changes needed for [master] branch.

#20 Updated by Dru Lavigne over 1 year ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF