mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Auto-balloon a couple megabytes before creating an HVM domain as
Xen will allocate 1MB for shadow memory immediately. Suggested by Daniel Berrange. Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
3734a7eda8
commit
67cc36df17
1 file changed
+3
@@ -1419,6 +1419,9 @@ class XendDomainInfo:
|
||||
raise VmError("HVM guest support is unavailable: is VT/AMD-V "
|
||||
"supported by your CPU and enabled in your "
|
||||
"BIOS?")
|
||||
# Hack to pre-reserve some memory for HVM setup.
|
||||
# Needed because Xen allocates 1MB by default immediately.
|
||||
balloon.free(2*1024) # 2MB should be plenty
|
||||
|
||||
self.domid = xc.domain_create(
|
||||
domid = 0,
|
||||
|
||||