Format and mount a non-boot disk on a Windows VM


If you attached a new, blank disk to your VM, before you can use it you must format 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, then set up authentication. Authentication is the process by which your identity is verified 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

    1. Install the Google Cloud CLI, then initialize it by running the following command:

      gcloud init
    2. 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, then initialize it by running the following command:

      gcloud init

    For more information, see Authenticate for using REST in the Google Cloud authentication documentation.

Connect to the VM

  1. Go to the VM instances page.

    Go to the VM instances page

  2. Click the RDP 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 the Windows Disk Management utility to format and mount the new disk on a Windows VM.

  1. Right-click the Windows Start button and select Disk Management.

    Selecting Disk Management by right-clicking the Windows Start button.

  2. Disk Management prompts you to select a partitioning scheme for the new disk. Select GPT and click OK.

    Selecting a partition scheme in the disk initialization window.

  3. After the disk initializes, right-click the unallocated disk space and select New Simple Volume.

    Creating a New Simple Volume from the attached disk.

  4. Follow the instructions in the New Simple Volume Wizard to configure the new volume. You can use any partition format that you like, but for this example select NTFS. Also, check Perform a quick format to speed up the formatting process. Optionally, set the cluster size in the Allocation unit size field. The cluster size limits the maximum size of the partition. Keep this in mind if you try to resize the zonal persistent disk and this partition later.

    Selecting the partition format type in the New Simple Volume Wizard.

  5. After you complete the wizard and the volume is formatted, check the Status column on the list of attached disks to ensure that the new disk has a Healthy status.

    Checking that the disk is online with a healthy status.

You can now write files to the disk.

What's next