aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/scripts
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-02-25 23:45:39 +0000
committerEwan Mellor <ewan@xensource.com>2007-02-25 23:45:39 +0000
commit51b6900b84eb965c36752c9cf8d91af0c29182dd (patch)
tree9b57c81777552da3f7dfa194b0726ce8b10d87a0 /tools/python/scripts
parent496ee4e22a895b6b13452ef0b2f59d95851d37bd (diff)
downloadxen-51b6900b84eb965c36752c9cf8d91af0c29182dd.tar.gz
xen-51b6900b84eb965c36752c9cf8d91af0c29182dd.tar.bz2
xen-51b6900b84eb965c36752c9cf8d91af0c29182dd.zip
Redefine units of VDI.virtual_size to be bytes, not sectors.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/python/scripts')
-rw-r--r--tools/python/scripts/test_vm_create.py2
-rw-r--r--tools/python/scripts/xapi.py4
-rw-r--r--tools/python/scripts/xapi.vdicfg.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/tools/python/scripts/test_vm_create.py b/tools/python/scripts/test_vm_create.py
index 84959c3e0d..e4d8f3023a 100644
--- a/tools/python/scripts/test_vm_create.py
+++ b/tools/python/scripts/test_vm_create.py
@@ -39,7 +39,7 @@ vm_cfg = {
vdi_cfg = {
'name_label': 'API_VDI',
'name_description': '',
- 'virtual_size': 100 * 1024,
+ 'virtual_size': 100 * 1024 * 1024,
'sector_size': 1024,
'type': 'system',
'parent': '',
diff --git a/tools/python/scripts/xapi.py b/tools/python/scripts/xapi.py
index b5fe8b3682..1e49f86d4c 100644
--- a/tools/python/scripts/xapi.py
+++ b/tools/python/scripts/xapi.py
@@ -569,7 +569,7 @@ def xapi_vdi_list(args, async = False):
if not is_long:
print VDI_LIST_FORMAT % {'name_label': 'VDI Label',
'uuid' : 'UUID',
- 'virtual_size': 'Sectors',
+ 'virtual_size': 'Bytes',
'sector_size': 'Sector Size'}
for vdi in vdis:
@@ -628,7 +628,7 @@ def xapi_vdi_create(args, async = False):
sr = srs[0]
cfg['SR'] = sr
- size = (cfg['virtual_size'] * cfg['sector_size'])/MB
+ size = cfg['virtual_size']/MB
print 'Creating VDI of size: %dMB ..' % size,
uuid = execute(server, 'VDI.create', (session, cfg), async = async)
if async:
diff --git a/tools/python/scripts/xapi.vdicfg.py b/tools/python/scripts/xapi.vdicfg.py
index f694b83cf5..86129bfae9 100644
--- a/tools/python/scripts/xapi.vdicfg.py
+++ b/tools/python/scripts/xapi.vdicfg.py
@@ -1,6 +1,6 @@
name_label = 'VDI 1'
name_description = ''
-virtual_size = 10 * 1024
+virtual_size = 10 * 1024 * 1024
sector_size = 1024
type = 'system'
sharable = False