Swap files in VM's in MS Server 2008 R2 Hyper-V


  • I have several VM's, each one is required to have  a 128MB minimum swap file on the boot drive.
    Only Microsoft knows why, it's a real pain in the butt, especially when you are configuring your RAID systems to operate a certain way.

    Further, to this 128MB swap file on the first drive, I've added the option to have a Windows "System Managed" swap file on one of my other logical drives; One which I would LIKE it to use as the primary swap file.

    Windows doesn't seem to know that it is supposed to do this.

    Is there a reason why?  Is there something else I need to configure, besides setting "system managed size" for the drive I want the swap file on?


    Monday, July 05, 2010 4:05 PM

All replies

  • As you haven't mentioned OS/architecture -> check this out for XP/2003 x64 -> ;-)



    • Marked as answer by Vincent HuModerator Thursday, July 08, 2010 7:30 AM
    • Unmarked as answer by kshaeta Tuesday, July 13, 2010 6:07 PM
    Monday, July 05, 2010 8:16 PM
  • windows needs to have a swap file on your boot drive if you have generation of memory dumps turned on. if you select no dumps on crashes, you should be able to move your swap file completely of the boot drive
    Tuesday, July 06, 2010 12:57 PM
  • Hi,


    What did you mean by “swap file”? Did you mean page file? Could you please elaborate this?


    By the way, swap file (as it’s called in Windows 95/98/ME: Win386.swp) or page file (in Windows NT versions including Windows 2000 and XP: pagefile.sys).


    For more information about appropriate page file, you can refer to:


    How to determine the appropriate page file size on my server



    Best Regards,

    Vincent Hu


    • Marked as answer by Vincent HuModerator Thursday, July 08, 2010 7:30 AM
    • Unmarked as answer by kshaeta Tuesday, July 13, 2010 6:07 PM
    Wednesday, July 07, 2010 3:45 AM
  • Yes, a page file is what I mean; sorry if the nomenclature is incorrect.

    OS: Windows Server 2008 R2, 64bit.  The VM's are running Server 2008 Standard, or Enterprise.

    The problem isn't determining the size of the swap file, it's trying to figure out why Microsoft won't manage a swap file on another drive, when I've set it to do so.  It doesn't make sense to me.

    C: drive has a 128MB page file.

    D: drive is set to "System Managed" page file.


    Now, if I run the server with those specs, it doesn't make a "System Managed" swap file on the D: drive.  It just cries & whines about not having a proper swap file size, and uses the 128MB one.

    If I set the C: drive to "System Managed", it creates a swap file equal to the memory size.

    The primary question being, why wouldn't it, in the first setting, use a swap file of 128MB on the C: drive then, create another swap file on D:, equal to Memory... minus 128MB?


    Tuesday, July 13, 2010 5:58 PM
  • So no one else has encountered this problem?
    Tuesday, August 24, 2010 11:01 PM
  • like posted above, as long as you generate dumps on crashes, windows needs a pagefile on the boot drive. did you give deactivating dump generation a try? (winkey + pause -> advanced settings -> startup and recovery)
    Monday, August 30, 2010 11:32 AM
  • For some reason, I apparently didn't see your post.  I will try that, thanks for the repost.
    Friday, September 10, 2010 3:55 PM
  • That apparently doesn't fix the problem.  Even if I turn off the dump generation, Windows still will not use a pagefile on another drive.
    Tuesday, November 23, 2010 9:49 PM
  • I hate to resurrect a really old thread, but it is still showing up in searches.

    This occurs when the swap file is created on a drive attached to the SCSI chain. Hyper-V guests initialize their swap files before the virtual SCSI driver is fully loaded. Reassign the VHD from the SCSI chain to the IDE chain and restart. Like real IDE, only one drive per virtual IDE controller is ever active at a time, so I usually connect swap drives to "Secondary channel (1)" where it will share with the less-utilized virtual DVD drive.

    Wednesday, November 02, 2011 10:39 PM