[pve-devel] [PATCH qemu-server] Add regression tests for snapshotting

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Mar 4 10:09:45 CET 2016


these are modelled after the existing snapshot tests for LXC
and should serve as a baseline for refactoring the Qemu
snapshot code using PVE::AbstractConfig
---
Note: running the tests is not integrated with the main Makefile

 test/Makefile                                      |   6 +
 test/run_snapshot_tests.pl                         |  10 +
 test/snapshot-expected/commit/qemu-server/101.conf |  31 ++
 test/snapshot-expected/commit/qemu-server/102.conf |  48 ++
 test/snapshot-expected/commit/qemu-server/201.conf |  49 ++
 test/snapshot-expected/commit/qemu-server/202.conf |  50 ++
 test/snapshot-expected/commit/qemu-server/203.conf |  50 ++
 test/snapshot-expected/create/qemu-server/101.conf |  29 ++
 test/snapshot-expected/create/qemu-server/102.conf |  33 ++
 test/snapshot-expected/create/qemu-server/103.conf |  46 ++
 test/snapshot-expected/create/qemu-server/104.conf |  53 ++
 test/snapshot-expected/create/qemu-server/105.conf |  33 ++
 test/snapshot-expected/create/qemu-server/106.conf |  33 ++
 test/snapshot-expected/create/qemu-server/201.conf |  12 +
 test/snapshot-expected/create/qemu-server/202.conf |  14 +
 test/snapshot-expected/create/qemu-server/203.conf |  12 +
 test/snapshot-expected/delete/qemu-server/101.conf |  13 +
 test/snapshot-expected/delete/qemu-server/102.conf |  29 ++
 test/snapshot-expected/delete/qemu-server/103.conf |  29 ++
 test/snapshot-expected/delete/qemu-server/104.conf |  46 ++
 test/snapshot-expected/delete/qemu-server/105.conf |  29 ++
 test/snapshot-expected/delete/qemu-server/106.conf |  14 +
 test/snapshot-expected/delete/qemu-server/201.conf |  47 ++
 test/snapshot-expected/delete/qemu-server/202.conf |  33 ++
 test/snapshot-expected/delete/qemu-server/203.conf |  34 ++
 .../snapshot-expected/prepare/qemu-server/101.conf |  30 ++
 .../snapshot-expected/prepare/qemu-server/102.conf |  32 ++
 .../snapshot-expected/prepare/qemu-server/103.conf |  48 ++
 .../snapshot-expected/prepare/qemu-server/104.conf |  50 ++
 .../snapshot-expected/prepare/qemu-server/200.conf |  13 +
 .../snapshot-expected/prepare/qemu-server/201.conf |  29 ++
 .../snapshot-expected/prepare/qemu-server/202.conf |  12 +
 .../snapshot-expected/prepare/qemu-server/300.conf |  12 +
 .../rollback/qemu-server/101.conf                  |  34 ++
 .../rollback/qemu-server/102.conf                  |  47 ++
 .../rollback/qemu-server/103.conf                  |  47 ++
 .../rollback/qemu-server/104.conf                  |  64 +++
 .../rollback/qemu-server/105.conf                  |  33 ++
 .../rollback/qemu-server/106.conf                  |  34 ++
 .../rollback/qemu-server/201.conf                  |  33 ++
 .../rollback/qemu-server/202.conf                  |  33 ++
 .../rollback/qemu-server/203.conf                  |  34 ++
 .../rollback/qemu-server/204.conf                  |  34 ++
 .../rollback/qemu-server/205.conf                  |  33 ++
 .../rollback/qemu-server/206.conf                  |  33 ++
 .../rollback/qemu-server/207.conf                  |  34 ++
 test/snapshot-input/commit/qemu-server/101.conf    |  32 ++
 test/snapshot-input/commit/qemu-server/102.conf    |  50 ++
 test/snapshot-input/commit/qemu-server/201.conf    |  49 ++
 test/snapshot-input/commit/qemu-server/202.conf    |  50 ++
 test/snapshot-input/commit/qemu-server/203.conf    |  50 ++
 test/snapshot-input/create/qemu-server/101.conf    |  12 +
 test/snapshot-input/create/qemu-server/102.conf    |  13 +
 test/snapshot-input/create/qemu-server/103.conf    |  29 ++
 test/snapshot-input/create/qemu-server/104.conf    |  33 ++
 test/snapshot-input/create/qemu-server/105.conf    |  14 +
 test/snapshot-input/create/qemu-server/106.conf    |  13 +
 test/snapshot-input/create/qemu-server/201.conf    |  12 +
 test/snapshot-input/create/qemu-server/202.conf    |  14 +
 test/snapshot-input/create/qemu-server/203.conf    |  12 +
 test/snapshot-input/delete/qemu-server/101.conf    |  33 ++
 test/snapshot-input/delete/qemu-server/102.conf    |  46 ++
 test/snapshot-input/delete/qemu-server/103.conf    |  46 ++
 test/snapshot-input/delete/qemu-server/104.conf    |  63 +++
 test/snapshot-input/delete/qemu-server/105.conf    |  46 ++
 test/snapshot-input/delete/qemu-server/106.conf    |  33 ++
 test/snapshot-input/delete/qemu-server/201.conf    |  46 ++
 test/snapshot-input/delete/qemu-server/202.conf    |  33 ++
 test/snapshot-input/delete/qemu-server/203.conf    |  34 ++
 test/snapshot-input/prepare/qemu-server/101.conf   |  12 +
 test/snapshot-input/prepare/qemu-server/102.conf   |  12 +
 test/snapshot-input/prepare/qemu-server/103.conf   |  29 ++
 test/snapshot-input/prepare/qemu-server/104.conf   |  29 ++
 test/snapshot-input/prepare/qemu-server/200.conf   |  13 +
 test/snapshot-input/prepare/qemu-server/201.conf   |  29 ++
 test/snapshot-input/prepare/qemu-server/202.conf   |  12 +
 test/snapshot-input/prepare/qemu-server/300.conf   |  12 +
 test/snapshot-input/rollback/qemu-server/101.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/102.conf  |  48 ++
 test/snapshot-input/rollback/qemu-server/103.conf  |  48 ++
 test/snapshot-input/rollback/qemu-server/104.conf  |  65 +++
 test/snapshot-input/rollback/qemu-server/105.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/106.conf  |  34 ++
 test/snapshot-input/rollback/qemu-server/201.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/202.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/203.conf  |  34 ++
 test/snapshot-input/rollback/qemu-server/204.conf  |  34 ++
 test/snapshot-input/rollback/qemu-server/205.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/206.conf  |  33 ++
 test/snapshot-input/rollback/qemu-server/207.conf  |  33 ++
 test/snapshot-test.pm                              | 576 +++++++++++++++++++++
 91 files changed, 3483 insertions(+)
 create mode 100644 test/Makefile
 create mode 100755 test/run_snapshot_tests.pl
 create mode 100644 test/snapshot-expected/commit/qemu-server/101.conf
 create mode 100644 test/snapshot-expected/commit/qemu-server/102.conf
 create mode 100644 test/snapshot-expected/commit/qemu-server/201.conf
 create mode 100644 test/snapshot-expected/commit/qemu-server/202.conf
 create mode 100644 test/snapshot-expected/commit/qemu-server/203.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/101.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/102.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/103.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/104.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/105.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/106.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/201.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/202.conf
 create mode 100644 test/snapshot-expected/create/qemu-server/203.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/101.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/102.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/103.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/104.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/105.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/106.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/201.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/202.conf
 create mode 100644 test/snapshot-expected/delete/qemu-server/203.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/101.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/102.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/103.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/104.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/200.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/201.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/202.conf
 create mode 100644 test/snapshot-expected/prepare/qemu-server/300.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/101.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/102.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/103.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/104.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/105.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/106.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/201.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/202.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/203.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/204.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/205.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/206.conf
 create mode 100644 test/snapshot-expected/rollback/qemu-server/207.conf
 create mode 100644 test/snapshot-input/commit/qemu-server/101.conf
 create mode 100644 test/snapshot-input/commit/qemu-server/102.conf
 create mode 100644 test/snapshot-input/commit/qemu-server/201.conf
 create mode 100644 test/snapshot-input/commit/qemu-server/202.conf
 create mode 100644 test/snapshot-input/commit/qemu-server/203.conf
 create mode 100644 test/snapshot-input/create/qemu-server/101.conf
 create mode 100644 test/snapshot-input/create/qemu-server/102.conf
 create mode 100644 test/snapshot-input/create/qemu-server/103.conf
 create mode 100644 test/snapshot-input/create/qemu-server/104.conf
 create mode 100644 test/snapshot-input/create/qemu-server/105.conf
 create mode 100644 test/snapshot-input/create/qemu-server/106.conf
 create mode 100644 test/snapshot-input/create/qemu-server/201.conf
 create mode 100644 test/snapshot-input/create/qemu-server/202.conf
 create mode 100644 test/snapshot-input/create/qemu-server/203.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/101.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/102.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/103.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/104.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/105.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/106.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/201.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/202.conf
 create mode 100644 test/snapshot-input/delete/qemu-server/203.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/101.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/102.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/103.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/104.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/200.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/201.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/202.conf
 create mode 100644 test/snapshot-input/prepare/qemu-server/300.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/101.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/102.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/103.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/104.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/105.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/106.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/201.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/202.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/203.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/204.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/205.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/206.conf
 create mode 100644 test/snapshot-input/rollback/qemu-server/207.conf
 create mode 100644 test/snapshot-test.pm

diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..b44d1d7
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,6 @@
+all: test
+
+test: test_snapshot
+
+test_snapshot: run_snapshot_tests.pl
+	./run_snapshot_tests.pl
diff --git a/test/run_snapshot_tests.pl b/test/run_snapshot_tests.pl
new file mode 100755
index 0000000..6def87f
--- /dev/null
+++ b/test/run_snapshot_tests.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use TAP::Harness;
+
+my $harness = TAP::Harness->new( { "verbosity" => -2 });
+$harness->runtests( "snapshot-test.pm");
+system( "rm -rf snapshot-working/");
diff --git a/test/snapshot-expected/commit/qemu-server/101.conf b/test/snapshot-expected/commit/qemu-server/101.conf
new file mode 100644
index 0000000..060676e
--- /dev/null
+++ b/test/snapshot-expected/commit/qemu-server/101.conf
@@ -0,0 +1,31 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/commit/qemu-server/102.conf b/test/snapshot-expected/commit/qemu-server/102.conf
new file mode 100644
index 0000000..13f33a3
--- /dev/null
+++ b/test/snapshot-expected/commit/qemu-server/102.conf
@@ -0,0 +1,48 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/commit/qemu-server/201.conf b/test/snapshot-expected/commit/qemu-server/201.conf
new file mode 100644
index 0000000..63a6d77
--- /dev/null
+++ b/test/snapshot-expected/commit/qemu-server/201.conf
@@ -0,0 +1,49 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/commit/qemu-server/202.conf b/test/snapshot-expected/commit/qemu-server/202.conf
new file mode 100644
index 0000000..4c6b84d
--- /dev/null
+++ b/test/snapshot-expected/commit/qemu-server/202.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: abcdefg
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[abcdefg]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[abcdefg2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: abcdefg
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/commit/qemu-server/203.conf b/test/snapshot-expected/commit/qemu-server/203.conf
new file mode 100644
index 0000000..5acf20d
--- /dev/null
+++ b/test/snapshot-expected/commit/qemu-server/203.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/create/qemu-server/101.conf b/test/snapshot-expected/create/qemu-server/101.conf
new file mode 100644
index 0000000..9a32002
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/101.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/create/qemu-server/102.conf b/test/snapshot-expected/create/qemu-server/102.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/102.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/create/qemu-server/103.conf b/test/snapshot-expected/create/qemu-server/103.conf
new file mode 100644
index 0000000..198e15e
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/103.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/create/qemu-server/104.conf b/test/snapshot-expected/create/qemu-server/104.conf
new file mode 100644
index 0000000..ef7285e
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/104.conf
@@ -0,0 +1,53 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
+
+[test2]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/create/qemu-server/105.conf b/test/snapshot-expected/create/qemu-server/105.conf
new file mode 100644
index 0000000..b692b3e
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/105.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-expected/create/qemu-server/106.conf b/test/snapshot-expected/create/qemu-server/106.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/106.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/create/qemu-server/201.conf b/test/snapshot-expected/create/qemu-server/201.conf
new file mode 100644
index 0000000..19a0b85
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/201.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/create/qemu-server/202.conf b/test/snapshot-expected/create/qemu-server/202.conf
new file mode 100644
index 0000000..48e3dc9
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/202.conf
@@ -0,0 +1,14 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-2,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-1,discard=on,size=32G
diff --git a/test/snapshot-expected/create/qemu-server/203.conf b/test/snapshot-expected/create/qemu-server/203.conf
new file mode 100644
index 0000000..e89cf9a
--- /dev/null
+++ b/test/snapshot-expected/create/qemu-server/203.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/101.conf b/test/snapshot-expected/delete/qemu-server/101.conf
new file mode 100644
index 0000000..0fe1359
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/101.conf
@@ -0,0 +1,13 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/102.conf b/test/snapshot-expected/delete/qemu-server/102.conf
new file mode 100644
index 0000000..9a32002
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/102.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/103.conf b/test/snapshot-expected/delete/qemu-server/103.conf
new file mode 100644
index 0000000..1ad65c3
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/103.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/104.conf b/test/snapshot-expected/delete/qemu-server/104.conf
new file mode 100644
index 0000000..fc71003
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/104.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test3
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test3]
+#another test comment
+bootdisk: ide0
+cores: 2
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/105.conf b/test/snapshot-expected/delete/qemu-server/105.conf
new file mode 100644
index 0000000..11590f1
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/105.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/106.conf b/test/snapshot-expected/delete/qemu-server/106.conf
new file mode 100644
index 0000000..e384152
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/106.conf
@@ -0,0 +1,14 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-expected/delete/qemu-server/201.conf b/test/snapshot-expected/delete/qemu-server/201.conf
new file mode 100644
index 0000000..5ef6e7e
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/201.conf
@@ -0,0 +1,47 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/delete/qemu-server/202.conf b/test/snapshot-expected/delete/qemu-server/202.conf
new file mode 100644
index 0000000..810c4f4
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/202.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-expected/delete/qemu-server/203.conf b/test/snapshot-expected/delete/qemu-server/203.conf
new file mode 100644
index 0000000..c406640
--- /dev/null
+++ b/test/snapshot-expected/delete/qemu-server/203.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+lock: backup
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/prepare/qemu-server/101.conf b/test/snapshot-expected/prepare/qemu-server/101.conf
new file mode 100644
index 0000000..012880b
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/101.conf
@@ -0,0 +1,30 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/prepare/qemu-server/102.conf b/test/snapshot-expected/prepare/qemu-server/102.conf
new file mode 100644
index 0000000..4ab1787
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/102.conf
@@ -0,0 +1,32 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/prepare/qemu-server/103.conf b/test/snapshot-expected/prepare/qemu-server/103.conf
new file mode 100644
index 0000000..d78f10f
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/103.conf
@@ -0,0 +1,48 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/prepare/qemu-server/104.conf b/test/snapshot-expected/prepare/qemu-server/104.conf
new file mode 100644
index 0000000..b62f2c6
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/104.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/prepare/qemu-server/200.conf b/test/snapshot-expected/prepare/qemu-server/200.conf
new file mode 100644
index 0000000..ee3a116
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/200.conf
@@ -0,0 +1,13 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/prepare/qemu-server/201.conf b/test/snapshot-expected/prepare/qemu-server/201.conf
new file mode 100644
index 0000000..862389b
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/201.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/prepare/qemu-server/202.conf b/test/snapshot-expected/prepare/qemu-server/202.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/202.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/prepare/qemu-server/300.conf b/test/snapshot-expected/prepare/qemu-server/300.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-expected/prepare/qemu-server/300.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/rollback/qemu-server/101.conf b/test/snapshot-expected/rollback/qemu-server/101.conf
new file mode 100644
index 0000000..91de880
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/101.conf
@@ -0,0 +1,34 @@
+# this is a description
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/102.conf b/test/snapshot-expected/rollback/qemu-server/102.conf
new file mode 100644
index 0000000..b49d965
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/102.conf
@@ -0,0 +1,47 @@
+# this is a description
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/rollback/qemu-server/103.conf b/test/snapshot-expected/rollback/qemu-server/103.conf
new file mode 100644
index 0000000..6d9cb42
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/103.conf
@@ -0,0 +1,47 @@
+# this is a description
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/rollback/qemu-server/104.conf b/test/snapshot-expected/rollback/qemu-server/104.conf
new file mode 100644
index 0000000..de0e278
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/104.conf
@@ -0,0 +1,64 @@
+# this is a description
+bootdisk: ide0
+cores: 3
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 3
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test3]
+#another test comment
+bootdisk: ide0
+cores: 2
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-expected/rollback/qemu-server/105.conf b/test/snapshot-expected/rollback/qemu-server/105.conf
new file mode 100644
index 0000000..b692b3e
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/105.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-expected/rollback/qemu-server/106.conf b/test/snapshot-expected/rollback/qemu-server/106.conf
new file mode 100644
index 0000000..aa5fa9e
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/106.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/201.conf b/test/snapshot-expected/rollback/qemu-server/201.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/201.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/202.conf b/test/snapshot-expected/rollback/qemu-server/202.conf
new file mode 100644
index 0000000..691f5a2
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/202.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/203.conf b/test/snapshot-expected/rollback/qemu-server/203.conf
new file mode 100644
index 0000000..6e53b27
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/203.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/204.conf b/test/snapshot-expected/rollback/qemu-server/204.conf
new file mode 100644
index 0000000..c406640
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/204.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+lock: backup
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/205.conf b/test/snapshot-expected/rollback/qemu-server/205.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/205.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-expected/rollback/qemu-server/206.conf b/test/snapshot-expected/rollback/qemu-server/206.conf
new file mode 100644
index 0000000..932bc39
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/206.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:unsnapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:unsnapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-expected/rollback/qemu-server/207.conf b/test/snapshot-expected/rollback/qemu-server/207.conf
new file mode 100644
index 0000000..afa062e
--- /dev/null
+++ b/test/snapshot-expected/rollback/qemu-server/207.conf
@@ -0,0 +1,34 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+lock: rollback
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-4,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-4,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/commit/qemu-server/101.conf b/test/snapshot-input/commit/qemu-server/101.conf
new file mode 100644
index 0000000..4ab1787
--- /dev/null
+++ b/test/snapshot-input/commit/qemu-server/101.conf
@@ -0,0 +1,32 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/commit/qemu-server/102.conf b/test/snapshot-input/commit/qemu-server/102.conf
new file mode 100644
index 0000000..b62f2c6
--- /dev/null
+++ b/test/snapshot-input/commit/qemu-server/102.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/commit/qemu-server/201.conf b/test/snapshot-input/commit/qemu-server/201.conf
new file mode 100644
index 0000000..63a6d77
--- /dev/null
+++ b/test/snapshot-input/commit/qemu-server/201.conf
@@ -0,0 +1,49 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/commit/qemu-server/202.conf b/test/snapshot-input/commit/qemu-server/202.conf
new file mode 100644
index 0000000..4c6b84d
--- /dev/null
+++ b/test/snapshot-input/commit/qemu-server/202.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: abcdefg
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[abcdefg]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[abcdefg2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: abcdefg
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: prepare
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/commit/qemu-server/203.conf b/test/snapshot-input/commit/qemu-server/203.conf
new file mode 100644
index 0000000..5acf20d
--- /dev/null
+++ b/test/snapshot-input/commit/qemu-server/203.conf
@@ -0,0 +1,50 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/create/qemu-server/101.conf b/test/snapshot-input/create/qemu-server/101.conf
new file mode 100644
index 0000000..e89cf9a
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/101.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/102.conf b/test/snapshot-input/create/qemu-server/102.conf
new file mode 100644
index 0000000..0fe1359
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/102.conf
@@ -0,0 +1,13 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/103.conf b/test/snapshot-input/create/qemu-server/103.conf
new file mode 100644
index 0000000..9a32002
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/103.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/104.conf b/test/snapshot-input/create/qemu-server/104.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/104.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/create/qemu-server/105.conf b/test/snapshot-input/create/qemu-server/105.conf
new file mode 100644
index 0000000..307c973
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/105.conf
@@ -0,0 +1,14 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/create/qemu-server/106.conf b/test/snapshot-input/create/qemu-server/106.conf
new file mode 100644
index 0000000..0fe1359
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/106.conf
@@ -0,0 +1,13 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/201.conf b/test/snapshot-input/create/qemu-server/201.conf
new file mode 100644
index 0000000..19a0b85
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/201.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/create/qemu-server/202.conf b/test/snapshot-input/create/qemu-server/202.conf
new file mode 100644
index 0000000..48e3dc9
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/202.conf
@@ -0,0 +1,14 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-2,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-1,discard=on,size=32G
diff --git a/test/snapshot-input/create/qemu-server/203.conf b/test/snapshot-input/create/qemu-server/203.conf
new file mode 100644
index 0000000..e89cf9a
--- /dev/null
+++ b/test/snapshot-input/create/qemu-server/203.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/101.conf b/test/snapshot-input/delete/qemu-server/101.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/101.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/delete/qemu-server/102.conf b/test/snapshot-input/delete/qemu-server/102.conf
new file mode 100644
index 0000000..198e15e
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/102.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/103.conf b/test/snapshot-input/delete/qemu-server/103.conf
new file mode 100644
index 0000000..198e15e
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/103.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/104.conf b/test/snapshot-input/delete/qemu-server/104.conf
new file mode 100644
index 0000000..f07cf44
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/104.conf
@@ -0,0 +1,63 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test3
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 3
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test3]
+#another test comment
+bootdisk: ide0
+cores: 2
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/105.conf b/test/snapshot-input/delete/qemu-server/105.conf
new file mode 100644
index 0000000..21ff0ac
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/105.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/106.conf b/test/snapshot-input/delete/qemu-server/106.conf
new file mode 100644
index 0000000..9ffdfda
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/106.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/delete/qemu-server/201.conf b/test/snapshot-input/delete/qemu-server/201.conf
new file mode 100644
index 0000000..21ff0ac
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/201.conf
@@ -0,0 +1,46 @@
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/delete/qemu-server/202.conf b/test/snapshot-input/delete/qemu-server/202.conf
new file mode 100644
index 0000000..9ffdfda
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/202.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:unsnapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/delete/qemu-server/203.conf b/test/snapshot-input/delete/qemu-server/203.conf
new file mode 100644
index 0000000..c406640
--- /dev/null
+++ b/test/snapshot-input/delete/qemu-server/203.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+lock: backup
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/prepare/qemu-server/101.conf b/test/snapshot-input/prepare/qemu-server/101.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/101.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/102.conf b/test/snapshot-input/prepare/qemu-server/102.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/102.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/103.conf b/test/snapshot-input/prepare/qemu-server/103.conf
new file mode 100644
index 0000000..862389b
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/103.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/104.conf b/test/snapshot-input/prepare/qemu-server/104.conf
new file mode 100644
index 0000000..862389b
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/104.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/200.conf b/test/snapshot-input/prepare/qemu-server/200.conf
new file mode 100644
index 0000000..ee3a116
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/200.conf
@@ -0,0 +1,13 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+lock: snapshot
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/201.conf b/test/snapshot-input/prepare/qemu-server/201.conf
new file mode 100644
index 0000000..862389b
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/201.conf
@@ -0,0 +1,29 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/202.conf b/test/snapshot-input/prepare/qemu-server/202.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/202.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/prepare/qemu-server/300.conf b/test/snapshot-input/prepare/qemu-server/300.conf
new file mode 100644
index 0000000..df5e064
--- /dev/null
+++ b/test/snapshot-input/prepare/qemu-server/300.conf
@@ -0,0 +1,12 @@
+bootdisk: ide0
+cores: 4
+ide0: somestore:somedisk,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/rollback/qemu-server/101.conf b/test/snapshot-input/rollback/qemu-server/101.conf
new file mode 100644
index 0000000..4fea865
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/101.conf
@@ -0,0 +1,33 @@
+# this is a description
+agent: 1
+bootdisk: ide2
+cores: 2
+ide0: local:snapshotable-disk-1,size=32G
+ide2: none,media=cdrom
+memory: 4096
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 2
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/102.conf b/test/snapshot-input/rollback/qemu-server/102.conf
new file mode 100644
index 0000000..8f0db83
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/102.conf
@@ -0,0 +1,48 @@
+# this is a description
+agent: 1
+bootdisk: ide2
+cores: 2
+ide0: local:snapshotable-disk-1,size=32G
+ide2: none,media=cdrom
+machine: someothermachine
+memory: 4096
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 2
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/rollback/qemu-server/103.conf b/test/snapshot-input/rollback/qemu-server/103.conf
new file mode 100644
index 0000000..8f0db83
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/103.conf
@@ -0,0 +1,48 @@
+# this is a description
+agent: 1
+bootdisk: ide2
+cores: 2
+ide0: local:snapshotable-disk-1,size=32G
+ide2: none,media=cdrom
+machine: someothermachine
+memory: 4096
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 2
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/rollback/qemu-server/104.conf b/test/snapshot-input/rollback/qemu-server/104.conf
new file mode 100644
index 0000000..ff50151
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/104.conf
@@ -0,0 +1,65 @@
+# this is a description
+agent: 1
+bootdisk: ide2
+cores: 2
+ide0: local:snapshotable-disk-1,size=32G
+ide2: none,media=cdrom
+machine: someothermachine
+memory: 4096
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 2
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test2]
+#test comment
+bootdisk: ide0
+cores: 3
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+
+[test3]
+#another test comment
+bootdisk: ide0
+cores: 2
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test2
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
diff --git a/test/snapshot-input/rollback/qemu-server/105.conf b/test/snapshot-input/rollback/qemu-server/105.conf
new file mode 100644
index 0000000..b692b3e
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/105.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/rollback/qemu-server/106.conf b/test/snapshot-input/rollback/qemu-server/106.conf
new file mode 100644
index 0000000..64bf9bf
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/106.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: someothermachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/201.conf b/test/snapshot-input/rollback/qemu-server/201.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/201.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/202.conf b/test/snapshot-input/rollback/qemu-server/202.conf
new file mode 100644
index 0000000..691f5a2
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/202.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:unsnapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/203.conf b/test/snapshot-input/rollback/qemu-server/203.conf
new file mode 100644
index 0000000..6e53b27
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/203.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snapstate: delete
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/204.conf b/test/snapshot-input/rollback/qemu-server/204.conf
new file mode 100644
index 0000000..c406640
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/204.conf
@@ -0,0 +1,34 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+lock: backup
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/205.conf b/test/snapshot-input/rollback/qemu-server/205.conf
new file mode 100644
index 0000000..c521154
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/205.conf
@@ -0,0 +1,33 @@
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+
+[test]
+#test comment
+agent: 1
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+machine: somemachine
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+vmstate: somestorage:state-volume
diff --git a/test/snapshot-input/rollback/qemu-server/206.conf b/test/snapshot-input/rollback/qemu-server/206.conf
new file mode 100644
index 0000000..932bc39
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/206.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:unsnapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:unsnapshotable-disk-3,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-input/rollback/qemu-server/207.conf b/test/snapshot-input/rollback/qemu-server/207.conf
new file mode 100644
index 0000000..7787ea7
--- /dev/null
+++ b/test/snapshot-input/rollback/qemu-server/207.conf
@@ -0,0 +1,33 @@
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+parent: test
+sata0: local:snapshotable-disk-4,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
+
+[test]
+#test comment
+bootdisk: ide0
+cores: 4
+ide0: local:snapshotable-disk-1,discard=on,size=32G
+ide2: none,media=cdrom
+memory: 8192
+name: win
+net0: e1000=12:34:56:78:90:12,bridge=somebr0,firewall=1
+numa: 0
+ostype: win7
+sata0: local:snapshotable-disk-4,discard=on,size=32G
+smbios1: uuid=01234567-890a-bcde-f012-34567890abcd
+snaptime: 1234567890
+sockets: 1
+vga: qxl
+virtio0: local:snapshotable-disk-2,discard=on,size=32G
diff --git a/test/snapshot-test.pm b/test/snapshot-test.pm
new file mode 100644
index 0000000..4dc2897
--- /dev/null
+++ b/test/snapshot-test.pm
@@ -0,0 +1,576 @@
+package PVE::QemuServer;
+
+use strict;
+use warnings;
+
+use lib qw(..);
+
+use PVE::Storage;
+use PVE::Storage::Plugin;
+use PVE::QemuServer;
+use PVE::Tools;
+
+use Test::MockModule;
+use Test::More;
+
+my $nodename;
+my $snapshot_possible;
+my $vol_snapshot_possible = {};
+my $vol_snapshot_delete_possible = {};
+my $vol_snapshot_rollback_possible = {};
+my $vol_snapshot_rollback_enabled = {};
+my $vol_snapshot = {};
+my $vol_snapshot_delete = {};
+my $vol_snapshot_rollback = {};
+my $running;
+my $freeze_possible;
+my $stop_possible;
+my $save_vmstate_works;
+my $vm_mon = {};
+
+# Mocked methods
+
+sub mocked_volume_snapshot {
+    my ($storecfg, $volid, $snapname) = @_;
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+    die "volid undefined\n"
+	if !defined($volid);
+    die "snapname undefined\n"
+	if !defined($snapname);
+    if ($vol_snapshot_possible->{$volid}) {
+	if (defined($vol_snapshot->{$volid})) {
+	    $vol_snapshot->{$volid} .= ",$snapname";
+	} else {
+	    $vol_snapshot->{$volid} = $snapname;
+	}
+	return 1;
+    } else {
+	die "volume snapshot disabled\n";
+    }
+}
+
+sub mocked_volume_snapshot_delete {
+    my ($storecfg, $volid, $snapname) = @_;
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+    die "volid undefined\n"
+	if !defined($volid);
+    die "snapname undefined\n"
+	if !defined($snapname);
+    if ($vol_snapshot_delete_possible->{$volid}) {
+	if (defined($vol_snapshot_delete->{$volid})) {
+	    $vol_snapshot_delete->{$volid} .= ",$snapname";
+	} else {
+	    $vol_snapshot_delete->{$volid} = $snapname;
+	}
+	return 1;
+    } else {
+	die "volume snapshot delete disabled\n";
+    }
+}
+
+sub mocked_volume_snapshot_rollback {
+    my ($storecfg, $volid, $snapname) = @_;
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+    die "volid undefined\n"
+	if !defined($volid);
+    die "snapname undefined\n"
+	if !defined($snapname);
+    if ($vol_snapshot_rollback_enabled->{$volid}) {
+	if (defined($vol_snapshot_rollback->{$volid})) {
+	    $vol_snapshot_rollback->{$volid} .= ",$snapname";
+	} else {
+	    $vol_snapshot_rollback->{$volid} = $snapname;
+	}
+	return 1;
+    } else {
+	die "volume snapshot rollback disabled\n";
+    }
+}
+
+sub mocked_volume_rollback_is_possible {
+    my ($storecfg, $volid, $snapname) = @_;
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+    die "volid undefined\n"
+	if !defined($volid);
+    die "snapname undefined\n"
+	if !defined($snapname);
+    return $vol_snapshot_rollback_possible->{$volid}
+	if ($vol_snapshot_rollback_possible->{$volid});
+    die "volume_rollback_is_possible failed\n";
+}
+
+sub mocked_vdisk_free {
+    my ($storecfg, $vmstate) = @_;
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+    die "wrong vdisk - fake vmstate expected!\n"
+	if ($vmstate ne "somestorage:state-volume");
+    return;
+}
+
+sub mocked_run_command {
+    my ($cmd, %param) = @_;
+    my $cmdstring;
+    if (my $ref = ref($cmd)) {
+	$cmdstring = PVE::Tools::cmd2string($cmd);
+	if ($cmdstring =~ m/.*\/qemu-(un)?freeze.*/) {
+	    return 1 if $freeze_possible;
+	    die "qemu-[un]freeze disabled\n";
+	}
+	if ($cmdstring =~ m/.*\/qemu-stop.*--kill.*/) {
+	    if ($stop_possible) {
+		$running = 0;
+		return 1;
+	    } else {
+		return 0;
+	    }
+	}
+    }
+    die "unexpected run_command call: '$cmdstring', aborting\n";
+}
+
+# Testing methods
+
+sub test_file {
+    my ($exp_fn, $real_fn) = @_;
+    my $ret;
+    eval {
+	$ret = system("diff -u '$exp_fn' '$real_fn'");
+    };
+    die if $@;
+    return !$ret;
+}
+
+sub testcase_prepare {
+    my ($vmid, $snapname, $save_vmstate, $comment, $exp_err) = @_;
+    subtest "Preparing snapshot '$snapname' for vm '$vmid'" => sub {
+	plan tests => 2;
+	$@ = undef;
+	eval {
+	    PVE::QemuServer::snapshot_prepare($vmid, $snapname, $save_vmstate, $comment);
+	};
+	is($@, $exp_err, "\$@ correct");
+	ok(test_file("snapshot-expected/prepare/qemu-server/$vmid.conf", "snapshot-working/prepare/qemu-server/$vmid.conf"), "config file correct");
+    };
+}
+
+sub testcase_commit {
+    my ($vmid, $snapname, $exp_err) = @_;
+    subtest "Committing snapshot '$snapname' for vm '$vmid'" => sub {
+	plan tests => 2;
+	$@ = undef;
+	eval {
+	    PVE::QemuServer::snapshot_commit($vmid, $snapname);
+	};
+	is($@, $exp_err, "\$@ correct");
+	ok(test_file("snapshot-expected/commit/qemu-server/$vmid.conf", "snapshot-working/commit/qemu-server/$vmid.conf"), "config file correct");
+    }
+}
+
+sub testcase_create {
+    my ($vmid, $snapname, $save_vmstate, $comment, $exp_err, $exp_vol_snap, $exp_vol_snap_delete) = @_;
+    subtest "Creating snapshot '$snapname' for vm '$vmid'" => sub {
+	plan tests => 4;
+	$vol_snapshot = {};
+	$vol_snapshot_delete = {};
+	$exp_vol_snap = {} if !defined($exp_vol_snap);
+	$exp_vol_snap_delete = {} if !defined($exp_vol_snap_delete);
+	$@ = undef;
+	eval {
+	    PVE::QemuServer::snapshot_create($vmid, $snapname, $save_vmstate, $comment);
+	};
+	is($@, $exp_err, "\$@ correct");
+	is_deeply($vol_snapshot, $exp_vol_snap, "created correct volume snapshots");
+	is_deeply($vol_snapshot_delete, $exp_vol_snap_delete, "deleted correct volume snapshots");
+	ok(test_file("snapshot-expected/create/qemu-server/$vmid.conf", "snapshot-working/create/qemu-server/$vmid.conf"), "config file correct");
+    };
+}
+
+sub testcase_delete {
+    my ($vmid, $snapname, $force, $exp_err, $exp_vol_snap_delete) = @_;
+    subtest "Deleting snapshot '$snapname' of vm '$vmid'" => sub {
+	plan tests => 3;
+	$vol_snapshot_delete = {};
+	$exp_vol_snap_delete = {} if !defined($exp_vol_snap_delete);
+	$@ = undef;
+	eval {
+	    PVE::QemuServer::snapshot_delete($vmid, $snapname, $force);
+	};
+	is($@, $exp_err, "\$@ correct");
+	is_deeply($vol_snapshot_delete, $exp_vol_snap_delete, "deleted correct volume snapshots");
+	ok(test_file("snapshot-expected/delete/qemu-server/$vmid.conf", "snapshot-working/delete/qemu-server/$vmid.conf"), "config file correct");
+    };
+}
+
+sub testcase_rollback {
+    my ($vmid, $snapname, $exp_err, $exp_vol_snap_rollback) = @_;
+    subtest "Rolling back to snapshot '$snapname' of vm '$vmid'" => sub {
+	plan tests => 3;
+	$vol_snapshot_rollback = {};
+	$running = 1;
+	$exp_vol_snap_rollback = {} if !defined($exp_vol_snap_rollback);
+	$@ = undef;
+	eval {
+	    PVE::QemuServer::snapshot_rollback($vmid, $snapname);
+	};
+	is($@, $exp_err, "\$@ correct");
+	is_deeply($vol_snapshot_rollback, $exp_vol_snap_rollback, "rolled back to correct volume snapshots");
+	ok(test_file("snapshot-expected/rollback/qemu-server/$vmid.conf", "snapshot-working/rollback/qemu-server/$vmid.conf"), "config file correct");
+    };
+}
+
+# BEGIN redefine PVE::QemuServer methods 
+sub config_file_lock {
+    return "snapshot-working/pve-test.lock";
+}
+
+sub cfs_config_path {
+    my ($vmid, $node) = @_;
+
+    $node = $nodename if !$node;
+    return "snapshot-working/$node/qemu-server/$vmid.conf";
+}
+
+sub load_config {
+    my ($vmid, $node) = @_;
+
+    my $filename = cfs_config_path($vmid, $node);
+
+    my $raw = PVE::Tools::file_get_contents($filename);
+
+    my $conf = PVE::QemuServer::parse_vm_config($filename, $raw);
+    return $conf;
+}
+
+sub write_config {
+    my ($vmid, $conf) = @_;
+
+    my $filename = cfs_config_path($vmid);
+
+    if ($conf->{snapshots}) {
+	foreach my $snapname (keys %{$conf->{snapshots}}) {
+	    $conf->{snapshots}->{$snapname}->{snaptime} = "1234567890"
+		if $conf->{snapshots}->{$snapname}->{snaptime};
+	}
+    }
+
+    my $raw = PVE::QemuServer::write_vm_config($filename, $conf);
+
+    PVE::Tools::file_set_contents($filename, $raw);
+}
+
+sub has_feature {
+    my ($feature, $conf, $storecfg, $snapname, $running, $backup_only) = @_;
+    return $snapshot_possible;
+}
+
+sub check_running {
+    return $running;
+}
+
+sub snapshot_save_vmstate {
+    my ($vmid, $conf, $snapname, $storecfg) = @_;
+    die "save_vmstate failed\n"
+	if !$save_vmstate_works;
+
+    my $snap = $conf->{snapshots}->{$snapname};
+    $snap->{vmstate} = "somestorage:state-volume";
+    $snap->{machine} = "somemachine";
+}
+
+sub do_snapshots_with_qemu {
+    return 0;
+}
+
+sub vm_qmp_command {
+    my ($vmid, $cmd, $nocheck) = @_;
+
+    my $exec = $cmd->{execute};
+    if ($exec eq "delete-drive-snapshot") {
+	return;
+    }
+    if ($exec eq "guest-ping") {
+	die "guest-ping disabled\n"
+	    if !$vm_mon->{guest_ping};
+	return;
+    }
+    if ($exec eq "guest-fsfreeze-freeze" || $exec eq "guest-fsfreeze-thaw") {
+	die "freeze disabled\n"
+	    if !$freeze_possible;
+	return;
+    }
+    if ($exec eq "savevm-start") {
+	die "savevm-start disabled\n"
+	    if !$vm_mon->{savevm_start};
+	return;
+    }
+    if ($exec eq "savevm-end") {
+	die "savevm-end disabled\n"
+	    if !$vm_mon->{savevm_end};
+	return;
+    }
+    if ($exec eq "query-savevm") {
+	return { "status" => "completed" };
+    }
+    die "unexpected vm_qmp_command!\n";
+}
+
+sub vm_start {
+    my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom, $paused, $forcemachine) = @_;
+
+    die "Storage config not mocked! aborting\n"
+	if defined($storecfg);
+
+    die "statefile and forcemachine must be both defined or undefined! aborting\n"
+	if defined($statefile) xor defined($forcemachine);
+
+    return;
+}
+
+sub vm_stop {
+    my ($storecfg, $vmid, $skiplock, $nocheck, $timeout, $shutdown, $force, $keepActive, $migratedfrom) = @_;
+
+    $running = 0
+	if $stop_possible;
+
+    return;
+}
+
+# END redefine PVE::QemuServer methods
+
+PVE::Tools::run_command("rm -rf snapshot-working");
+PVE::Tools::run_command("cp -a snapshot-input snapshot-working");
+
+$running = 1;
+$freeze_possible = 1;
+$save_vmstate_works = 1;
+
+printf("\n");
+printf("Running prepare tests\n");
+printf("\n");
+$nodename = "prepare";
+
+printf("\n");
+printf("Setting has_feature to return true\n");
+printf("\n");
+$snapshot_possible = 1;
+
+printf("Successful snapshot_prepare with no existing snapshots\n");
+testcase_prepare("101", "test", 0, "test comment", '');
+
+printf("Successful snapshot_prepare with no existing snapshots, including vmstate\n");
+testcase_prepare("102", "test", 1, "test comment", '');
+
+printf("Successful snapshot_prepare with one existing snapshot\n");
+testcase_prepare("103", "test2", 0, "test comment", "");
+
+printf("Successful snapshot_prepare with one existing snapshot, including vmstate\n");
+testcase_prepare("104", "test2", 1, "test comment", "");
+
+printf("Expected error for snapshot_prepare on locked container\n");
+testcase_prepare("200", "test", 0, "test comment", "VM is locked (snapshot)\n");
+
+printf("Expected error for snapshot_prepare with duplicate snapshot name\n");
+testcase_prepare("201", "test", 0, "test comment", "snapshot name 'test' already used\n");
+
+$save_vmstate_works = 0;
+
+printf("Expected error for snapshot_prepare with failing save_vmstate\n");
+testcase_prepare("202", "test", 1, "test comment", "save_vmstate failed\n");
+
+$save_vmstate_works = 1;
+
+printf("\n");
+printf("Setting has_feature to return false\n");
+printf("\n");
+$snapshot_possible = 0;
+
+printf("Expected error for snapshot_prepare if snapshots not possible\n");
+testcase_prepare("300", "test", 0, "test comment", "snapshot feature is not available\n");
+
+printf("\n");
+printf("Running commit tests\n");
+printf("\n");
+$nodename = "commit";
+
+printf("\n");
+printf("Setting has_feature to return true\n");
+printf("\n");
+$snapshot_possible = 1;
+
+printf("Successful snapshot_commit with one prepared snapshot\n");
+testcase_commit("101", "test", "");
+
+printf("Successful snapshot_commit with one committed and one prepared snapshot\n");
+testcase_commit("102", "test2", "");
+
+printf("Expected error for snapshot_commit with no snapshot lock\n");
+testcase_commit("201", "test", "missing snapshot lock\n");
+
+printf("Expected error for snapshot_commit with invalid snapshot name\n");
+testcase_commit("202", "test", "snapshot 'test' does not exist\n");
+
+printf("Expected error for snapshot_commit with invalid snapshot state\n");
+testcase_commit("203", "test", "wrong snapshot state\n");
+
+$vol_snapshot_possible->{"local:snapshotable-disk-1"} = 1;
+$vol_snapshot_possible->{"local:snapshotable-disk-2"} = 1;
+$vol_snapshot_possible->{"local:snapshotable-disk-3"} = 1;
+$vol_snapshot_delete_possible->{"local:snapshotable-disk-1"} = 1;
+$vol_snapshot_delete_possible->{"local:snapshotable-disk-3"} = 1;
+$vol_snapshot_rollback_enabled->{"local:snapshotable-disk-1"} = 1;
+$vol_snapshot_rollback_enabled->{"local:snapshotable-disk-2"} = 1;
+$vol_snapshot_rollback_enabled->{"local:snapshotable-disk-3"} = 1;
+$vol_snapshot_rollback_possible->{"local:snapshotable-disk-1"} = 1;
+$vol_snapshot_rollback_possible->{"local:snapshotable-disk-2"} = 1;
+$vol_snapshot_rollback_possible->{"local:snapshotable-disk-3"} = 1;
+$vol_snapshot_rollback_possible->{"local:snapshotable-disk-4"} = 1;
+$vm_mon->{guest_ping} = 1;
+$vm_mon->{savevm_start} = 1;
+$vm_mon->{savevm_end} = 1;
+
+# possible, but fails
+$vol_snapshot_rollback_possible->{"local:snapshotable-disk-4"} = 1;
+
+printf("\n");
+printf("Setting up Mocking for PVE::Storage\n");
+my $storage_module = new Test::MockModule('PVE::Storage');
+$storage_module->mock('config', sub { return undef; });
+$storage_module->mock('path', sub { return "/some/store/statefile/path"; });
+$storage_module->mock('vdisk_free', \&mocked_vdisk_free);
+$storage_module->mock('volume_snapshot', \&mocked_volume_snapshot);
+$storage_module->mock('volume_snapshot_delete', \&mocked_volume_snapshot_delete);
+$storage_module->mock('volume_snapshot_rollback', \&mocked_volume_snapshot_rollback);
+$storage_module->mock('volume_rollback_is_possible', \&mocked_volume_rollback_is_possible);
+printf("\tconfig(), volume_snapshot(), volume_snapshot_delete(), volume_snapshot_rollback() and volume_rollback_is_possible() mocked\n");
+
+#printf("\n");
+#printf("Setting up Mocking for PVE::Tools\n");
+#my $tools_module = new Test::MockModule('PVE::Tools');
+#$tools_module->mock('run_command' => \&mocked_run_command);
+#printf("\trun_command() mocked\n");
+#
+$nodename = "create";
+printf("\n");
+printf("Running create tests\n");
+printf("\n");
+
+printf("Successful snapshot_create with no existing snapshots\n");
+testcase_create("101", "test", 0, "test comment", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_create with no existing snapshots, including vmstate\n");
+testcase_create("102", "test", 1, "test comment", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_create with one existing snapshots\n");
+testcase_create("103", "test2", 0, "test comment", "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_create with one existing snapshots, including vmstate\n");
+testcase_create("104", "test2", 1, "test comment", "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_create with multiple mps\n");
+testcase_create("105", "test", 0, "test comment", "", { "local:snapshotable-disk-1" => "test", "local:snapshotable-disk-2" => "test", "local:snapshotable-disk-3" => "test" });
+
+$freeze_possible = 0;
+printf("Successful snapshot_create with no existing snapshots and broken freeze\n");
+testcase_create("106", "test", 1, "test comment", "", { "local:snapshotable-disk-1" => "test" });
+$freeze_possible = 1;
+
+printf("Expected error for snapshot_create when volume snapshot is not possible\n");
+testcase_create("201", "test", 0, "test comment", "volume snapshot disabled\n");
+
+printf("Expected error for snapshot_create when volume snapshot is not possible for one drive\n");
+testcase_create("202", "test", 0, "test comment", "volume snapshot disabled\n", { "local:snapshotable-disk-1" => "test" }, { "local:snapshotable-disk-1" => "test" });
+
+$vm_mon->{savevm_start} = 0;
+printf("Expected error for snapshot_create when Qemu mon command 'savevm-start' fails\n");
+testcase_create("203", "test", 0, "test comment", "savevm-start disabled\n");
+$vm_mon->{savevm_start} = 1;
+
+
+$nodename = "delete";
+printf("\n");
+printf("Running delete tests\n");
+printf("\n");
+
+printf("Successful snapshot_delete of only existing snapshot\n");
+testcase_delete("101", "test", 0, "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_delete of leaf snapshot\n");
+testcase_delete("102", "test2", 0, "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_delete of root snapshot\n");
+testcase_delete("103", "test", 0, "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_delete of intermediate snapshot\n");
+testcase_delete("104", "test2", 0, "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_delete with broken volume_snapshot_delete and force=1\n");
+testcase_delete("105", "test", 1, "");
+
+printf("Successful snapshot_delete with mp broken volume_snapshot_delete and force=1\n");
+testcase_delete("106", "test", 1, "", { "local:snapshotable-disk-1" => "test", "local:snapshotable-disk-3" => "test" });
+
+printf("Expected error when snapshot_delete fails with broken volume_snapshot_delete and force=0\n");
+testcase_delete("201", "test", 0, "volume snapshot delete disabled\n");
+
+printf("Expected error when snapshot_delete fails with broken mp volume_snapshot_delete and force=0\n");
+testcase_delete("202", "test", 0, "volume snapshot delete disabled\n", { "local:snapshotable-disk-1" => "test" });
+
+printf("Expected error for snapshot_delete with locked config\n");
+testcase_delete("203", "test", 0, "VM is locked (backup)\n");
+
+$nodename = "rollback";
+printf("\n");
+printf("Running rollback tests\n");
+printf("\n");
+
+$stop_possible = 1;
+
+printf("Successful snapshot_rollback to only existing snapshot\n");
+testcase_rollback("101", "test", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_rollback to leaf snapshot\n");
+testcase_rollback("102", "test2", "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_rollback to root snapshot\n");
+testcase_rollback("103", "test", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Successful snapshot_rollback to intermediate snapshot\n");
+testcase_rollback("104", "test2", "", { "local:snapshotable-disk-1" => "test2" });
+
+printf("Successful snapshot_rollback with multiple mp\n");
+testcase_rollback("105", "test", "", { "local:snapshotable-disk-1" => "test", "local:snapshotable-disk-2" => "test", "local:snapshotable-disk-3" => "test" });
+
+printf("Successful snapshot_rollback to only existing snapshot, with saved vmstate and machine config\n");
+testcase_rollback("106", "test", "", { "local:snapshotable-disk-1" => "test" });
+
+printf("Expected error for snapshot_rollback with non-existing snapshot\n");
+testcase_rollback("201", "test2", "snapshot 'test2' does not exist\n");
+
+printf("Expected error for snapshot_rollback if volume rollback not possible\n");
+testcase_rollback("202", "test", "volume_rollback_is_possible failed\n");
+
+printf("Expected error for snapshot_rollback with incomplete snapshot\n");
+testcase_rollback("203", "test", "unable to rollback to incomplete snapshot (snapstate = delete)\n");
+
+printf("Expected error for snapshot_rollback with lock\n");
+testcase_rollback("204", "test", "VM is locked (backup)\n");
+
+$stop_possible = 0;
+
+printf("Expected error for snapshot_rollback with unkillable container\n");
+testcase_rollback("205", "test", "unable to rollback vm 205: vm is running\n");
+
+$stop_possible = 1;
+
+printf("Expected error for snapshot_rollback with mp rollback_is_possible failure\n");
+testcase_rollback("206", "test", "volume_rollback_is_possible failed\n");
+
+printf("Expected error for snapshot_rollback with mp rollback failure (results in inconsistent state)\n");
+testcase_rollback("207", "test", "volume snapshot rollback disabled\n", { "local:snapshotable-disk-1" => "test", "local:snapshotable-disk-2" => "test" });
+
+done_testing();
-- 
2.1.4





More information about the pve-devel mailing list