none
Recommended pagefile configuration of a replicated guest RRS feed

  • Question

  • Dear all:

    Windows expects to have a Pagefile. So if I configure replication for a guest and I don't want to replicate the Pagefile, which is constantly changing, I will have to create the page file on a separate disk which is excluded from replication.

    However, there is a problem: If you suspend that guest machine and resume it or you shut it down and restart it, sometimes it freezes. This happens from time to time, say one out of three times. It ONLY happens if the Pagefile is on a separate virtual disk.

    Why would that happen? Well, according to https://www.altaro.com/hyper-v/excluding-paging-file-from-hyper-v-replication/ "Relocating the paging file to a VHD connected SCSI controller is not supported" and that is what I did, since I had no other choice: this is a hyper-v generation2 guest, which does NOT SUPPORT or offer IDE-connected virtual disks.

    Furthermore, https://www.altaro.com/hyper-v/hyper-v-page-file-settings/ explains: "you cannot place a virtual machine’s swap file on a VHD that is attached to the virtual SCSI chain. This is because the SCSI driver is synthetic, so it doesn’t load until after the virtual machine’s operating system has attempted to initialize its page file. You must place swap files for virtual machines on VHDs attached to the IDE chain."

    If that is true, who can tell me what I can do to exclude the Pagefile from replication, if possible at all?

    (Ah no, I don't want to run a gen1 machine :-)



    Monday, April 29, 2019 4:12 PM

All replies

  • Article dates are super important. The pagefile-on-VHDX problem only applies to Gen1 machines. Gen2 can read VHDX from startup so all is well. Even that problem did not prevent a VM from booting or resuming, it just didn't use the pagefiles on VHDX because it couldn't see them at boot.

    Replica is not in my wheelhouse so I'll let someone else tackle that problem. My only guess is that Windows usually misbehaves when you move the entire pagefile off of the boot volume, so you should probably keep a pagefile of at least a couple hundred MB on C:.


    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    Monday, April 29, 2019 4:49 PM
  • Hi,

    You can have the pagefile in different VHD. During replication of the VM you can exclude that VHD

    The option is available in "Enable replication for 'VMName'" wizard. "Choose replication VHDs" is the option that you may be looking for.

    In case of failover, the server would come back as rebooted because there is no pagefile available in the destination.

    Regards,
    Bala N

    Monday, April 29, 2019 5:12 PM
  • Hi Eric.

    I usually don't move the page file from c:, so my experience with non-systemdrive based Pagefiles is low, too.

    If you would like someone to reproduce it, here are the details:

    Hyper-V OS: Server 2019, up2date

    Guest OS: Server 2016 1607, up2date.

    (Gen2 VM)

    The guest machine starts and restores very quickly (cold start <5 seconds until I can use the logon screen).

    Monday, April 29, 2019 6:23 PM
  • Hi Balasubramanian.

    I already know that and have the page file on a different disk excluded from replication. Please re-read my problem description.

    Monday, April 29, 2019 6:25 PM
  • This is what I was thinking:

    IIRC there's a setting somewhere else that you have to configure if you want to have no pagefile on C:.


    Eric Siron
    Altaro Hyper-V Blog
    I am an independent contributor, not an Altaro employee. I accept all responsibility for the content of my posts. You accept all responsibility for any actions that you take based on the content of my posts.

    Monday, April 29, 2019 6:39 PM
  • The OS will complain if there's no pagefile at all and set a temporary one - maybe we can prevent that, but that's irrelevant. I just wondered what if you want to have a Pagefile, a large one even, but you want to exclude it from replication? Although you suppose that with newer versions it just works, be assured that it does not. I can reproduce that problem any time, the 3rd reboot latest, it will just freeze. It seems to be a race condition.

    Monday, April 29, 2019 6:46 PM
  • Hi,
    Based on the complexity and the specific situation, we need do more researches. If we have any updates or any thoughts about this issue, we will keep you posted as soon as possible. Your kind understanding is appreciated. If you have further information during this period, you could post it on the forum, which help us understand and analyze this issue comprehensively.
    Sorry for the inconvenience and thank you for your understanding and patience.
    Best Regards,

    Frank

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 6, 2019 9:42 AM
    Moderator
  • Hi Frank and Eric.

    I did some tests over the weekend and want to share new info:

    If I leave a small pagefile (200 MB) on c: and use an unreplicated separate VHDX for the main pagefile (system managed size), it works flawless. So it seems this will only be an issue for people who want to place their whole pagefile on an extra drive in order to have no pagefile replication at all.

    Monday, May 6, 2019 10:48 AM
  • Hi,

    Thanks for your update.

    Best Regards,
    Frank


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 7, 2019 6:49 AM
    Moderator