Bug #17348
closedCannot create a new host deployed on XenServer
Description
Hi,
I have problem with create a new host on xenserver.
When my settings is complete (see attachs) and click to submit, nothing happend.
Foreman log is following:
2016-11-15 14:46:35 15c8d5a2 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"x+ISUk2fl/NpElDJTsExJdh8eWaD1TaqfmB87HDGMzEstneHEzsO829JAtY8k3lyHLQadPea9/aIVjNTDtpByQ==", "host"=>{"name"=>"testing", "hostgroup_id"=>"", "compute_resource_id"=>"10", "compute_profile_id"=>"2", "environment_id"=>"1", "puppet_ca_proxy_id"=>"2", "puppet_proxy_id"=>"2", "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"00:50:56:00:00:95", "identifier"=>"eth0", "name"=>"testing", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.0.95", "ip6"=>"", "managed"=>"0", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "compute_attributes"=>{"vcpus_max"=>"16", "memory_min"=>"2147483648", "memory_max"=>"2147483648", "custom_template_name"=>"foreman_template_1.3", "xenstore"=>{"vm-data"=>{"ifs"=>{"0"=>{"ip"=>"192.168.0.95", "gateway"=>"", "netmask"=>"255.255.252.0"}}, "nameserver1"=>"192.168.1.1", "nameserver2"=>"192.168.16.1", "environment"=>"production"}}, "VBDs"=>{"sr_uuid"=>"1a3439d2-5536-2f22-7574-35c4d0044fc7", "physical_size"=>"5"}, "VIFs"=>{"print"=>"Bond 0+1"}, "hypervisor_host"=>"bart", "start"=>"1"}, "architecture_id"=>"1", "operatingsystem_id"=>"3", "provision_method"=>"build", "build"=>"1", "medium_id"=>"1", "ptable_id"=>"52", "pxe_loader"=>"None", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build", "provider"=>"Xenserver", "bare_metal_capabilities"=>"build"}
2016-11-15 14:46:35 15c8d5a2 [app] [I] Failed to save:
Files
Updated by Anonymous about 8 years ago
I don't really have an idea for that... does it work without using a VM template? or when using a builtin template?
Updated by Zbynek Nemas about 8 years ago
Michael Moll wrote:
I don't really have an idea for that... does it work without using a VM template? or when using a builtin template?
Virtual machine is created on xenserver without (and builtin) using VM template, but VM still doesn´t appear in foreman and same output in foreman log - [app] [I] Failed to save
Updated by Anonymous about 8 years ago
could you enabled debug logging and try again, maybe there are more informations in the log then, but it feels like some error from fog or xenserver is just silently swallowed.
Updated by Neil Hanlon about 8 years ago
- Pull request https://github.com/theforeman/foreman-xen/pull/48 added
I've been able to hunt this down and figured out the cause.
XenServer is indeed swallowing the error because the vcpus_at_startup param is being set before vcpus_max, and XAPI will not allow the # at startup to be > max.
I've opened a PR for this fix. Just swapping two lines. I do want to test it against XenServer 7, but it works against XenServer 6.5 (latest)
See: http://discussions.citrix.com/topic/284247-setting-vcpu-settings-for-hvm-guest/
The other option is probably to set them at the same time, but I don't think the API implementation supports this.
Updated by Anonymous about 8 years ago
Zbyněk, could you test the patch in the pull request?
Updated by Anonymous about 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset foreman-xen|eb01c2258abc8d806801b14ac074330cc35512b7.