“Cannot allocate memory” error when starting a Xen guest

When trying to start a Xen guest, having plenty of primary memory I got the following error message:

Error starting domain: POST operation failed: 
xend_post: error from xen daemon: (xend.err "Error 
creating domain: (12, 'Cannot allocate memory')")

In this case it was very useful comparing the assigned memory of the Domain-0 (which “contains” all the guest virtual machines)

# xm list Domain-0
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 6948 8 r----- 2271.1

with the total primary memory:

# free -m
 total used free shared buffers cached
Mem: 6948 6918 29 0 20 6307
-/+ buffers/cache: 591 6356
Swap: 9983 0 9983

Domain-0 had too much memory assigned so changing this value solved the incidence:

# xm mem-set Domain-0 6500
# xm list Domain-0
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 6500 8 r----- 2405.0

Link:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: