Open wattwood opened 5 years ago
@saltstack/team-cloud Any ideas here?
It says that the building of the vsan timed out, did it actually build or was there an error in vsphere?
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/vmware.py", line 2901, in create
salt.utils.vmware.wait_for_task(task, vm_name, "create", 15, 'info')
File "/usr/lib/python2.7/site-packages/salt/utils/vmware.py", line 3164, in wait_for_task
raise salt.exceptions.VMwareApiError(exc.msg)
VMwareApiError: Cannot complete file creation operation.
It says that the building of the vsan timed out, did it actually build or was there an error in vsphere?
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/vmware.py", line 2901, in create salt.utils.vmware.wait_for_task(task, vm_name, "create", 15, 'info') File "/usr/lib/python2.7/site-packages/salt/utils/vmware.py", line 3164, in wait_for_task raise salt.exceptions.VMwareApiError(exc.msg) VMwareApiError: Cannot complete file creation operation.
This is from my most recent attempt
May 7 17:07:09 node02 Hostd:[info] Task Created : haTask--vim.host.OperationCleanupManager.createEntry-207395421
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ADD: recentTask["haTask--vim.host.OperationCleanupManager.createEntry-207395421"], ha-taskmgr. Applied change to temp map.
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ASSIGN: info, haTask--vim.host.OperationCleanupManager.createEntry-207395421. Applied change to temp map.
May 7 17:07:09 node02 Hostd:[error] Failed to create directory for host log file /vmfs/volumes/vsan:5292a6b5bdfbb488-d9b171feda0214ed/new_vm2/new_vm2-0b4bcfaf.hlog
May 7 17:07:09 node02 Hostd:[info] AdapterServer caught exception: vim.fault.CannotCreateFile
May 7 17:07:09 node02 Hostd:[info] Task Completed : haTask--vim.host.OperationCleanupManager.createEntry-207395421 Status error
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ASSIGN: info, haTask--vim.host.OperationCleanupManager.createEntry-207395421. Applied change to temp map.
May 7 17:07:09 node02 Hostd:[info] Activation [N5Vmomi10ActivationE:0x54e5fca0] : Invoke done [createEntry] on [vim.host.OperationCleanupManager:ha-op-cleanup-mgr]
May 7 17:07:09 node02 Hostd:[verbose] Arg entry:
May 7 17:07:09 node02 Hostd:[-->] {
May 7 17:07:09 node02 Hostd:[-->] hlogFile = "/vmfs/volumes/vsan:5292a6b5bdfbb488-d9b171feda0214ed/new_vm2/new_vm2-0b4bcfaf.hlog",
May 7 17:07:09 node02 Hostd:[-->] opId = 2221475849602357233,
May 7 17:07:09 node02 Hostd:[-->] opState = "running",
May 7 17:07:09 node02 Hostd:[-->] opActivity = "create",
May 7 17:07:09 node02 Hostd:[-->] curHostUuid = "6253a760-7c66-1000-95a0-54ab3a89ef4a",
May 7 17:07:09 node02 Hostd:[-->] itemList = (vim.host.OperationCleanupManager.CleanupItemEntry) [
May 7 17:07:09 node02 Hostd:[-->] (vim.host.OperationCleanupManager.CleanupItemEntry) {
May 7 17:07:09 node02 Hostd:[-->] path = "/vmfs/volumes/vsan:5292a6b5bdfbb488-d9b171feda0214ed/new_vm2/",
May 7 17:07:09 node02 Hostd:[-->] type = "dir",
May 7 17:07:09 node02 Hostd:[-->] removeUpon = "failure"
May 7 17:07:09 node02 Hostd:[-->] },
May 7 17:07:09 node02 Hostd:[-->] (vim.host.OperationCleanupManager.CleanupItemEntry) {
May 7 17:07:09 node02 Hostd:[-->] path = "/vmfs/volumes/vsan:5292a6b5bdfbb488-d9b171feda0214ed/new_vm2/new_vm2.vmx",
May 7 17:07:09 node02 Hostd:[-->] type = "vm",
May 7 17:07:09 node02 Hostd:[-->] removeUpon = "failure"
May 7 17:07:09 node02 Hostd:[-->] }
May 7 17:07:09 node02 Hostd:[-->] ]
May 7 17:07:09 node02 Hostd:[-->]
May 7 17:07:09 node02 Hostd:[info] Throw vim.fault.CannotCreateFile
May 7 17:07:09 node02 Hostd:[info] Result:
May 7 17:07:09 node02 Hostd:[-->] {
May 7 17:07:09 node02 Hostd:[-->] faultCause = (vmodl.MethodFault) null,
May 7 17:07:09 node02 Hostd:[-->] faultMessage = <unset>,
May 7 17:07:09 node02 Hostd:[-->] file = "/vmfs/volumes/vsan:5292a6b5bdfbb488-d9b171feda0214ed/new_vm2/new_vm2-0b4bcfaf.hlog"
May 7 17:07:09 node02 Hostd:[-->] msg = ""
May 7 17:07:09 node02 Hostd:[-->]
May 7 17:07:09 node02 Hostd:[info] Task Created : haTask--vim.DatastoreNamespaceManager.DeleteDirectory-207395422
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ADD: recentTask["haTask--vim.DatastoreNamespaceManager.DeleteDirectory-207395422"], ha-taskmgr. Applied change to temp map.
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ASSIGN: info, haTask--vim.DatastoreNamespaceManager.DeleteDirectory-207395422. Applied change to temp map.
May 7 17:07:09 vxrail-node01.vsphere.local.vsphere.local Hostd:[verbose] RecordOp ASSIGN: guest.disk, 104. Sent notification immediately.
May 7 17:07:09 node02 Hostd:[info] AdapterServer caught exception: vim.fault.FileNotFound
May 7 17:07:09 node02 Hostd:[info] Task Completed : haTask--vim.DatastoreNamespaceManager.DeleteDirectory-207395422 Status error
May 7 17:07:09 node02 Hostd:[verbose] RecordOp ASSIGN: info, haTask--vim.DatastoreNamespaceManager.DeleteDirectory-207395422. Applied change to temp map.
May 7 17:07:09 node02 Hostd:[info] Activation [N5Vmomi10ActivationE:0x54e4ab20] : Invoke done [DeleteDirectory] on [vim.DatastoreNamespaceManager:ha-datastore-namespace-manager]
May 7 17:07:09 node02 Hostd:[verbose] Arg datacenter:
May 7 17:07:09 node02 Hostd:[-->]
May 7 17:07:09 node02 Hostd:[verbose] Arg datastorePath:
May 7 17:07:09 node02 Hostd:[-->]
May 7 17:07:09 node02 Hostd:[info] Throw vim.fault.FileNotFound
May 7 17:07:09 node02 Hostd:[info] Result:
May 7 17:07:09 node02 Hostd:[-->] {
May 7 17:07:09 node02 Hostd:[-->] faultCause = (vmodl.MethodFault) null,
May 7 17:07:09 node02izableMessage) [
May 7 17:07:09 node02izableMessage) {
May 7 17:07:09 node02 Hostd:[-->] key = "com.vmware.esx.hostctl.default",
May 7 17:07:09 node02 Hostd:[-->] arg = (vmodl.KeyAnyValue) [
May 7 17:07:09 node02 Hostd:[-->] (vmodl.KeyAnyValue) {
May 7 17:07:09 node02 Hostd:[-->] key = "reason",
May 7 17:07:09 node02 Hostd:[-->] value = "Could not get ObjectStoreFileSystem for (File Not Found)"
May 7 17:07:09 node02 Hostd:[-->] }
May 7 17:07:09 node02 Hostd:[-->] ],
May 7 17:07:09 node02 Hostd:[-->] message = <unset>
May 7 17:07:09 node02 Hostd:[-->] }
May 7 17:07:09 node02 Hostd:[-->] ],
May 7 17:07:09 node02 Hostd:[-->] file = ""
May 7 17:07:09 node02 Hostd:[-->] msg = ""
May 7 17:07:09 node02 Hostd:[-->]
==> vmkernel.log <==
May 7 17:07:09 vxrail-node02.vsphere.local.vsphere.local vmkernel:[cpu5:68973] 12235: VC opID 2e5e7ee8-01-45-aba8 maps to vmkernel opID badcf7bd
May 7 17:07:09 vxrail-node02.vsphere.local.vsphere.local vmkernel:[cpu5:68973] OSFS_CreateFile:168: mkdir not enabled, failing mkdir request (pid: [ vsan], cid: 5292a6b5bdfbb488-d9b171feda0214ed, childName: new_vm2)
@saltstack/team-cloud -- I read that a vSAN datastore is a namespace object, which explains why mkdir fails. This lines up with the command working on local storage.
Does salt-cloud's vCenter integration functionality need to be enhanced to use objtool or osfs-mkdir for vSAN storage?
Will this get any additional attention?
@nmadhok can you take a look at this?
Hey @wattwood I'm going to start taking this over today. After I get my environment setup to address this I'll swing back - there also may be another python package to make this work. Recently I've been working with vmware's vcloud, which they re-named to their automation-sdk but there may be some tools in there that can also address this.
I think I have my environment setup correctly now, can you provide the command you ran to reproduce this? So far I have salt-cloud -f test_vcenter_connection vmware
returning fine.
Sorry, I didn't see this. The connection is fine, it's creating a VM that fails. The VM config is in the original post (above).
Technically I'm cloning from an existing VM template that's on the VSAN
@xeacott were you able to repro this?
Description of Issue/Question
When attempting to create a VM on vCenter 6.5 using Salt Cloud on a VSAN, the creation fails. When applying the same configuration to local ESXI storage, the VM is created.
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)