Can someone tell me if there is a way to reset a vm's state to boot cleanly from its snapshot/vmdk, or to create a new vm to use an existing snapshot as hard disk?
The documentation does not indicate that I can use a snapshot as the disk for a new vm.
How to reset a vm
-
- Volunteer
- Posts: 5102
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: How to reset a vm
What exactly do you mean by reset?
You cannot use a snapshot as the virtual disk to create a new vm. A snapshot file is simply the changes since the last snapshot. You could create a new vm from the base virtual disk (without all the snapshot data). This would be equivalent to deleting all the snapshots.
To get the current state of the vm on a single virtual drive you would need to merge all of the snapshots into the base drive.
You cannot use a snapshot as the virtual disk to create a new vm. A snapshot file is simply the changes since the last snapshot. You could create a new vm from the base virtual disk (without all the snapshot data). This would be equivalent to deleting all the snapshots.
To get the current state of the vm on a single virtual drive you would need to merge all of the snapshots into the base drive.
Bill
-
- Site Moderator
- Posts: 39156
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: How to reset a vm
I have no idea what "boot cleanly from its snapshot/vmdk" means. The style of the virtual image container makes no difference to how "cleanly" a VM boots... though "cleanly" clearly needs a definition!
If you clone a VM you'll be given the option to clone the current state only, which creates a new VM consisting of a single merged disk (no snapshots). Perhaps that is what you are looking for, though I'm still puzzled why vmdk would be mentioned.
If you clone a VM you'll be given the option to clone the current state only, which creates a new VM consisting of a single merged disk (no snapshots). Perhaps that is what you are looking for, though I'm still puzzled why vmdk would be mentioned.
Re: How to reset a vm
OK. thanks for the replies. I have used the command line tools to copy the virtual disk with snapshots to a new combined vdi, then created a new vm from that.
-
- Site Moderator
- Posts: 39156
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: How to reset a vm
Are you aware that VirtualBox already provides a tool to do that, i.e. the tool I already described? Right click the VM and select "Clone...", if the VM uses snapshots then you'll be asked if you want to preserve the snapshot structure or keep the current state only. The latter means one merged disk.waltw wrote:OK. thanks for the replies. I have used the command line tools to copy the virtual disk with snapshots to a new combined vdi, then created a new vm from that.