def hdd_clone(uuid, new_location, existing=False):
try:
if existing:
VBoxManage('clonehd', uuid, new_location, '--existing')
else:
VBoxManage('clonehd', uuid, new_location)
except ErrorReturnCode_1 as e:
# if the VM was not found
if 'VBOX_E_OBJECT_NOT_FOUND' in e.stderr:
raise HDDNotFound(uuid)
# something else happened, just let it go
raise
评论列表
文章目录