Skip to content

Instantly share code, notes, and snippets.

@feczo
Last active August 29, 2015 14:02
Show Gist options
  • Save feczo/2f74c858459591cb5f7c to your computer and use it in GitHub Desktop.
Save feczo/2f74c858459591cb5f7c to your computer and use it in GitHub Desktop.
Create a large disk for Windows instances on Google Compute Engine - GCE
  1. Take a snapshot of your existing instance. Go to console.developers.google.com/project/[Project Number]/compute/snapshots and click "New snapshot" Name your snapshot (e.g. windows-snapshot) and select the disk of your Windows instance under "SOURCE DISK" Click "Create" to create the instance.
  2. Create a bigger disk and apply the snapshot e.g. gcutil --service_version="v1" --project="modelity-wp" adddisk "mybigwindows" --zone="us-central2-windows" --source_snapshot="windows-snapshot" --disk_type="pd-standard" --size_gb="1300"
  3. Create a new instance and attach the bigger disk e.g. gcutil --service_version="v1" --project="modelity-wp" addinstance "mybigwindows" --zone="us-central2-windows" --machine_type="n1-standard-1" --network="default" --external_ip_address="ephemeral" --disk="mybigwindows,deviceName=mybigwindows,mode=READ_WRITE,boot" After Windows is booted up, the disk size may still show the original disk size of the snapshot. In this case, you can extend the disk volume to its maximum size by following these steps:
  • Remote Desktop into your Windows
  • Open Start menu
  • Right click "Compute" and select "Manage"
  • Select "Storage" followed by "Disk Management"
  • Click the first partition of your disk
  • Click "Action" > "All Tasks" > "Extend Volume" and follow the instructions to extend the partition to utilize the entire disk After this is done, please try testing again and see if performance improves. You should be able to notice better performance with larger disk volumes. If you have further questions, please feel free to let us know.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment