Score:2

VirtualBox: No bootable medium found after trying to encrypt dynamic disk

mx flag

I tried to encrypt the dynamic disk (vdi) with VirtualBox's disk encryption, and I didn't realize that it'd fill up the entire space on the host. The encryption resulted in an error because the host ran out of disk space. To shrink it back to normal, I wanted to go into the guest and write zeros then use VBoxManage, but I can't even boot up the guest now because of "No bootable medium". Does this mean the vdi is permanently damaged?

in flag
A fully encrypted drive cannot be shrunk because, even if the image has zero data, the encryption mechanism operates on a *per volume* basis rather than *per file*. If you would like the virtual disk to be encrypted, it will always be its full size regardless of whether you’re using dynamic or fixed
Score:1
sa flag

The vdi is either permanently damaged or it's too unreliable to be used anymore, so your best option is to delete the existing vdi, start over create a new vdi.

cocomac avatar
cn flag
OP: Also, **remember to take regular backups** of anything important, even if you are using a VM. If you had a backup that you could've restored to, that would have saved you here.
Mysterious Shadow avatar
mx flag
So all those data are lost just like that? If encryption doesn't work on dynamic disks then why is it an option in the first place and why are there no warnings whatsoever? Granted I should've taken backups and done this and that but why does virtualbox expect every user, new or experienced, to do this and be aware of this trap?
karel avatar
sa flag
All my VMs are KVM/QEMU (*qemu-kvm*) virtual machines created in Virtual Machine Manager (*virt-manager*), because I found QEMU virtualization to be more reliable on Ubuntu than VirtualBox. Unfortunately the documentation for QEMU virtualization is incomplete, but it seems to work better than VirtualBox on my system.
cocomac avatar
cn flag
@MysteriousShadow Linux assumes (almost always) that you know what you are doing, and it does it's best to stay out of your way. That is why you [can recursively `chmod` on the root folder of your system](https://askubuntu.com/q/43621/) (although don't do that!). The assumption is if you don't know exactly what something will do, either have a safe backup, or be OK with losing it. There are very few exceptions to this rule. One of the few things is the `rm` command, it won't let you `rm` the root folder (but if you really want, there is the `--no-preserve-root` option to bypass that).
cocomac avatar
cn flag
Continued... that said, VirtualBox could (and probobly should) make a check to make sure you have sufficient space, if you are going to use full disk encryption. You could suggest it on [the VirtualBox mailing list](https://www.virtualbox.org/wiki/Mailing_lists) or [the forum](https://forums.virtualbox.org/).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.