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.
- In Hyper-V Manager, stop the VM and delete any checkpoints. (Unfortunately, you can’t expand the drive for a VM with checkpoints.)
- In Hyper-V Manager, in the “Settings” for the VM, go to “Hard Drive” and find the “Edit” button under the virtual hard disk:
- 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.)
- Start & connect to the VM. You will not see the new space available yet.
- In the VM, run Disk Management. It is in Control Panel, or will come up if you type diskmgmt in the Start menu:
- In Disk Management, right-click the OsDisk (C:) partition and choose “Extend Volume.”
- 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.
- 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.