SRM SWAP File error

Posted on 2013-11-26
Last Modified: 2013-12-21
HI there

Im currently trying to get our SRM (Version 5.0.1) working, but am having an issue with the SWAP files.

We have two VNXs one at each site and we have LUNs that we are replicating, Ive Created the IP mapping and Protection groups and the Recovery PLans we want.

THe machines that are on SRM ive edit their VMX file so point to a none replicated LUN by doing the following:
"1.Power off the virtual machine.
2.Unregister the virtual machine. Right-click the virtual machine in the Inventory and choose Remove from Inventory.
3.Connect to the host:

¿For ESX, use an SSH client. For more information, see Connecting to an ESX host using a SSH client (1019852).
¿For ESXi, use Tech Support Mode. For more information, see Tech Support Mode for Emergency Support (1003677) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

4.Change directory to the folder where the virtual machine resides:

cd /vmfs/volumes/datastore_name/virtual_machine_folder/

5.Edit the virtual machine's configuration file with a text editor.
6.Add this line:

sched.swap.dir = /vmfs/volumes/datastore/

7.Register the virtual machine again. For more information, see Registering or adding a virtual machine to the inventory on vCenter Server or on an ESXi/ESX host (1006160)."

However when i run a Test on a Recovery plan the servers wont boot up and have the following error:
"unable to create a swap file the value of sched swap dir specified in the vms configuration file is invalid"

Id be greatful on how to resolve this
Question by:Colchester_Institute
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4

Expert Comment

by:Steve M
ID: 39679073
What was the location of your previous swap dir?  Could you post the location of your swap and virtual machine dir so we can verify it looks right?

It should look something like this (of course yours will be different depending on your storage setup and vm name):


Author Comment

ID: 39680132
the VMs have been migrated to a new SAN

the SWAP location is exactly how you mention it should it should be and when i look at the Datastore the SWAP file is there.  

Servers not on SRM are simpy set to default to there VM directory for their WAP file as those servers sit on non replicated luns.

Im wondering if its to do with the name of the LUN on fail over?

the name of the LUN/SWAP file location is <site prefix>_SRM_SWAP_LUN501, so obviously at the two sites the "sitePreifx part is different

Expert Comment

by:Steve M
ID: 39681179
That sounds correct - the path needs to be whatever the new location is, so if you have <site1>_SRM_SWAP_LUN501, and you have moved to a new SAN location of  <site2>_SRM_SWAP_LUN501 then you will need to update that path to match.

Are you are not using storage vmotion to migrate the vm, then you will need to edit the vmx in most cases I believe.
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 39681212
No its Definitley SRM as the migrations have taken place.

Basically at the moment out of our server environmet we have 30 or so that are on Replicated LUNS and on the SRM system.  Those servers i have manually changed the CVMX file to poing their SWAP file location to the SWAP FILE LUN which is non-replicated.

So my understanding from this converastion is for the servers to work on SRM the SWAP File Location must have the same name so in my case i would just need two LUNS named SRM_SWAP_LUN501

NB: can i put two locations within the VMX? Im thinking i cant but want to check

Expert Comment

by:Steve M
ID: 39681681
Oh Boy - I just realized that I totally misunderstood the original question.  I apologize, I thought you had an application called SRM or a VM called SRM that you were migrating.  Now I think I realize that you are using VMware SRM, Site Recovery Manager, (this is why I hate acronyms), is this correct?

Author Comment

ID: 39683013
haha yes thats correct.

We are using SRM (Site Recovery Manager)

I have around 30 guest systems placed into it.

THe systems that are in SRM are obviously on Replicated LUNs and so ive changed there locations of the SWAP file Manually as described in the process in my original post.  All othe systems are on non replicated LUNs and their SWAP files are stored in their default location i.e the guest folder with aits vmx files etc.

When i run a SRM test the servers wont boot up at the recovery end with the error "unable to create a swap file the value of sched swap dir specified in the vms configuration file is invalid"

hope thios help clarify issue im having

Expert Comment

by:Steve M
ID: 39683913
Man I wish I could help, but I have no experience with the SRM product unfortunately, sorry.

Have a look through this and see if it helps -


Accepted Solution

Colchester_Institute earned 0 total points
ID: 39721482
Resolved by changing how all our vms store their swap files. We now have dedicated LUNS at both sites that are solely for the SWAP files and thus on an SRM fail over the machines will now boot

Author Closing Comment

ID: 39733387
no other solutions were acceptable and after researching more on various VM sites this seemed to be the best way to do it

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
In this article, I show you step by step with screenshots to assist you - HOW TO: Deploy and Install the VMware vCenter Server Appliance 6.5 (VCSA 6.5), with some helpful tips along the way.
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question