[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] 'xl reboot domid' ignores all in-memory changes AND the domu's config file changes


  • To: xen-users@xxxxxxxxxxxxx
  • From: "Austin S. Hemmelgarn" <ahferroin7@xxxxxxxxx>
  • Date: Wed, 21 Sep 2016 10:08:26 -0400
  • Delivery-date: Wed, 21 Sep 2016 14:09:44 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

On 2016-09-21 09:46, msd+xen-users@xxxxxx wrote:
Hello !

First, thank you very much for your help ! :)

a. What I want to do
--------------------

1. In the Dom-0, reduce the memory of one Dom-U "domu1" from 2048 to 1024
2. Create a new Dom-U "domu2" with 1024 Mb of memory
3. When the Dom-U "domu1" want to reboot (a kernel update for example),
it keeps 1024 Mo of memory and not 2048, because it will crash !

For doing this :
- In the Dom-0, I use 'xl mem-set domu1 1024' and I change the memory
value from 2048 to 1024 in the file '/etc/xen/dumu1.cfg'
- I create a new file '/etc/xen/dumu2.cfg' with 1024 Mb of memory and I
use 'xl create /etc/xen/domu2.cfg'

If I use 'xl li', I can see that my 2 Dom-U have 1024 Mb of memory.

But, when, one day, the domu1 wants to reboot, it crashes because there
is not enouth memory in the xen memory pool because it wants 2048
instead of 1024.

So, is it possible to :
- when domu1 reboot, destroy the machine and recreate the machine with
it's updated conf file '/etc/xen/dumu1.cfg' ?
- or, when domu1 reboot use the value of mem-set (or the mem-max value)
as a parameter for the new virtual machine for domu1 ?


If no, do you have a solution for this problem ?
The approach I would personally use is to use xl shutdown followed by xl create while making sure the config file matches what you want instead of xl reboot. The disadvantage to this is that the domain ID will change (as will the UUID if it's not set explicitly in the domain configuration file), and there's no way to get Xen to do this itself. In my case though, I'd probably never need this myself (I almost exclusively run PV domains, and I have all my PV domains set up for self-ballooning, so 90% of the time they're using significantly less memory than they're assigned, but that of course has it's own issues (like a nearly complete lack of documentation)), so I may be completely wrong about the best way to do this.

b. mem-max
----------

Austin S. Hemmelgarn <ahferroin7@xxxxxxxxx> wrote :
xl mem-max is what you're thinking of probably, it lets you adjust the
max-mem value dynamically, although the OS has to have hotplug support
in the Xen balloon driver (I think most Linux distros do, but I'm not
certain as I run custom kernels for all my Linux VM's). Unlike the
regular xl mem-set command, this will persist through an xl reboot.

I have tried to play with mem-max, but it is the same problem. Even if I
reduce the mem-max to 1024, when the dom-u restart, it take back 2048 Mb
of RAM.
Ah, I forgot, this too suffers from the fact that Xen resets the runtime configuration on an xl reboot. I forget why I thought it persisted though...

c. Documentation
----------------

I've seen in the xl documentation the 'config-update' parameter
(http://xenbits.xen.org/docs/4.4-testing/man/xl.1.html).

Update the saved configuration for a running domain. This has no
immediate effect but will be applied when the guest is next restarted.
*This command is useful to ensure that runtime modifications made to the
guest will be preserved when the guest is restarted.*

1. So I understand there is a way to ensure runtime modification to a
guest can be preserved when the guest is restarted, no ?
2. When I try this command (xl config-update domu1 /etc/xen/domu1.cfg) I
have a "Erreur de segmentation" (may be "segfault error" in English). Why ?
I'm not entirely certain about the config-update command, I've never used it myself, and I've got no idea why it would be throwing a segmentation fault, but it sounds like if you can get that working, it will probably do almost exactly what you need.


Thank you in advance for your replies,

Regards,


Msd

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.