Help rolling back a VM

nilsb

Dabbler
Joined
Dec 31, 2016
Messages
10
I did a system upgrade on a debian VM that broke a few things, and now I want to roll back the VM but I am not sure how. I have all the snapshots, I know that if I roll back a month or two, then I destroy all snapshots in between (would like to avoid that in case the rollback fails for some reason).

What is the best way to do this? Probably clone and then boot the VM from a clone to preserve the original, but how do I do that?

Code:
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ iohyve getall www-bhyve
Getting www-bhyve iohyve properties...
bargs            -A_-H_-P
boot             1
con              nmdm0
cpu              2
description      Sat Mar  4 16:29:47 CET 2017
fw               BHYVE_UEFI_CSM.fd
install          no
loader           grub-bhyve
name             www-bhyve
os               debian
persist          1
ram              4GB
size             16G
tap              tap0
template         NO
vnc              YES
vnc_h            600
vnc_ip           192.168.2.88
vnc_port         5900
vnc_tablet       YES
vnc_w            800
vnc_wait         NO
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ iohyve info
Guest                              Size  CPU  RAM  Pool
www-bhyve                          -     2    4GB  maindata
www-bhyve/disk0                    16G   -    -    maindata
www-bhyve/disk0_dpim64_gui_clone0  16G   -    -    maindata
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ iohyve list
Guest      VMM?  Running  rcboot?  Description
www-bhyve  YES   YES      YES      Sat Mar  4 16:29:47 CET 2017
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ zfs list | grep www-bhyve
maindata/iohyve/www-bhyve                                   168G  1.07T      128K  /mnt/maindata/iohyve/www-bhyve
maindata/iohyve/www-bhyve/disk0                             168G  1.08T     15.5G  -
maindata/iohyve/www-bhyve/disk0_dpim64_gui_clone0          81.4K  1.07T     7.68G  -
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ ls -al
total 2
drwxr-xr-x  2 root  wheel   3 Mar  4  2017 ./
drwxr-xr-x  5 root  wheel   5 Apr 12  2019 ../
-rw-r--r--  1 root  wheel  96 Apr  3 10:32 device.map
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ cd disk0
bash: cd: disk0: No such file or directory
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$ cd disk0_dpim64_gui_clone0
bash: cd: disk0_dpim64_gui_clone0: No such file or directory
[nils@freenas /mnt/maindata/iohyve/www-bhyve]$
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Shutdown the vm.

Clone a snapshot. Point the vm at the clone.

Reboot vm.

Repeat until you find the snapshot you want.

Rollback to that one. Removing clones and stuff.

Then repoint vm at original zvol
 
Top