Hardware discrepancies when create a VM

Hi all,

I’m learning more and more about Foreman every day and really excited to use it!

We are running Foreman 16 on CentOS 7.

When creating a new VM I notice that some of the “hw” is not created as requested on the Foreman form - RAM usually works fine but the CPU/Core count is wrong, the disk is created as Thick although i checked Thin, can’t create an additional disk and some of the vm options are wrong.

Am I missing something? should I “fix” this by making a provisioning template that will confirm my hw needs?

Thanks!
Eli

Hello, which virtualization? Can you provide screenshot of Foreman form before submitting and then screenshot of VM settings?

Here is the form before submitting the create host request:

Here is the provisioning template (marked out some info):

<%-
  powershell = '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile'
-%>
---
identity:
  Sysprep:
    guiRunOnce:
      commandList:
        - '<%= powershell %> -Command "invoke-webrequest -Uri http://devforeman01/chef.ps1 -Outfile C:\Windows\Temp\chef.ps1"'
        - '<%= powershell %> -FIle "C:\Windows\Temp\chef.ps1"'
    #    - '<%= powershell %> -Command "invoke-webrequest -Uri <%= foreman_url("built") %>"'
    guiUnattended:
      autoLogon: true
      autoLogonCount: 1
      password:
        plainText: true
        value: 'testpass123'
      timeZone: 110
    identification:
      joinWorkgroup: 'WORKGROUP'
    licenseFilePrintData:
      autoMode: 'perSeat'
    userData:
      computerName: <%= @host.shortname %>
      fullName: 'NAME'
      orgName: 'ORG'
      productId: 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx'
nicSettingMap:
  - adapter:
      dnsDomain: <%= @host.domain %>
      dnsServerList:
        - <%= @host.subnet.dns_primary %>
      gateway:
        - <%= @host.subnet.gateway %>
      ip: <%= @host.ip %>
      subnetMask: <%= @host.subnet.mask %>
globalIPSettings:
  dnsServerList:
    - <%= @host.subnet.dns_primary %>
  dnsSuffixList:
    - <%= @host.domain %>
options:
  changeSID: true
  deleteAccounts: false

Here is a screen shot of the VM properties after it was created:
image

The size of the disk is coming from the template, though it is Thin provisioning on the template…:

Should I Use the provisioning template to fix this? any ideas what the issue is?
@tbrisker - I see that you make a change on the screen shot? Its not showing on the actual message but I got a notification that you edited it…

I just marked the provisioning template as pre-formatted text so it displays in an easier-to-read layout, I didn’t change anything in the content.

1 Like

Got it, thanks!

Is my issue common? did I miss-configure something?

Sorry, no idea about the error itself. Perhaps @lzap or @TimoGoebel will know?

Since it’s VMWare - no idea, sorry.

I guess this might be a bug because you are cloning the host from a vmware template. What Foreman does under the hood is cloning the template vm and then customizing the hardware. I think, making the disk thin provisioned either does not work at all or it’s not implemented correctly. Your provisioning template has nothing to do with this process, it’s Foreman (or the library we use to connect with vmware api).

I’d suggest opening an issue in our issue tracker (projects.theforeman.org) and say, that when you clone a VM on VMWare, it doesn’t customize all the fields.

Sorry, that I can’t offer a prompt solution.

Hi Timo, Thanks for the details - i’ll open an issue.

Do you think it would be better to clone a vm rather then a template?

As for the provisioning template, I thought using it as a temporary solution because it looks like there are some hardware related fields, i didn’t have a chance to test it yet…

Created the bug, let me know if you need more information:
http://projects.theforeman.org/issues/22959