Kickstart - VMWare: VM with wrong number of cores

vmware
provisioning

#1

Problem:
I’m provisioning several new servers network based with kickstart, sometimes I need to build a server with more than 1 core, eg 1 CPU and 4 core:
1

All steps went fine but I’ve only 1 CPU and 1 core available each time into the server, from vmware vcentre I’ve this:

2

3

4

and I’ve to change the core numbers manually and after that it works properly, eg. 1 CPU and 4 cores.
I’m running al old vmware esxi, version 6.0 and I’ve to use the Virtual Machine Version 8 (latest red hat for vm8 is 6) in order to be able to migrate the servers datastore…I don’t know if it will be a problem.

Expected outcome:

A VM with the required number of cores/cpu

Foreman and Proxy versions:

1.20.1
the same issue was present in 1.19.1

Foreman and Proxy plugin versions:
katello 3.9.1
the same issue was present in 3.8

Other relevant data:

The VM creation log seems correct: “cpus”=>“1”, “corespersocket”=>“4”,


2019-01-25T11:43:57 [I|app|6f22c] Processing by HostsController#create as */*
2019-01-25T11:43:57 [I|app|6f22c]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"+IKQ/i4rxqqc8LYBwRqRuIrAOmfDVNYELgCe2Ei0y0AXkGrXiCOyGcPsc3nwLy6g
z1Dj/BuMEPQ47/kuS7lqOA==", "host"=>{"name"=>"myserver", "organization_id"=>"1", "location_id"=>"4", 
"hostgroup_id"=>"15", "compute_profile_id"=>"3", "content_facet_attributes"=>
{"lifecycle_environment_id"=>"1", "content_view_id"=>"2", "content_source_id"=>"1"}, 
"ansible_role_ids"=>[""], "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"true", 
"progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>
{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"myserver", 
"domain_id"=>"1", "subnet_id"=>"8", "ip"=>"10.170.243.101", "ip6"=>"", "managed"=>"1", "primary"=>"1", 
"provision"=>"1", "execution"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>"", "compute_attributes"=>
{"type"=>"VirtualVmxnet3", "network"=>"network-12807"}}}, "compute_attributes"=>{"cpus"=>"1", 
"corespersocket"=>"4", "memory_mb"=>"8192", "firmware"=>"bios", "cluster"=>"BSOL Production Cluster
 1", "resource_pool"=>"Resources", "path"=>"/Datacenters/VM1", "guest_id"=>"rhel6_64Guest", 
"hardware_version"=>"vmx-08", "memoryHotAddEnabled"=>"0", "cpuHotAddEnabled"=>"0", 
"add_cdrom"=>"0", "start"=>"1", "scsi_controllers"=>"{\"scsiControllers\":
[{\"type\":\"ParaVirtualSCSIController\",\"key\":1000}],\"volumes\":[{\"thin\":true,\"name\":\"Hard 
disk\",\"mode\":\"persistent\",\"controllerKey\":1000,\"size\":94371840,\"sizeGb\":90,\"datastore\":\"UNITY2\
"}]}"}, "architecture_id"=>"1", "operatingsystem_id"=>"8", "provision_method"=>"build", "build"=>"1", 
"medium_id"=>"11", "ptable_id"=>"139", "pxe_loader"=>"PXELinux BIOS", "disk"=>"", "root_pass"=>"
[FILTERED]", "is_owned_by"=>"4-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, 
"media_selector"=>"install_media"}
2019-01-25T11:43:57 [I|app|6f22c] Current user set to admin (admin)
2019-01-25T11:44:02 [I|blo|6f22c] Unattended render of 'Kickstart default PXELinux' = '1fa66c965a1f46c665c6de6b51e57c322e3439cb0e25a1fc21cb0aad91a5b741'
# This file was deployed via 'Kickstart default PXELinux' template


DEFAULT menu
MENU TITLE Booting into OS installer (ESC to stop)
TIMEOUT 100
ONTIMEOUT installer

