top of page

Experienced Technology Product Manager adept at steering success throughout the entire product lifecycle, from conceptualization to market delivery. Proficient in market analysis, strategic planning, and effective team leadership, utilizing data-driven approaches for ongoing enhancements.

  • Twitter
  • LinkedIn
White Background

Shared swap vMotion of a fully reserved VM with swap file fails due to failure to extend swap file


I was trying to migrate a virtual machine which had around 60 GB memory to a host which had no virtual machines registered on it , failed with below exception


hostd.log


2019-03-28T05:17:28.943Z info hostd[11B81B70] [Originator@6876 sub=Vcsvc.VMotionDst (2076941261877375970)] ResolveCb: VMX reports needsUnregister = true for migrateType MIGRATE_TYPE_VMOTION

2019-03-28T05:17:28.943Z info hostd[11B81B70] [Originator@6876 sub=Vcsvc.VMotionDst (2076941261877375970)] ResolveCb: Failed with fault: (vim.fault.GenericVmConfigFault) {

--> faultCause = (vmodl.MethodFault) null,

--> faultMessage = (vmodl.LocalizableMessage) [

--> (vmodl.LocalizableMessage) {

--> key = "msg.checkpoint.destination.resume.fail",

--> arg = (vmodl.KeyAnyValue) [

--> (vmodl.KeyAnyValue) {

--> key = "1",

--> value = "msg.vmk.status.VMK_MEM_ADMIT_FAILED"

--> }

--> ],

--> message = "Failed to resume destination VM: Admission check failed for memory resource.

--> "

--> },

--> (vmodl.LocalizableMessage) {

--> key = "vob.vmotion.swap.extend.failed.status",

--> arg = (vmodl.KeyAnyValue) [

--> (vmodl.KeyAnyValue) {

--> key = "1",

--> value = "-1407197683"

--> },

--> (vmodl.KeyAnyValue) {

--> key = "2",

--> value = "2076941261877375970"

--> },

--> (vmodl.KeyAnyValue) {

--> key = "3",

--> value = "536870912"

--> },

--> (vmodl.KeyAnyValue) {

--> key = "4",

--> value = "Admission check failed for memory resource"

--> }

--> ],

--> message = "vMotion migration [ac1fde0d:2076941261877375970] failed to extend swap file to 536870912 KB: Admission check failed for memory resource.

--> "

--> }

--> ],

--> reason = "Failed to resume destination VM: Admission check failed for memory resource.

--> "

--> msg = "Failed to resume destination VM: Admission check failed for memory resource.

--> vMotion migration [ac1fde0d:2076941261877375970] failed to extend swap file to 536870912 KB: Admission check failed for memory resource.



This Virtual Machine had 64 GB of Memory which is fully reserved and Memory hot plug enabled



Failure was related to swap file growth as it was unable to expand.


In an ideal scenario , when a VM has 100% Memory reservation , swap file of that VM should be 0 KB.


But in my scenario swap file was same as the size of memory assigned to the VM. This was not a normal situation.


examine file "swaptest-26****.vswp"

The reason you still see a swap file same as the size of memory assigned to this VM os because memory reservation was made while the VM was powered on

You must never reserve memory of a virtual machine while it's powered on. It's not a best practice.


Now , let me explain exception in detail. This is a bug identified in version 6.0 and 6.5 , even earlier version if someone's using it.


Below conditions have to met to encounter this bug

VM is fully reserved after it's powered on

VM must be configured with more than 56 GB of Memory

VM must have Memory hot-plug enabled

Happens only on DRS clusters


This behavior is fixed in version 6.7 due to the changes made in the code , but not in 6.5 & 6.0


There is no workaround as we cannot delete the swap file while the VM is powered on. Only was to fix is take a proper downtime of virtual machine , shut it down and bring it back. Swap file should be reset to 0 KB.


Post that vMotion should work.


Here's a small video recording where i reproduced the bug , if you would like to watch it





!! Happy Learning !!


970 views0 comments

Recent Posts

See All

留言

評等為 0(最高為 5 顆星)。
暫無評等

新增評等
bottom of page