Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


SRM SWAP File error

Posted on 2013-11-26
Medium Priority
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.
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.


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 - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003742


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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

618 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