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


hsehestedt

Well-known member
Guru
VIP
Local time
3:40 AM
Posts
5,301
Location
Texas, USA
OS
Win11 Pro 26H2 (Release Preview)
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 My Computers

  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics
    OS
    Win11 Pro 26H2 (Release Preview)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic Matrix M5
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-1255U16 GBIntel Iris Xe Graphics
    Operating System
    Win11 Pro 26H2 (Release Preview)
    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
    4 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging Using an Anker 160W Charger
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    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 My Computer

At a glance

Windows 11 Pro + Win11 Canary VM.I9 13th gen i9-13900H 2.60 GHZ16 GB solderedIntegrated Intel Iris XE
OS
Windows 11 Pro + Win11 Canary VM.
Computer type
Laptop
Manufacturer/Model
ASUS Zenbook 14
CPU
I9 13th gen i9-13900H 2.60 GHZ
Motherboard
Yep, Laptop has one.
Memory
16 GB soldered
Graphics Card(s)
Integrated Intel Iris XE
Sound Card
Realtek built in
Monitor(s) Displays
laptop OLED screen
Screen Resolution
2880x1800 touchscreen
Hard Drives
1 TB NVME SSD (only weakness is only one slot)
PSU
Internal + 65W thunderbolt USB4 charger
Case
Yep, got one
Cooling
Stella Artois (UK pint cans - 568 ml) - extra cost.
Keyboard
Built in UK keybd
Mouse
Bluetooth , wireless dongled, wired
Internet Speed
900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
Browser
Edge
Antivirus
Defender
Other Info
TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

Macrium Reflect Home V8
Office 365 Family (6 users each 1TB onedrive space)
Hyper-V (a vm runs almost as fast as my older laptop)
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 My Computers

  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics
    OS
    Win11 Pro 26H2 (Release Preview)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic Matrix M5
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-1255U16 GBIntel Iris Xe Graphics
    Operating System
    Win11 Pro 26H2 (Release Preview)
    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
    4 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging Using an Anker 160W Charger
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    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 My Computer

At a glance

Windows 11 Pro + Win11 Canary VM.I9 13th gen i9-13900H 2.60 GHZ16 GB solderedIntegrated Intel Iris XE
OS
Windows 11 Pro + Win11 Canary VM.
Computer type
Laptop
Manufacturer/Model
ASUS Zenbook 14
CPU
I9 13th gen i9-13900H 2.60 GHZ
Motherboard
Yep, Laptop has one.
Memory
16 GB soldered
Graphics Card(s)
Integrated Intel Iris XE
Sound Card
Realtek built in
Monitor(s) Displays
laptop OLED screen
Screen Resolution
2880x1800 touchscreen
Hard Drives
1 TB NVME SSD (only weakness is only one slot)
PSU
Internal + 65W thunderbolt USB4 charger
Case
Yep, got one
Cooling
Stella Artois (UK pint cans - 568 ml) - extra cost.
Keyboard
Built in UK keybd
Mouse
Bluetooth , wireless dongled, wired
Internet Speed
900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
Browser
Edge
Antivirus
Defender
Other Info
TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

Macrium Reflect Home V8
Office 365 Family (6 users each 1TB onedrive space)
Hyper-V (a vm runs almost as fast as my older laptop)
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 My Computers

  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics
    OS
    Win11 Pro 26H2 (Release Preview)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic Matrix M5
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-1255U16 GBIntel Iris Xe Graphics
    Operating System
    Win11 Pro 26H2 (Release Preview)
    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
    4 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging Using an Anker 160W Charger
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    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 My Computers

  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics
    OS
    Win11 Pro 26H2 (Release Preview)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic Matrix M5
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-1255U16 GBIntel Iris Xe Graphics
    Operating System
    Win11 Pro 26H2 (Release Preview)
    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
    4 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging Using an Anker 160W Charger
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    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 My Computer

At a glance

Windows 11 Pro + Win11 Canary VM.I9 13th gen i9-13900H 2.60 GHZ16 GB solderedIntegrated Intel Iris XE
OS
Windows 11 Pro + Win11 Canary VM.
Computer type
Laptop
Manufacturer/Model
ASUS Zenbook 14
CPU
I9 13th gen i9-13900H 2.60 GHZ
Motherboard
Yep, Laptop has one.
Memory
16 GB soldered
Graphics Card(s)
Integrated Intel Iris XE
Sound Card
Realtek built in
Monitor(s) Displays
laptop OLED screen
Screen Resolution
2880x1800 touchscreen
Hard Drives
1 TB NVME SSD (only weakness is only one slot)
PSU
Internal + 65W thunderbolt USB4 charger
Case
Yep, got one
Cooling
Stella Artois (UK pint cans - 568 ml) - extra cost.
Keyboard
Built in UK keybd
Mouse
Bluetooth , wireless dongled, wired
Internet Speed
900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
Browser
Edge
Antivirus
Defender
Other Info
TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

Macrium Reflect Home V8
Office 365 Family (6 users each 1TB onedrive space)
Hyper-V (a vm runs almost as fast as my older laptop)
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 My Computers

  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-14650HX32 GBNo GPU - Built-in Intel Graphics
    OS
    Win11 Pro 26H2 (Release Preview)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic Matrix M5
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • At a glance

    Win11 Pro 26H2 (Release Preview)Intel i7-1255U16 GBIntel Iris Xe Graphics
    Operating System
    Win11 Pro 26H2 (Release Preview)
    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
    4 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging Using an Anker 160W Charger
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    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