Create windows machine image based - network card disconnect

I am trying to install a windows machine-based image, template that I prepared.
Windows 2019 with sysprep.
When the installation finish to create the machine the network card is disconnect.
Does anyone familiar with this issue?
vmware 7.0.3

Thanks :slight_smile:

Hi @shaycohen11 What steps were you following in Foreman to make the VM template and workflow?

Sory for the late answer I didn’t sow it.
1 Create template in vcenter then do sysprep in the end of sysprep It shut down the machine.
2 Convert the machine to the template.
3 Adding the image to foreman ( computer_resources)
4. starting to create machine -file the details

5 virtual machine

6. operating system

7. netwrok card

Then submit.

Hope that answered the question


Hey thanks, will try to reproduce here.

If I am doing without foreman I don’t have this issue.
( VMware create machine from template)

Any update ? :frowning:

Super sorry for the delay, was trying to juggle a few issues along with dev work and fell behind.

Your issue is the last one left from my support rotation last week, so I am coming back to this.

I also pinged some of the Foreman guys to see if they have any idea why this could be happening.

Do you see any errors in the /var/log/foreman/production.log on your Foreman instance?

Adding the logs when I am creating a machine:

2023-07-18T18:54:57 [I|app|4c3195f0] Processing by HostsController#process_taxonomy as /
2023-07-18T18:54:57 [I|app|4c3195f0] Parameters: {“utf8”=>“✓”, “authenticity_token”=>“Mlob0AzKhss3C1sd6TYLzJkasqSyyegjrR+xPPWFjUzVeV50nOY0vhkbY0UXuGqqJLqrAGAb84rm7K/sqkH6Vw==”, “host”=>{“name”=>“gayle-jacoxshay”, “organization_id”=>“1”, “location_id”=>“3”, “hostgroup_id”=>“”, “compute_resource_id”=>“”, “compute_profile_id”=>“”, “content_facet_attributes”=>{“lifecycle_environment_id”=>“”, “content_view_id”=>“”, “content_source_id”=>“”}, “openscap_proxy_id”=>“”, “managed”=>“true”, “progress_report_id”=>“[FILTERED]”, “type”=>“Host::Managed”, “interfaces_attributes”=>{“0”=>{“_destroy”=>“0”, “type”=>“Nic::Managed”, “mac”=>“”, “identifier”=>“”, “name”=>“gayle-jacoxshay”, “domain_id”=>“”, “subnet_id”=>“”, “ip”=>“”, “ip6”=>“”, “managed”=>“1”, “primary”=>“1”, “provision”=>“1”, “execution”=>“1”, “virtual”=>“0”, “tag”=>“”, “attached_to”=>“”}}, “architecture_id”=>“”, “operatingsystem_id”=>“”, “provision_method”=>“build”, “build”=>“1”, “medium_id”=>“”, “ptable_id”=>“”, “disk”=>“”, “root_pass”=>“[FILTERED]”, “is_owned_by”=>“6-Users”, “enabled”=>“1”, “model_id”=>“”, “comment”=>“”, “overwrite”=>“false”}, “fakepassword”=>“[FILTERED]”}
2023-07-18T18:54:57 [I|app|4c3195f0] Completed 200 OK in 407ms (Views: 359.1ms | ActiveRecord: 21.4ms | Allocations: 253984)
2023-07-18T18:54:57 [I|app|a1b86df8] Started POST “/hosts/interfaces” for at 2023-07-18 18:54:57 +0300
2023-07-18T18:54:58 [I|app|a1b86df8] Processing by HostsController#interfaces as /
2023-07-18T18:54:58 [I|app|a1b86df8] Parameters: {“utf8”=>“✓”, “authenticity_token”=>“cyBAlrIPmvGxJRj3m1+IGCsHdFJLBEQICDa3QZPIiU2UAwUyIiMohJ81IK9l0el+lqdt9pnWX6FDxamRzAz+Vg==”, “host”=>{“name”=>“gayle-jacoxshay”, “organization_id”=>“1”, “location_id”=>“3”, “hostgroup_id”=>“”, “compute_resource_id”=>“”, “compute_profile_id”=>“”, “content_facet_attributes”=>{“lifecycle_environment_id”=>“”, “content_view_id”=>“”, “content_source_id”=>“”}, “openscap_proxy_id”=>“”, “managed”=>“true”, “progress_report_id”=>“[FILTERED]”, “type”=>“Host::Managed”, “interfaces_attributes”=>{“0”=>{“_destroy”=>“0”, “type”=>“Nic::Managed”, “mac”=>“”, “identifier”=>“”, “name”=>“gayle-jacoxshay”, “domain_id”=>“”, “subnet_id”=>“”, “ip”=>“”, “ip6”=>“”, “managed”=>“1”, “primary”=>“1”, “provision”=>“1”, “execution”=>“1”, “virtual”=>“0”, “tag”=>“”, “attached_to”=>“”}}, “architecture_id”=>“”, “operatingsystem_id”=>“”, “provision_method”=>“build”, “build”=>“1”, “medium_id”=>“”, “ptable_id”=>“”, “disk”=>“”, “root_pass”=>“[FILTERED]”, “is_owned_by”=>“6-Users”, “enabled”=>“1”, “model_id”=>“”, “comment”=>“”, “overwrite”=>“false”}, “fakepassword”=>“[FILTERED]”}
2023-07-18T18:54:58 [I|app|8ab554c4] Started GET “/ansible/ui_ansible_roles?page=1&per_page=10&search=&resource_name=Host” for at 2023-07-18 18:54:58 +0300
2023-07-18T18:54:58 [I|app|8ab554c4] Processing by UiAnsibleRolesController#index as JSON
2023-07-18T18:54:58 [I|app|8ab554c4] Parameters: {“page”=>“1”, “per_page”=>“10”, “search”=>“”, “resource_name”=>“Host”}
2023-07-18T18:54:58 [I|app|8ab554c4] Rendered /usr/share/gems/gems/foreman_ansible-10.4.2/app/views/ui_ansible_roles/index.json.rabl within api/v2/layouts/index_layout (Duration: 19.7ms | Allocations: 11075)
2023-07-18T18:54:58 [I|app|a1b86df8] Completed 200 OK in 201ms (Views: 168.9ms | ActiveRecord: 9.0ms | Allocations: 129078)
2023-07-18T18:54:58 [I|app|8ab554c4] Rendered layout api/v2/layouts/index_layout.json.erb (Duration: 28.4ms | Allocations: 17194)
2023-07-18T18:54:58 [I|app|8ab554c4] Completed 200 OK in 38ms (Views: 28.0ms | ActiveRecord: 2.5ms | Allocations: 19618)
2023-07-18T18:55:00 [I|app|6375b1f5] Started POST “/hosts/process_hostgroup” for at 2023-07-18 18:55:00 +0300
2023-07-18T18:55:00 [I|app|6375b1f5] Processing by HostsController#process_hostgroup as /
2023-07-18T18:55:00 [I|app|6375b1f5] Parameters: {“utf8”=>“✓”, “authenticity_token”=>“cyBAlrIPmvGxJRj3m1+IGCsHdFJLBEQICDa3QZPIiU2UAwUyIiMohJ81IK9l0el+lqdt9pnWX6FDxamRzAz+Vg==”, “host”=>{“name”=>“gayle-jacoxshay”, “organization_id”=>“1”, “location_id”=>“3”, “hostgroup_id”=>“24”, “content_facet_attributes”=>{“lifecycle_environment_id”=>“”, “content_view_id”=>“”, “content_source_id”=>“”}, “managed”=>“true”, “progress_report_id”=>“[FILTERED]”, “type”=>“Host::Managed”, “interfaces_attributes”=>{“0”=>{“_destroy”=>“0”, “type”=>“Nic::Managed”, “mac”=>“”, “identifier”=>“”, “name”=>“gayle-jacoxshay”, “domain_id”=>“”, “subnet_id”=>“”, “ip”=>“”, “ip6”=>“”, “managed”=>“1”, “primary”=>“1”, “provision”=>“1”, “execution”=>“1”, “virtual”=>“0”, “tag”=>“”, “attached_to”=>“”}}, “architecture_id”=>“”, “operatingsystem_id”=>“”, “provision_method”=>“build”, “build”=>“1”, “medium_id”=>“”, “ptable_id”=>“”, “disk”=>“”, “root_pass”=>“[FILTERED]”, “is_owned_by”=>“6-Users”, “enabled”=>“1”, “model_id”=>“”, “comment”=>“”, “overwrite”=>“false”}, “fakepassword”=>“[FILTERED]”}

I don’t see any tracebacks in the log output you posted so that is good, will keep looking at it. Do Linux builds from a template work fine?

Yes, but Linux I am creating a fresh machine. ( windows is form a template)

Anyway I can have you try a template with Linux to see if we get the same result?

I think the sysprep is causing the problem.
If I am not using sysprep the machine will go up with network card enable.

Hey @shaycohen11 Super sorry on the delay with this, had some stuff come up and then got lost in my things of to do.

Did you want to just use that as a work-around? We can file a redmine issue here to fix it eventually

Hi @cintrix84,
I haven’t found a solution yet.
I’ve resorted to working by selecting the boot disk. (I should mention that I worked with an external company that assisted me with foreman , but they also couldn’t find a solution.) :frowning: