-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the memory in a running VM #7069
Comments
I wonder, how XO could send the memory modification if the router VM is off? I wonder what XenCenter is doing 🤔 |
I don't know how XenCenter is doing it, XO is not preventing changing the memory, simply translating the error: xen-orchestra/packages/xo-server/src/xapi/mixins/vm.mjs Lines 351 to 356 in e3f5799
|
It seems to be the XC code @julien-f : protected override void Run()
{
// If either of the static memories has changed, we need to shut down the VM
// before and reboot afterwards. The user has already been warned about this.
bool reboot = needReboot;
XenAPI.Host vmHost = null;
if (reboot)
{
vmHost = VM.Home();
AsyncAction action = null;
if (VM.allowed_operations.Contains(XenAPI.vm_operations.clean_shutdown))
action = new VMCleanShutdown(VM);
else
action = new VMHardShutdown(VM);
action.RunExternal(Session);
}
// Now save the memory settings. We can't use VM.SaveChanges() for this,
// because we have to do the operations simultaneously or we will
// violate the memory ordering constraints.
try
{
if (staticChanged)
XenAPI.VM.set_memory_limits(Session, VM.opaque_ref, static_min, static_max, dynamic_min, dynamic_max);
else
XenAPI.VM.set_memory_dynamic_range(Session, VM.opaque_ref, dynamic_min, dynamic_max);
}
// Reboot the VM, even if we failed to change the memory settings
finally
{
if (reboot)
{
var action = new VMStartOnAction(VM, vmHost, _warningDialogHAInvalidConfig, _startDiagnosticForm);
action.RunExternal(Session);
}
}
Description = string.Format(Messages.ACTION_CHANGE_MEMORY_SETTINGS_DONE, VM.Name());
} |
Oh I see, my bad I misunderstood, we could detect this error on the UI side and then reboot the VM to change the values. It should be easy to do. |
So todo: do the same approach than XenCenter for now: provide a modal with the error message and tell we can apply after a reboot. Then:
|
Issue planned for Bastien |
Is your feature request related to a problem? Please describe.
In XO, in order to change the memory, the VM need to be stopped.
But becaue Pfsense supplies the IP addresses for all VMs including the XO and the host, stopping Pfsense VM will make the system not functioning.
On the other hand, in XCP center I would get a messsage that the memory will change after a reboot.
It would be nice if XO allow a memory change in a running VM by forcing the VM to reboot
The text was updated successfully, but these errors were encountered: