VirtualBox

Ticket #8605 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

python: create HDD fails

Reported by: Technologov Owned by:
Priority: critical Component: other
Version: VirtualBox 4.0.4 Keywords:
Cc: Guest type: other
Host type: Windows

Description

Host: WinXP, python 2.5, VBox 4.0.4

It seems one vbox constant fails: (MediumVariant_Standard)

from vboxapi import VirtualBoxManager

globalmgr = VirtualBoxManager(None, None)
...
progress = medium.createBaseStorage(1024*1024*1024,
globalmgr.constants.MediumVariant_Standard)

results in:

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "D:\DOCUME~1\User\LOCALS~1\Temp\gen_py\2.5\46137EEC-703B-4FE5-AFD4-7C9BBB
BA0259x0x1x3\IMedium.py", line 53, in CreateBaseStorage
   , aVariant)
TypeError: The VARIANT type is unknown (0x00000014)

I tried to use official program "vboxshell.py", and same result:

vbox> createHdd 1000 C:/123tst.vdi
The VARIANT type is unknown (0x00000014)

Clarification: it works on openSUSE 10.3 Linux host. (also python 2.5.x)

I have also tried to use constant value ('0') directly. Same error.

-Technologov, 21.3.2011.

Attachments

vboxshell.patch Download (1.2 KB) - added by Technologov 3 years ago.
Here is my patch, that fixes it. MIT licensed.

Change History

comment:1 Changed 3 years ago by ni81036

  • Status changed from new to closed
  • Resolution set to worksforme

Tested with Python 2.5 and 2.7 (and current pywin) on 32-bit Windows XP and cannot reproduce this behavior.

comment:2 Changed 3 years ago by Technologov

You're right... problem only happens with "pywin32-213.win32-py2.5.exe", after upgrade to "pywin32-216.win32-py2.5.exe", it all works !

Old pywin module is buggy.

-Technologov

Changed 3 years ago by Technologov

Here is my patch, that fixes it. MIT licensed.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use