Foreman 2.0: Not able find disk unit while creating new VM

**Problem: Not able to provision new vm on vmware compute resource.
I am getting error “Failed to create a compute vCenter - xxxxx instance xxxx@example.com: InvalidDeviceSpec: Invalid configuration for device ‘2’.”

**Expected outcome: disk volume should get recognize while provisioning.

**Foreman and Proxy versions: foreman 2.0

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:
tried adding below debug, in create_vm.rb to get device id. Please check below logs for more details
Rails.logger.info("******************** disk #{disk}")
Rails.logger.info("******************** disk after setting attributes #{disk}")
Rails.logger.info("******************** vm config #{vm_cfg} #{vm_cfg.inspect}")


Hello,

I can see similar issue has been fixed in fog -> https://github.com/fog/fog/pull/1424 . Maybe @Chris_Roberts can help in this case. Request to provide you production.log file when issue is reproducible.

1 Like

@upadhyeammit Thank you for your response, please find logs below.

Hi @preetesh I will start looking at this, sorry for the delay. I was out last week.

1 Like