Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Clone volume fails with "VM None does not belong to any vmgroup" #1449

Closed
vxav opened this issue Jun 21, 2017 · 2 comments
Closed

Clone volume fails with "VM None does not belong to any vmgroup" #1449

vxav opened this issue Jun 21, 2017 · 2 comments
Assignees
Milestone

Comments

@vxav
Copy link

vxav commented Jun 21, 2017

When I try to clone a volume I always get an error "VM None does not belong to any vmgroup".
Of course my photon host is in a vmgroup.
I can make sure of it because if I create a docker volume with the vsphere driver on Photon1 (on ESX1), Photon0 (on ESX0) picks it up instantly.
Tried with a volume attached and with a detached one.

Photon output

root@photon1 [ ~ ]# docker volume create --name own_Clone --driver=vsphere -o clone-from=own_own Error response from daemon: create own_Clone: VolumeDriver.Create: VM None does not belong to any vmgroup

/var/log/vmware/vmdk_ops.log:

`06/21/17 07:36:19 68514 [MainThread] [INFO ] Started new thread : 879477143296 with target <function execRequestThread at 0xccc2c17510> and args (11, 69292, b'{"cmd":"get","details":{"Name":"ClonedVol"},"version":"2"}')
06/21/17 07:36:19 68514 [Thread-71] [INFO ] Checking DB mode for /etc/vmware/vmdkops/auth-db...
06/21/17 07:36:19 68514 [Thread-71] [INFO ] Config DB found. maj_ver=1 min_ver=2 mode MultiNode
06/21/17 07:36:19 68514 [Thread-71] [INFO ] cmd=get opts={} vmgroup=MYVMGROUP datastore_url=/vmfs/volumes/582b1324-e49d9a0e-9bc3-000c29c1501d is allowed to execute
06/21/17 07:36:19 68514 [Photon0-SHARED-Datastore.MYVMGROUP.ClonedVol] [INFO ] executeRequest 'get' completed with ret={'Error': 'Volume ClonedVol not found (file: /vmfs/volumes/SHARED-Datastore/dockvols/0f2d53d7-091e-4b04-a6b0-1d2a43c454eb/ClonedVol.vmdk)'}
06/21/17 07:36:19 68514 [MainThread] [INFO ] Started new thread : 879477143296 with target <function execRequestThread at 0xccc2c17510> and args (13, 69292, b'{"cmd":"create","details":{"Name":"ClonedVol","Opts":{"clone-from":"TestVol1"}},"version":"2"}')
06/21/17 07:36:19 68514 [Thread-72] [INFO ] Checking DB mode for /etc/vmware/vmdkops/auth-db...
06/21/17 07:36:19 68514 [Thread-72] [INFO ] Config DB found. maj_ver=1 min_ver=2 mode MultiNode
06/21/17 07:36:19 68514 [Thread-72] [WARNING] Volume size not specified
06/21/17 07:36:19 68514 [Thread-72] [WARNING] Volume size not specified
06/21/17 07:36:19 68514 [Thread-72] [INFO ] cmd=create opts={'clone-from': 'TestVol1'} vmgroup=MYVMGROUP datastore_url=/vmfs/volumes/582b1324-e49d9a0e-9bc3-000c29c1501d is allowed to execute
06/21/17 07:36:19 68514 [Photon0-SHARED-Datastore.MYVMGROUP.ClonedVol] [INFO ] *** createVMDK: /vmfs/volumes/SHARED-Datastore/dockvols/0f2d53d7-091e-4b04-a6b0-1d2a43c454eb/ClonedVol.vmdk opts = {'clone-from': 'TestVol1'} vm_name=Photon0 tenant_uuid=0f2d53d7-091e-4b04-a6b0-1d2a43c454eb datastore_url=/vmfs/volumes/582b1324-e49d9a0e-9bc3-000c29c1501d
06/21/17 07:36:19 68514 [Photon0-SHARED-Datastore.MYVMGROUP.ClonedVol] [INFO ] *** cloneVMDK: /vmfs/volumes/SHARED-Datastore/dockvols/0f2d53d7-091e-4b04-a6b0-1d2a43c454eb/ClonedVol.vmdk opts = {'clone-from': 'TestVol1'} vm_uuid=None datastore_url=/vmfs/volumes/582b1324-e49d9a0e-9bc3-000c29c1501d
06/21/17 07:36:19 68514 [Photon0-SHARED-Datastore.MYVMGROUP.ClonedVol] [INFO ] executeRequest 'create' completed with ret={'Error': 'VM None does not belong to any vmgroup'}'

@govint
Copy link
Contributor

govint commented Jun 21, 2017

The issue seems to be with the vm_uuid not being provided to the clone volume op, thats causing the issue:
06/21/17 07:36:19 68514 [Photon0-SHARED-Datastore.MYVMGROUP.ClonedVol] [INFO ] *** cloneVMDK: /vmfs/volumes/SHARED-Datastore/dockvols/0f2d53d7-091e-4b04-a6b0-1d2a43c454eb/ClonedVol.vmdk opts = {'clone-from': 'TestVol1'} --->vm_uuid=None<---- datastore_url=/vmfs/volumes/582b1324-e49d9a0e-9bc3-000c29c1501d

@pdhamdhere
Copy link
Contributor

Thanks @vxav That was a good catch. Clone operations works fine for VMs in DEFAULT vm-group but was broken if VM is member of named VM-Group. @govint fixed in #1451 Fix will be available in upcoming release (June-30th) Let us know if you need patch for 0.14 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants