VirtualBox

source: vbox/trunk/src/VBox/Storage/testcase/tstVDCopy.vd@ 41911

Last change on this file since 41911 was 38469, checked in by vboxsync, 13 years ago

VD: Interface cleanup. Merge the two involved structures (generic interface descriptor and callback table) into one, remove the duplicated interface wrappers in the backends and move the interface definitions into separate headers separating public and private interfaces.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# $Id: tstVDCopy.vd 38469 2011-08-16 10:34:32Z vboxsync $
2#
3# Storage: Testcase for VDCopy with snapshots and optimizations.
4#
5
6#
7# Copyright (C) 2011 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18# Init I/O RNG for generating random data for writes
19iorngcreate size=10M mode=manual seed=1234567890
20
21# Create source disk and fill data
22print msg=Creating_Source_Disk
23 createdisk name=source verify=no
24 create disk=source mode=base name=source_base.vdi type=dynamic backend=VDI size=1G
25 io disk=source async=no mode=rnd blocksize=64k off=0-512M size=256M writes=100
26
27# Create 1st snapshot
28print msg=Creating_First_Diff
29 create disk=source mode=diff name=source_diff1.vdi type=dynamic backend=VDI size=1G
30 io disk=source async=no mode=rnd blocksize=64k off=512M-1G size=256M writes=50
31
32# Create 2nd snapshot
33print msg=Creating_Second_Diff
34 create disk=source mode=diff name=source_diff2.vdi type=dynamic backend=VDI size=1G
35 io disk=source async=no mode=rnd blocksize=1M off=0M-1G size=45M writes=100
36
37print msg=Creating_Third_Diff
38 create disk=source mode=diff name=source_diff3.vdi type=dynamic backend=VDI size=1G
39 io disk=source async=no mode=rnd blocksize=1M off=0M-1G size=45M writes=100
40
41print msg=Creating_Fourth_Diff
42 create disk=source mode=diff name=source_diff4.vdi type=dynamic backend=VDI size=1G
43 io disk=source async=no mode=rnd blocksize=1M off=0M-1G size=45M writes=100
44
45# Create destination disk
46print msg=Creating_Destination_Disk
47 createdisk name=dest verify=no
48
49# Copy base image
50print msg=Copying_Base_Image
51 copy diskfrom=source diskto=dest imagefrom=0 backend=VDI filename=dest_base.vdi
52
53print msg=Copying_First_Diff_optimized
54 copy diskfrom=source diskto=dest imagefrom=1 backend=VDI filename=dest_diff1.vdi fromsame=0 tosame=0
55
56print msg=Copying_Second_Diff_optimized
57 copy diskfrom=source diskto=dest imagefrom=2 backend=VDI filename=dest_diff2.vdi fromsame=1 tosame=1
58 copy diskfrom=source diskto=dest imagefrom=3 backend=VDI filename=dest_diff3.vdi fromsame=2 tosame=2
59 copy diskfrom=source diskto=dest imagefrom=4 backend=VDI filename=dest_diff4.vdi fromsame=3 tosame=3
60
61print msg=Comparing_Disks
62 comparedisks disk1=source disk2=dest
63
64printfilesize disk=source image=0
65printfilesize disk=source image=1
66printfilesize disk=source image=2
67printfilesize disk=source image=3
68printfilesize disk=source image=4
69
70printfilesize disk=dest image=0
71printfilesize disk=dest image=1
72printfilesize disk=dest image=2
73printfilesize disk=dest image=3
74printfilesize disk=dest image=4
75
76# Cleanup
77print msg=Cleaning_up
78 close disk=dest mode=single delete=yes
79 close disk=dest mode=single delete=yes
80 close disk=dest mode=single delete=yes
81
82 close disk=source mode=single delete=yes
83 close disk=source mode=single delete=yes
84 close disk=source mode=single delete=yes
85 destroydisk name=source
86 destroydisk name=dest
87
88iorngdestroy
89
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette