Oftentimes I need to recreate a VM while starting with a blank virtual disk. Currently I either have to remove an old virtual disk and create a new one, or boot any live Linux CD and run dd if=/dev/zero of=/dev/sda which takes quite a lot of time.
Please consider this feature for the Virtual Media Manager.
Thank you.
Wiping a virtual disk
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Wiping a virtual disk
Hmm. This might be a rare occasion where a snapshot is actually useful. Snapshot the blank disk and revert to it whenever you want a blank disk again.
Personally I wouldn't do that. I'd just make a backup copy of the blank VDI and restore from that to wipe the disk.
Personally I wouldn't do that. I'd just make a backup copy of the blank VDI and restore from that to wipe the disk.
-
- Posts: 429
- Joined: 2. May 2010, 14:19
- Primary OS: Fedora other
- VBox Version: PUEL
- Guest OSses: Windows, Linux, other Unixes
- Location: Artem S. Tashkinov
- Contact:
Re: Wiping a virtual disk
Snapshots often break in various ways which is why I wouldn't want to use them for this particular use case.mpack wrote:Hmm. This might be a rare occasion where a snapshot is actually useful. Snapshot the blank disk and revert to it whenever you want a blank disk again.
Personally I wouldn't do that. I'd just make a backup copy of the blank VDI and restore from that to wipe the disk.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Wiping a virtual disk
Nobody would ever accuse me of being a snapshot fan (*). That is why my second paragraph offered an alternative.birdie wrote:Snapshots often break in various ways which is why I wouldn't want to use them for this particular use case.
(*) I wrote CloneVDI in order to avoid snapshots. At that time there was no mention of cloning in the VirtualBox UI.
-
- Posts: 429
- Joined: 2. May 2010, 14:19
- Primary OS: Fedora other
- VBox Version: PUEL
- Guest OSses: Windows, Linux, other Unixes
- Location: Artem S. Tashkinov
- Contact:
Re: Wiping a virtual disk
I still want to get this featurempack wrote:Nobody would ever accuse me of being a snapshot fan (*). That is why my second paragraph offered an alternative.birdie wrote:Snapshots often break in various ways which is why I wouldn't want to use them for this particular use case.
(*) I wrote CloneVDI in order to avoid snapshots. At that time there was no mention of cloning in the VirtualBox UI.
It must be relatively easy to implement: a single button and a minimum amount of code.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Wiping a virtual disk
One thing that the developers have said before (and I used to have a link to it but I lost the link file) is that the devs only have time (and not enough of it) to work on Oracle's paying customers' bugs & enhancements. Becoming an Oracle paying customer starts at either $1220 or $6100 US, depending on what a 'socket' is. Too rich for my wallet.
That said, the only way we freeloaders could get an enhancement is to have it coincide with what the paying customers want, have the devs fall so over the top in love with it that they can plant the idea in the minds of the paying customers to love it too so the devs can work on it, or code it ourselves. User code is considered for insertion.
That said, the only way we freeloaders could get an enhancement is to have it coincide with what the paying customers want, have the devs fall so over the top in love with it that they can plant the idea in the minds of the paying customers to love it too so the devs can work on it, or code it ourselves. User code is considered for insertion.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Wiping a virtual disk
I must be missing something from your description, because to me it seems to be quite simple to do with the current Virtual Media Manager implementation. Consider the following workflow:birdie wrote:Oftentimes I need to recreate a VM while starting with a blank virtual disk. Currently I either have to remove an old virtual disk and create a new one, or boot any live Linux CD and run dd if=/dev/zero of=/dev/sda which takes quite a lot of time.
In the Virtual Media Manager, you create a dynamically allocated virtual disk as a copy template. This virtual disk will only use 2 MB of real disk space, and contain x GB of virtual sectors filled with zeros (in contrast to your dd result, if you don't compact that afterwards). Whenever you need a new blank virtual disk, you clone the copy template, and replace the old virtual disk file in the VM's configuration with it. What am I missing?
-
- Posts: 429
- Joined: 2. May 2010, 14:19
- Primary OS: Fedora other
- VBox Version: PUEL
- Guest OSses: Windows, Linux, other Unixes
- Location: Artem S. Tashkinov
- Contact:
Re: Wiping a virtual disk
Gotcha. In this case I kinda don't understand the rationale of the subforum existence Suggestions are welcome only to allow people to ... blow off steam?scottgus1 wrote:One thing that the developers have said before (and I used to have a link to it but I lost the link file) is that the devs only have time (and not enough of it) to work on Oracle's paying customers' bugs & enhancements. Becoming an Oracle paying customer starts at either $1220 or $6100 US, depending on what a 'socket' is. Too rich for my wallet.
That said, the only way we freeloaders could get an enhancement is to have it coincide with what the paying customers want, have the devs fall so over the top in love with it that they can plant the idea in the minds of the paying customers to love it too so the devs can work on it, or code it ourselves. User code is considered for insertion.
That's a lot of steps (also error prone) vs a single button or a a single item in the right click mouse menu.fth0 wrote:I must be missing something from your description, because to me it seems to be quite simple to do with the current Virtual Media Manager implementation. Consider the following workflow:
In the Virtual Media Manager, you create a dynamically allocated virtual disk as a copy template. This virtual disk will only use 2 MB of real disk space, and contain x GB of virtual sectors filled with zeros (in contrast to your dd result, if you don't compact that afterwards). Whenever you need a new blank virtual disk, you clone the copy template, and replace the old virtual disk file in the VM's configuration with it. What am I missing?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Wiping a virtual disk
Partially. It's also for discussing an idea or for finding out that there's an easy workaround. Or for finding out it won't go anywhere...birdie wrote:blow off steam?
I can see how a quick 'reset disk' button could come in handy if one is doing a lot of reinstalling a guest OS that likes to do auto-partitioning.
I can also (fore)see a slew of forum posts:
A possible workaround until a source code guru makes the button is to make a manual copy of the disk file (with the guest shut down) in the guest's folder. It would have the same UUID as the original disk but a different file name. If the first disk is deleted, the copy can be copied again then renamed to the original name, then the guest disk will be reset.Clueless User wrote:I hit the reset disk button and hit Reset and Erase All Data in the warning boxes and now my guest with the only copy of my extremely important files won't boot!
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Wiping a virtual disk
Which was precisely my suggestion in paragraph 2 of my first reply.scottgus1 wrote: A possible workaround until a source code guru makes the button is to make a manual copy of the disk file (with the guest shut down) in the guest's folder. It would have the same UUID as the original disk but a different file name. If the first disk is deleted, the copy can be copied again then renamed to the original name, then the guest disk will be reset.
Seriously, this is much more powerful than the suggested button. Instead of a special case "nuke em all" button, the copy can preserve any state that's useful to the user, or multiple states. It's what disk cloning was made for.