R-1192: every guest may swap as much as its RAM (bring-up, RAM resize, once at start) — the measured 8 GB freeze; unreleased
gates / gates (push) Successful in 1m39s
gates / gates (push) Successful in 1m39s
This commit is contained in:
@@ -225,7 +225,8 @@ func (s *Server) handleGuestMemoryResize(w http.ResponseWriter, r *http.Request,
|
||||
}
|
||||
|
||||
// Apply. SetConfig may be synchronous (empty UPID) or return a task to wait on.
|
||||
upid, err := s.mem.SetConfig(r.Context(), vmid, map[string]string{"memory": fmt.Sprintf("%d", target)})
|
||||
// R-1192: the swap moves with the memory (GuestSwapMB) — a grown guest with the old swap cap thrashes the same way.
|
||||
upid, err := s.mem.SetConfig(r.Context(), vmid, map[string]string{"memory": fmt.Sprintf("%d", target), "swap": fmt.Sprintf("%d", GuestSwapMB(target))})
|
||||
if err != nil {
|
||||
s.logger.Error("local-api: guest-memory SetConfig", "vmid", vmid, "target_mb", target, "err", err)
|
||||
writeErr(w, http.StatusBadGateway, "memory resize failed: "+err.Error())
|
||||
|
||||
Reference in New Issue
Block a user