[
https://issues.apache.org/jira/browse/VCL-977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andy Kurth updated VCL-977:
---------------------------
Description:
Under some circumstances a VM may become _invalid_. It looks like this:
!invalid.png!
VCL will fail to load a VM if an _invalid_ VM exists on the host that is using
the same .vmx file path as the new VM. As you can see in the image, there are
3 _invalid_ VMs all using the same computer, _vi1-154_. Each VM had been
loaded with a different image revision. If you attempt to load the same VM
with any of the same revisions, the VMware host would not allow the new VM to
be registered because it finds the existing _invalid_ VM using the same .vmx
path. The following appears in *vcld.log*:
{noformat}
VIM_SSH.pm:_run_vim_cmd|265| ---- WARNING ----
VIM_SSH.pm:_run_vim_cmd|265| 2016-07-27
11:35:17VIM_SSH.pm:_run_vim_cmd|265|attempt 1/5: failed to execute command on
VM host blade1a5-3: vim-cmd solo/registervm
"/vmfs/volumes/local/vi1-154_3705-v6/vi1-154_3705-v6.vmx", exit status: 1,
output:
VIM_SSH.pm:_run_vim_cmd|265| (vim.fault.AlreadyExists) {
VIM_SSH.pm:_run_vim_cmd|265| faultCause = (vmodl.MethodFault) null,
VIM_SSH.pm:_run_vim_cmd|265| name = "135",
VIM_SSH.pm:_run_vim_cmd|265| msg = "The specified key, name, or identifier
'135' already exists."
VIM_SSH.pm:_run_vim_cmd|265| }
VIM_SSH.pm:_run_vim_cmd|265| ( 0) VIM_SSH.pm, _run_vim_cmd (line: 265)
VIM_SSH.pm:_run_vim_cmd|265| (-1) VIM_SSH.pm, vm_register (line: 1417)
VIM_SSH.pm:_run_vim_cmd|265| (-2) VMware.pm, load (line: 548)
VIM_SSH.pm:_run_vim_cmd|265| (-3) new.pm, reload_image (line: 634)
VIM_SSH.pm:_run_vim_cmd|265| (-4) new.pm, process (line: 277)
VIM_SSH.pm:_run_vim_cmd|265| (-5) vcld, make_new_child (line: 587)
{noformat}
The code is not detecting the existing _invalid_ VM because it is ignoring the
_Skipping invalid VM_ lines returned from {{vim-cmd vmsvc/getallvms}}:
{noformat}
blade1a5-3:~ $ vim-cmd vmsvc/getallvms
Skipping invalid VM '142'
Skipping invalid VM '148'
Skipping invalid VM '149'
Vmid Name File
Guest OS Version Annotation
162 vi1-152:win7-ISE716Test-3796-v3 (shared) [local]
vi1-152_3796-v3/vi1-152_3796-v3.vmx windows7_64Guest vmx-07
{noformat}
The invalid VMs can be unregistered via {{vim-cmd vmsvc/unregister}}. The code
could be updated to try to unregister _invalid_ VMs if it fails to register a
.vmx file.
was:
Under some circumstances a VM may become _invalid_. It looks like this:
VCL will fail to load a VM if an _invalid_ VM exists on the host that is using
the same .vmx file path as the new VM. As you can see in the image, there are
3 _invalid_ VMs all using the same computer, _vi1-154_. Each VM had been
loaded with a different image revision. If you attempt to load the same VM
with any of the same revisions, the VMware host would not allow the new VM to
be registered because it finds the existing _invalid_ VM using the same .vmx
path. The following appears in *vcld.log*:
{noformat}
VIM_SSH.pm:_run_vim_cmd|265| ---- WARNING ----
VIM_SSH.pm:_run_vim_cmd|265| 2016-07-27
11:35:17VIM_SSH.pm:_run_vim_cmd|265|attempt 1/5: failed to execute command on
VM host blade1a5-3: vim-cmd solo/registervm
"/vmfs/volumes/local/vi1-154_3705-v6/vi1-154_3705-v6.vmx", exit status: 1,
output:
VIM_SSH.pm:_run_vim_cmd|265| (vim.fault.AlreadyExists) {
VIM_SSH.pm:_run_vim_cmd|265| faultCause = (vmodl.MethodFault) null,
VIM_SSH.pm:_run_vim_cmd|265| name = "135",
VIM_SSH.pm:_run_vim_cmd|265| msg = "The specified key, name, or identifier
'135' already exists."
VIM_SSH.pm:_run_vim_cmd|265| }
VIM_SSH.pm:_run_vim_cmd|265| ( 0) VIM_SSH.pm, _run_vim_cmd (line: 265)
VIM_SSH.pm:_run_vim_cmd|265| (-1) VIM_SSH.pm, vm_register (line: 1417)
VIM_SSH.pm:_run_vim_cmd|265| (-2) VMware.pm, load (line: 548)
VIM_SSH.pm:_run_vim_cmd|265| (-3) new.pm, reload_image (line: 634)
VIM_SSH.pm:_run_vim_cmd|265| (-4) new.pm, process (line: 277)
VIM_SSH.pm:_run_vim_cmd|265| (-5) vcld, make_new_child (line: 587)
{noformat}
The code is not detecting the existing _invalid_ VM because it is ignoring the
_Skipping invalid VM_ lines returned from {{vim-cmd vmsvc/getallvms}}:
{noformat}
blade1a5-3:~ $ vim-cmd vmsvc/getallvms
Skipping invalid VM '142'
Skipping invalid VM '148'
Skipping invalid VM '149'
Vmid Name File
Guest OS Version Annotation
162 vi1-152:win7-ISE716Test-3796-v3 (shared) [local]
vi1-152_3796-v3/vi1-152_3796-v3.vmx windows7_64Guest vmx-07
{noformat}
The invalid VMs can be unregistered via {{vim-cmd vmsvc/unregister}}. The code
could be updated to try to unregister _invalid_ VMs if it fails to register a
.vmx file.
> VMware may fail to register VM if existing invalid VM is registered
> -------------------------------------------------------------------
>
> Key: VCL-977
> URL: https://issues.apache.org/jira/browse/VCL-977
> Project: VCL
> Issue Type: Improvement
> Components: vcld (backend)
> Affects Versions: 2.4.2
> Reporter: Andy Kurth
> Fix For: 2.5
>
> Attachments: invalid.png
>
>
> Under some circumstances a VM may become _invalid_. It looks like this:
> !invalid.png!
> VCL will fail to load a VM if an _invalid_ VM exists on the host that is
> using the same .vmx file path as the new VM. As you can see in the image,
> there are 3 _invalid_ VMs all using the same computer, _vi1-154_. Each VM
> had been loaded with a different image revision. If you attempt to load the
> same VM with any of the same revisions, the VMware host would not allow the
> new VM to be registered because it finds the existing _invalid_ VM using the
> same .vmx path. The following appears in *vcld.log*:
> {noformat}
> VIM_SSH.pm:_run_vim_cmd|265| ---- WARNING ----
> VIM_SSH.pm:_run_vim_cmd|265| 2016-07-27
> 11:35:17VIM_SSH.pm:_run_vim_cmd|265|attempt 1/5: failed to execute command on
> VM host blade1a5-3: vim-cmd solo/registervm
> "/vmfs/volumes/local/vi1-154_3705-v6/vi1-154_3705-v6.vmx", exit status: 1,
> output:
> VIM_SSH.pm:_run_vim_cmd|265| (vim.fault.AlreadyExists) {
> VIM_SSH.pm:_run_vim_cmd|265| faultCause = (vmodl.MethodFault) null,
> VIM_SSH.pm:_run_vim_cmd|265| name = "135",
> VIM_SSH.pm:_run_vim_cmd|265| msg = "The specified key, name, or identifier
> '135' already exists."
> VIM_SSH.pm:_run_vim_cmd|265| }
> VIM_SSH.pm:_run_vim_cmd|265| ( 0) VIM_SSH.pm, _run_vim_cmd (line: 265)
> VIM_SSH.pm:_run_vim_cmd|265| (-1) VIM_SSH.pm, vm_register (line: 1417)
> VIM_SSH.pm:_run_vim_cmd|265| (-2) VMware.pm, load (line: 548)
> VIM_SSH.pm:_run_vim_cmd|265| (-3) new.pm, reload_image (line: 634)
> VIM_SSH.pm:_run_vim_cmd|265| (-4) new.pm, process (line: 277)
> VIM_SSH.pm:_run_vim_cmd|265| (-5) vcld, make_new_child (line: 587)
> {noformat}
> The code is not detecting the existing _invalid_ VM because it is ignoring
> the _Skipping invalid VM_ lines returned from {{vim-cmd vmsvc/getallvms}}:
> {noformat}
> blade1a5-3:~ $ vim-cmd vmsvc/getallvms
> Skipping invalid VM '142'
> Skipping invalid VM '148'
> Skipping invalid VM '149'
> Vmid Name File
> Guest OS Version Annotation
> 162 vi1-152:win7-ISE716Test-3796-v3 (shared) [local]
> vi1-152_3796-v3/vi1-152_3796-v3.vmx windows7_64Guest vmx-07
> {noformat}
> The invalid VMs can be unregistered via {{vim-cmd vmsvc/unregister}}. The
> code could be updated to try to unregister _invalid_ VMs if it fails to
> register a .vmx file.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)