{"id":3180,"date":"2020-08-17T13:12:59","date_gmt":"2020-08-17T11:12:59","guid":{"rendered":"https:\/\/www.mariotti.de\/?p=3180"},"modified":"2020-08-17T13:12:59","modified_gmt":"2020-08-17T11:12:59","slug":"new-vm-fehler-the-number-of-network-adapter-settings-in-the-customization-specification-does-not-match","status":"publish","type":"post","link":"https:\/\/dev.mariotti.de\/?p=3180","title":{"rendered":"New-VM Fehler &#8222;The number of network adapter settings in the customization specification does not match&#8230;&#8220;"},"content":{"rendered":"<p>Ich stand vor kurzem vor der Problematik, dass es beim Klonen von VMs mittels dem New-VM PowerShell Cmdlet in Kombination mit einem Template ohne Netzwerkkarte und einet Guest OS Customization Specification, die eigentlich keine Netzwerkkonfiguration beinhaltet hat immer zu folgendem Fehler gab:<\/p>\n<p>The operation for the entity &#8222;TemplateName&#8220; failed with the following message: &#8222;The number of network adapter settings in the customization specification: 1 does not match the number of network adapters present in the virtual machine: 0.&#8220;<\/p>\n<p>Der springende Punkt ist, dass jeden Guest OS Customization Specification bereits standardm\u00e4\u00dfig die Konfiguration f\u00fcr eine Netzwerkkarte beinhaltet, selbst wenn man keine hinzugef\u00fcgt hat. Die einfachste L\u00f6sung f\u00fcr diese Problematik besteht darin, dass man diese standardm\u00e4\u00dfig vorhanden Netzwerkkarte vorab aus der Guest OS Customization Specification entfern. Hier ein entsprechendes Beispiel:<\/p>\n<p>&nbsp;<\/p>\n<pre><code class=\"language-powershell\">       If ($(Get-Template $TemplateObject  | Get-NetworkAdapter).count -eq 0) {\n            Remove-OSCustomizationNicMapping $(Get-OSCustomizationSpec $OSCustomSpec | Get-OSCustomizationNicMapping) -Confirm:$false\n        }\n <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Die L\u00f6sung f\u00fcr den The operation for the entity &#8222;TemplateName&#8220; failed with the following message: &#8222;The number of network adapter settings in the customization specification: 1 does not match the number of network adapters present in the virtual machine: 0.&#8220; Fehler<\/p>\n","protected":false},"author":2,"featured_media":2425,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-3180","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"_links":{"self":[{"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/posts\/3180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3180"}],"version-history":[{"count":0,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/posts\/3180\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=\/wp\/v2\/media\/2425"}],"wp:attachment":[{"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.mariotti.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}