import pypowervm.tasks.storage as ts
from pypowervm.helpers import log_helper as log_hlp
from pypowervm.helpers import vios_busy as vio_hlp
from pypowervm import adapter as pvm_apt
ret = ts.crt_vdisk(adapter, _vios_uuid, vg_w.uuid, 'vdisk_name', 10, file_format='raw')
I got the following error:
Traceback (most recent call last):
File "imagetool2.py", line 19, in
ret = ts.crt_vdisk(adapter, _vios_uuid, vg_w.uuid, 'vdisk_name', 10, file_format='raw')
File "/root/venv/venv/lib/python3.6/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
return f(args, kwargs)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/tasks/storage.py", line 655, in crt_vdisk
vol_grp = vol_grp.update()
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/wrappers/entry_wrapper.py", line 1151, in update
timeout=timeout))
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 846, in update_by_path
path = util.dice_href(path)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 646, in _request
resp = func(method, path, kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/helpers/log_helper.py", line 150, in log_req_resp
response = func(args, *kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/helpers/vios_busy.py", line 60, in wrapper
resp = func(args, **kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 432, in request
raise self._get_httperror(resp)
pypowervm.exceptions.HttpError: HTTP error 400 for method POST on path /rest/api/uom/VirtualIOServer/29297CDE-1A48-4B59-930E-254A9813C1A7/VolumeGroup/b3dbd341-60d3-3715-a782-726b01ce7f5d?group=None: Bad Request -- REST0001 Failed to unmarshal input payload.
Invalid content was found starting with element 'VolumeGroup:VirtualDiskType'. One of '{"http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":MaxLogicalVolumes, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":PartitionSize, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":VolumeGroup, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":UniqueDeviceID}' is expected.
Exception ignored in: <bound method Session.del of <pypowervm.adapter.Session object at 0x7fca5ef4a630>>
Traceback (most recent call last):
Seems the VolumeGroup:VirtualDiskType does not compatible with the hmc rest server. Does specific verison of hmc required for pypowervm project?
with runing below code:
import pypowervm.tasks.storage as ts from pypowervm.helpers import log_helper as log_hlp from pypowervm.helpers import vios_busy as vio_hlp from pypowervm import adapter as pvm_apt
from pypowervm.tasks import storage as pvm_stor
adapter = pvm_apt.Adapter(pvm_apt.Session(host='10.16.11.58', username='hscroot', password='abc1234', conn_tries=60), helpers=[log_hlp.log_helper, vio_hlp.vios_busy_retry_helper])
vios_w, vg_w = pvm_stor.find_vg(adapter, 'sys_disk_pool') _vios_uuid = vios_w.uuid
ret = ts.crt_vdisk(adapter, _vios_uuid, vg_w.uuid, 'vdisk_name', 10, file_format='raw')
I got the following error: Traceback (most recent call last): File "imagetool2.py", line 19, in
ret = ts.crt_vdisk(adapter, _vios_uuid, vg_w.uuid, 'vdisk_name', 10, file_format='raw')
File "/root/venv/venv/lib/python3.6/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
return f(args, kwargs)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/tasks/storage.py", line 655, in crt_vdisk
vol_grp = vol_grp.update()
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/wrappers/entry_wrapper.py", line 1151, in update
timeout=timeout))
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 846, in update_by_path
path = util.dice_href(path)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 646, in _request
resp = func(method, path, kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/helpers/log_helper.py", line 150, in log_req_resp
response = func(args, *kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/helpers/vios_busy.py", line 60, in wrapper
resp = func(args, **kwds)
File "/root/venv/venv/lib/python3.6/site-packages/pypowervm/adapter.py", line 432, in request
raise self._get_httperror(resp)
pypowervm.exceptions.HttpError: HTTP error 400 for method POST on path /rest/api/uom/VirtualIOServer/29297CDE-1A48-4B59-930E-254A9813C1A7/VolumeGroup/b3dbd341-60d3-3715-a782-726b01ce7f5d?group=None: Bad Request -- REST0001 Failed to unmarshal input payload.
Invalid content was found starting with element 'VolumeGroup:VirtualDiskType'. One of '{"http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":MaxLogicalVolumes, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":PartitionSize, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":VolumeGroup, "http://www.ibm.com/xmlns/systems/power/firmware/uom/mc/2012_10/":UniqueDeviceID}' is expected.
Exception ignored in: <bound method Session.del of <pypowervm.adapter.Session object at 0x7fca5ef4a630>>
Traceback (most recent call last):
Seems the VolumeGroup:VirtualDiskType does not compatible with the hmc rest server. Does specific verison of hmc required for pypowervm project?