Format and mount a non-boot disk on a Windows VM Stay organized with collections Save and categorize content based on your preferences.
If you attached a new, blank disk to your VM, before you can use it you mustformat and mount the disk. If you attached a disk that already contains data,then you must mount the disk before you can use it.
Before you begin
- If you haven't already, set upauthentication. Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.For more information, seeAuthenticate for using REST in the Google Cloud authentication documentation.
Connect to the VM
Go to theVM instances page.
Click theRDP button next to the VM that has the new blank disk attached.The browser opens an RDP connection to the instance.
Format and mount a non-boot disk on a Windows VM
Use theWindows Disk Management utility to format and mount the new disk on a Windows VM.
Right-click the Windows Start button and selectDisk Management.

Disk Management prompts you to select a partitioning scheme for the new disk.SelectGPT and clickOK.

After the disk initializes, right-click the unallocated disk spaceand selectNew Simple Volume.

Follow the instructions in theNew Simple Volume Wizard to configurethe new volume. You can use any partition format that you like, but forthis example select
NTFS. Also, checkPerform a quick formatto speed up the formatting process. Optionally, set the cluster sizein theAllocation unit size field. The cluster sizelimits the maximum size of the partition.Keep this in mind if you try to resize the zonal persistent disk and thispartition later.
After you complete the wizard and the volume is formatted, checkthe
Statuscolumn on the list of attached disks to ensure that thenew disk has aHealthystatus.
You can now write files to the disk.
What's next
- Learn how toresize your persistent disks.
- Learn how to regularlyback up your disks using snapshotsto prevent unintended data loss.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.