hsato03 commented on PR #7859: URL: https://github.com/apache/cloudstack/pull/7859#issuecomment-1698213767
> @hsato03 , I am not allowed to import without NIC. But I cannot select a network either as there is none to select. > > I am trying your scenario from [#7859 (comment)](https://github.com/apache/cloudstack/pull/7859#issuecomment-1679387117) @DaanHoogland Looks like you still have a NIC on your VM in VMware; this way, trying to import it without selecting the NIC makes ACS throw the exception. The problem this PR intends to solve is that, when we have a VM without NIC and we add a NIC to it, we cannot set it as the default NIC. A way to reproduce this situation is importing a VM that does not have a NIC in VMware. To reproduce the situation I did the following: 1. created a VM in ACS; 2. unmanaged the VM from ACS; 3. via vCenter, I removed the VM's NIC. This is what the VM looks like in vCenter:  Then, I imported the VM to ACS. This is the import form when a VM does not have NIC on vCenter (the `Network adapter` field is not presented):  With that, the VM is successfully imported to ACS, however, without NIC:  Without this patch, we can attach a NIC to the VM, however, it would not be the default NIC and we would not be able to set it as the default NIC; ACS returns the message `Failed to find a nic profile for the existing default network. This is bad and probably means some sort of configuration corruption`. With the patch, the first NIC of the VM is set as the default, and we can manage it afterwards. @DaanHoogland, could you try following these steps? --- Despite this PR solves the situation where we cannot set the default NIC of the VM (given the situation I mentioned), should ACS allow importing VMs without NICs, as ACS does not allow creating VMs without NIC neither remove the default NIC?. @DaanHoogland, what do you think? I can open the discussion in an issue or in the mailing list if valid. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