LABEL installer
  MENU LABEL Kickstart default PXELinux
  KERNEL boot/red-hat-el-7-6-WR388WVded-vmlinuz
  APPEND initrd=boot/red-hat-el-7-6-WR388WVded-initrd.img ks=http://myforeman.mylan.domain:8000/unattended/provision?token=03933118-26d1-403a-81e0-28d3b5c06d4b  network ksdevice=bootif ks.device=bootif BOOTIF=00-00-50-56-b3-18-db kssendmac ks.sendmac inst.ks.sendmac ip=10.170.243.101::10.170.243.1:255.255.255.0:::none nameserver=10.170.242.57 nameserver=10.140.16.20
  IPAPPEND 2

2019-01-25T11:44:02 [I|app|6f22c] Deploying TFTP PXELinux configuration for myserver.mylan.domain
2019-01-25T11:44:02 [I|blo|6f22c] Unattended render of 'Kickstart default PXEGrub2' = 'fadfc654cdf8de619ce1d3de259b105baef341598dd2fd92c8f6113680a63631'
# This file was deployed via 'Kickstart default PXEGrub2' template


set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
  linuxefi boot/red-hat-el-7-6-WR388WVded-vmlinuz ks=http://myforeman.mylan.domain:8000/unattended/provision?token=03933118-26d1-403a-81e0-28d3b5c06d4b  network ksdevice=bootif ks.device=bootif BOOTIF=00-00-50-56-b3-18-db kssendmac ks.sendmac inst.ks.sendmac ip=10.170.243.101::10.170.243.1:255.255.255.0:::none nameserver=10.170.242.57 nameserver=10.140.16.20 BOOTIF=01-$net_default_mac
  initrdefi boot/red-hat-el-7-6-WR388WVded-initrd.img
}

2019-01-25T11:44:02 [I|app|6f22c] Deploying TFTP PXEGrub2 configuration for myserver.mylan.domain
2019-01-25T11:44:03 [I|blo|6f22c] Unattended render of 'Kickstart default PXEGrub' = '0a8d023503ff8b57b1cfeed133bde6dbd3ec4127c516f5402f5f4100272988ff'
# This file was deployed via 'Kickstart default PXEGrub' template


default=0
timeout=10

title Kickstart default PXEGrub
  root (nd)
  kernel (nd)/../boot/red-hat-el-7-6-WR388WVded-vmlinuz ks=http://myforeman.mylan.domain:8000/unattended/provision?token=03933118-26d1-403a-81e0-28d3b5c06d4b  network ksdevice=bootif ks.device=bootif BOOTIF=00-00-50-56-b3-18-db kssendmac ks.sendmac inst.ks.sendmac ip=10.170.243.101::10.170.243.1:255.255.255.0:::none nameserver=10.170.242.57 nameserver=10.140.16.20
  initrd (nd)/../boot/red-hat-el-7-6-WR388WVded-initrd.img

2019-01-25T11:44:03 [I|app|6f22c] Deploying TFTP PXEGrub configuration for myserver.mylan.domain
2019-01-25T11:44:03 [I|blo|6f22c] Unattended render of 'Kickstart default iPXE' = '73abdc845b3ceac0b973d019fe7aa09ee5902e809435209c0a550236a81ae137'
#!gpxe




kernel ftp://myforeman.mylan.domain/pub/RHEL_7.6DVD/images/pxeboot/vmlinuz initrd=initrd.img ks=http://myforeman.mylan.domain:8000/unattended/provision?token=03933118-26d1-403a-81e0-28d3b5c06d4b inst.stage2=ftp://myforeman.mylan.domain/pub/RHEL_7.6DVD  &static=yes ksdevice=00:50:56:b3:18:db network kssendmac ks.sendmac inst.ks.sendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns}
initrd ftp://myforeman.mylan.domain/pub/RHEL_7.6DVD/images/pxeboot/initrd.img

boot

