Bug #27456
openIssue when creating VM
Description
When creating a host using image provisioning the VM from the image is in XEN successfully but stopped and foreman fails with this error:
2019-07-27T19:03:25 [W|app|ef32523b] Action failed | SyntaxError: (eval):1: syntax error, unexpected end-of-input, expecting ')' | ...dels::Host:0x000000000e064f10>) | ... ^ | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/connection.rb:64:in `eval' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/connection.rb:64:in `request' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/compute/requests/set_attribute.rb:6:in `set_attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/compute/models/instance_methods.rb:19:in `set_attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_xen-0.7.1/app/models/foreman_xen/xenserver.rb:542:in `set_vm_affinity' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_xen-0.7.1/app/models/foreman_xen/xenserver.rb:306:in `create_vm'
Updated by Alejandro Falcon over 5 years ago
Note: the foreman-xen folder shows 0.7.1 but it contains the latest code with the image provisioning changes. Foreman version is 1.21.0. PXE provisioning works fine.
Updated by Alejandro Falcon over 5 years ago
Well this is strange I just tried again several more times and now I get a different error:
2019-07-28T17:15:06 [I|app|8d594373] <Fog::XenServer::RequestFailed> VM.provision: ["UUID_INVALID", "sr", ""]
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/connection.rb:67:in `request'
/opt/theforeman/tfm/root/usr/share/gems/gems/fog-xenserver-1.0.0/lib/fog/xenserver/compute/requests/provision_server.rb:6:in `provision_server'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_xen-0.7.1/app/models/foreman_xen/xenserver.rb:364:in `create_vm_from_image'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_xen-0.7.1/app/models/foreman_xen/xenserver.rb:295:in `create_vm'