Solved Unable to create a pagefile when installing Win 11 to boot from a VHDX


hsehestedt

Well-known member
Pro User
VIP
Local time
6:06 AM
Posts
2,569
Location
Texas, USA
OS
Win11 Pro 23H2
I have the following configuration:

Laptop with a single SSD, BitLocker encrypted.

I want to install a second copy of Windows for testing, natively booting from a VHDX. Because C: is BitLocker encrypted, I cannot install Windows to a VHDX on this drive, so I attach an external NVMe in a USB enclosure.

Here is the tricky part: This second instance of Windows also needs to be BitLocker encrypted. To accomplish this I follow these steps:

I enable BitLocker on the external NVMe, create a VHDX and deploy Windows to it.

Now, when I boot, if I select the 2nd instance of Windows I supply the BitLocker password for that volume and Windows boots.

Here is the one tiny glitch that I have: When I logon to that second instance of Windows I always get a "Performance Options" dialog that is a result of Windows not being able to create a pagefile anywhere.

So all of this is leading to this question: How can I create a pagefile for this second instance of Windows in this scenario?
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I have the following configuration:

Laptop with a single SSD, BitLocker encrypted.

I want to install a second copy of Windows for testing, natively booting from a VHDX. Because C: is BitLocker encrypted, I cannot install Windows to a VHDX on this drive, so I attach an external NVMe in a USB enclosure.

Here is the tricky part: This second instance of Windows also needs to be BitLocker encrypted. To accomplish this I follow these steps:

I enable BitLocker on the external NVMe, create a VHDX and deploy Windows to it.

Now, when I boot, if I select the 2nd instance of Windows I supply the BitLocker password for that volume and Windows boots.

Here is the one tiny glitch that I have: When I logon to that second instance of Windows I always get a "Performance Options" dialog that is a result of Windows not being able to create a pagefile anywhere.

So all of this is leading to this question: How can I create a pagefile for this second instance of Windows in this scenario?
The problem is you cannot create a page file inside a vhdx file when it is native booting, and it has nowhere to create one as host drive is bitlocked.

You could try setting the pagefile to reside on external nvme using its drive letter (not vhdx drive letter) but I am not sure that would work. It might as nmve counts as a fixed hard drive, not a removable hard drive.

If not, you would probably have to create a unbitlocked partition on host drive to contain pagefile.

You could try this:

1) boot to Host OS, remove bitlocker, shrink C drive by say 10 GB, create a new partition e.g. F:

2) Rebitlock C drive but not F drive.

3) The boot from native vhdx file and set a Pagefile on F drive (note drive letter may be different for new pagefile partition when booting fron vdhx).

4) Reboot into vhdx file, and you should now have a pagefile on drive F.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
cereberus, I guess great minds think alike. And so do we :)

Windows is installing right now, and I'm basically doing exactly what you suggested. I reformatted the external NVMe, creating one large partition and a smaller partition that I am not encrypting for the purpose of creating a pagefile.

However, I have to wonder what security hole I am opening by having the pagefile on a partition that is not encrypted.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
cereberus, I guess great minds think alike. And so do we :)

Windows is installing right now, and I'm basically doing exactly what you suggested. I reformatted the external NVMe, creating one large partition and a smaller partition that I am not encrypting for the purpose of creating a pagefile.

However, I have to wonder what security hole I am opening by having the pagefile on a partition that is not encrypted.
You are correct - there is theoretically a security risk, so if somebody got hold of pc, in theory, they can recover data from it. However, you can set Windows to delete the pagefile on shutdown.


I do not know if you could bitlock the pagefile partition after creating it - if it did work, I think you would have to enter a password for that drive as well.

I would be interested to know if creating pagefile on nvme works - I am pretty certain it will work on internal drive as I do it like that for different reasons.

As an aside, couldn't you just bitlock the vhdx C drive and leave nvme host partition unbitlocked, then you would not need a second partition on nvme. Also, I think you would not need a password, as the vhdx password would be held in your TPM.
 
Last edited:

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
As an aside, couldn't you just bitlock the vhdx C drive and leave nvme host partition unbitlocked, then you would not need a second partition on nvme. Also, I think you would not need a password, as the vhdx password would be held in your TPM.
Okay, I've completed my initial testing....

First, no, When I installed to a VHDX on the NVMe, it wouldn't allow me to use the TPM to BitLock the Windows drive on the external NVMe. Device Manager sees the TPM, but it specifically forbids using it.

However, it did allow me to place the pagefile on a second partition on my external NVMe. I setup the registry entry that deletes the pagefile upon shutting down Windows. Actually, it's more accurate to say that it overwrites the pagefile because you will still find the pagefile there after shutting down Windows.

For my purposes, this is more than good enough, but it might be worth noting for those who are especially paranoid, that while Windows is running data in that pagefile could be potentially accessed, so it's not a good idea to leave that instance of Windows running where someone might have physical access while it is running.

Next Steps

I have no real practical need for this, this is merely an exercise in "can this be done", but I want to try this on a thumb drive. I already know that I can install Windows and boot it from a thumb drive. The only part that I have not tried is to see if I can put the pagefile on a second partition on the thumb drive. I HIGHLY doubt that this would work, but it's just one of those experiments that I feel like I need to try. Don't know if I will still pursue this today, but I'll post my results here once I have tried it
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Wow, unexpected results - in a good way.

I was able to install Windows to a BitLocker encrypted partition on a thumb drive AND place the pagefile on another unencrypted partition on that same thumb drive.

Would I want to run like that on a regular basis? Heck no, but it is interesting to know that it can be done.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Wow, unexpected results - in a good way.

I was able to install Windows to a BitLocker encrypted partition on a thumb drive AND place the pagefile on another unencrypted partition on that same thumb drive.

Would I want to run like that on a regular basis? Heck no, but it is interesting to know that it can be done.
That is a surprise but I doubt it is a great idea as usb flash drives are not reliable and thrashing it with pagefiles (or hibernation files?) will probably lead to early drive failure?
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
That is a surprise but I doubt it is a great idea as usb flash drives are not reliable and thrashing it with pagefiles (or hibernation files?) will probably lead to early drive failure?
Agreed. As noted, this was more an exercise to see if it was possible. It's just one of those things where one day I may say "Here, hold my beer...".
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor

Latest Support Threads

Back
Top Bottom