2019-01-25T11:44:03 [I|app|6f22c] Deploying TFTP iPXE configuration for myserver.mylan.domain
2019-01-25T11:44:03 [I|app|6f22c] Fetching required TFTP boot files for myserver.mylan.domain
2019-01-25T11:44:03 [I|app|6f22c] Powering up Compute instance for myserver.mylan.domain
2019-01-25T11:44:05 [I|app|6f22c] Processed 8 tasks from queue 'Host::Managed Main', completed 8/8
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on mac 00:50:56:b3:18:db
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on ip 10.170.243.101
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on type Nic::Managed
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on name myserver.mylan.domain
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on host_id 313
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on subnet_id 8
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on domain_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on attrs {}
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on provider
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on username
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on password [redacted]
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on virtual false
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on link true
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on identifier
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on tag
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on attached_to
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on managed true
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on mode balance-rr
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on attached_devices
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on bond_options
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on primary true
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on provision true
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on compute_attributes {"type"=>"VirtualVmxnet3", "network"=>"network-12807"}
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on ip6
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on subnet6_id
2019-01-25T11:44:05 [I|aud|6f22c] Nic::Managed (377) create event on execution true
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on host_id 313
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on uuid
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on content_view_id 2
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on lifecycle_environment_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on kickstart_repository_id
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on content_source_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on installable_security_errata_count 0
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on installable_enhancement_errata_count 0
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on installable_bugfix_errata_count 0
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on applicable_rpm_count 0
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (286) create event on upgradable_rpm_count 0
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on name myserver.mylan.domain
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on root_pass $5$a+TQPuF1$Uv6HeKjBDvO9rUpH6qRF9Gu6eBgoLhVvhYFfzusiDp6
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on architecture_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on operatingsystem_id 8
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on environment_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on ptable_id 139
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on medium_id 11
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on build true
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on comment Production CBIS back office 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on disk
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on installed_at
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on model_id
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on hostgroup_id 15
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on owner_id 4
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on owner_type User
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on enabled true
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on puppet_ca_proxy_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on managed true
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on use_image
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on image_file
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on uuid 5033b788-b019-2176-28d0-5407bbcfe711
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on compute_resource_id 2
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on puppet_proxy_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on certname
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on image_id
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on organization_id 1
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on location_id 4
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on otp
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on realm_id
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on compute_profile_id 3
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on provision_method build
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on grub_pass $5$a+TQPuF1$Uv6HeKjBDvO9rUpH6qRF9Gu6eBgoLhVvhYFfzusiDp6
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on pxe_loader PXELinux BIOS
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on monitoring_proxy_id
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on initiated_at
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on build_errors
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on content_facet_attributes {"id"=>286, "host_id"=>313, "uuid"=>nil, "content_view_id"=>2, "lifecycle_environment_id"=>1, "kickstart_repository_id"=>nil, "content_source_id"=>1, "installable_security_errata_count"=>0, "installable_enhancement_errata_count"=>0, "installable_bugfix_errata_count"=>0, "applicable_rpm_count"=>0, "upgradable_rpm_count"=>0}
2019-01-25T11:44:05 [I|aud|6f22c] Host::Base (313) create event on ansible_role_ids []
2019-01-25T11:44:05 [I|app|6f22c] Remove puppet certificate for myserver.mylan.domain
2019-01-25T11:44:05 [I|app|] Started GET "/tasks/226ec203-e010-4ab7-8390-7e25c7657010" for 10.140.10.13 at 2019-01-25 11:44:05 +0000
2019-01-25T11:44:08 [I|app|6f22c] Adding autosign entry for myserver.mylan.domain
2019-01-25T11:44:08 [I|app|6f22c] Processed 2 tasks from queue 'Host::Managed Post', completed 2/2
2019-01-25T11:44:08 [I|app|6f22c] Redirected to https://myforeman/hosts/myserver.mylan.domain
2019-01-25T11:44:08 [I|app|6f22c] Completed 302 Found in 10498ms (ActiveRecord: 441.4ms)
2019-01-25T11:44:08 [I|app|] Started GET "/hosts/myserver.mylan.domain" for 10.140.10.13 at 2019-01-25 11:44:08 +0000


#2

Hey @kraba

I will start to take a look at this and hope to have something for you by next week. Sorry for the issues you are hitting.


#3

Thanks a lot! If you need some test/logs/debug I’m glad to provide they.


#4

@kraba

Can I have you apply this patch for me and send me your production.log?

https://gist.githubusercontent.com/timogoebel/5fb28601d3722c538cc2dddab80d668c/raw/b9c7b781524f659b6ff44a7f2e3fb3e1a2422292/0001-add-vmware-debug-commands.patch

Restart httpd and try to build another host.

you can email it to me if you want at chrobert@redhat.com