Expanding the hard drive on your development VM (“onebox”)

Edit virtual hard drive in Hyper-V Manager

In some development shops, the development VMs will be cloud hosted and centrally managed. But I try to help out others who are managing their own development VMs; and if you’re restoring copies of a growing production database in order to debug a trick issue, you might find that the “as shipped” VM doesn’t have a big enough hard drive. Here are the steps to help you expand it.

  1. In Hyper-V Manager, stop the VM and delete any checkpoints. (Unfortunately, you can’t expand the drive for a VM with checkpoints.)
  2. In Hyper-V Manager, in the “Settings” for the VM, go to “Hard Drive” and find the “Edit” button under the virtual hard disk:
    Edit virtual hard drive in Hyper-V Manager
  3. Use the wizard to “Expand” to the desired size. (Unfortunately, it’s hard to know exactly how much space you’ll need. A database bacpac is significantly compressed, and you know better than me how much space you are likely to need.)
  4. Start & connect to the VM. You will not see the new space available yet.
  5. In the VM, run Disk Management. It is in Control Panel, or will come up if you type diskmgmt in the Start menu:
    diskmgmt
    Typing “diskmgmt” in the Start menu should bring up something that looks like this.

     

  6. In Disk Management, right-click the OsDisk (C:) partition and choose “Extend Volume.”
    Extend volume in Disk Management
  7. You should be able to just keep clicking “Next” through the wizard without changing any defaults; it will expand to fill the newly available space.
  8. That’s all, you’re done! When you are done restoring your bacpac and building it (or whatever else you wanted to expand the disk for), don’t forget that you’ve deleted all your checkpoints.

 

Although this isn’t a process specific to Dynamics 365, if you aren’t used to managing a VM, I hope it helps you get back to developing a little sooner.

Advertisements

2 thoughts on “Expanding the hard drive on your development VM (“onebox”)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s