-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VMNetwork adapter 'vEthernet (nat)*' not found #4445
Comments
@RomaricKanyamibwa, question on one of your comments:
|
@EmmanuelTsouris , yes, it is indeed installed; however, we reinstall it to ensure that the resulting AMI can be properly utilized by EC2. If this final step is not completed, the resulting AMI cannot be configured with a new user password. Consequently, unless we know the previous password used by the instance, accessing it becomes impossible. Concretely here is what we do at the end of the build of the AMI : # Finalize Image preparation by installing EC2Launchv2
mkdir $env:USERPROFILE\Desktop\EC2Launchv2
$Url = "https://s3.amazonaws.com/amazon-ec2launch-v2/windows/amd64/latest/AmazonEC2Launch.msi"
$DownloadFile = "$env:USERPROFILE\Desktop\EC2Launchv2\" + $(Split-Path -Path $Url -Leaf)
[Net.ServicePointManager]::SecurityProtocol += 'tls12'
Invoke-WebRequest -Uri $Url -OutFile $DownloadFile
Start-Process msiexec -Wait -NoNewWindow -ArgumentList @("/i", "$DownloadFile", "ADDLOCAL=Basic,Clean", "/qn", "/log", "Ec2Launch.log")
# Run The Microsoft System Preparation (Sysprep) tool
Start-Process powershell -Wait -NoNewWindow -ArgumentList @("C:\Progra~1\Amazon\EC2Launch\EC2Launch.exe", "sysprep", "--shutdown=false") |
Hey @RomaricKanyamibwa |
Hello @mcregan23 , Here are the ec2 logs and you can also find them in the issue's description : |
Summary
Much like the issue 2416, there seems to be an issue with the Windows_Server-2022-English-Full-ECS_Optimized AMIs, where the ECS-Agent is sometimes having issues connecting to the ECS Cluster due to some virtual hardware issues (the VMNetwork cannot be found). Like the other issue, this, too, seems random but will happen sporadically on our windows image.
Description
Using packer we create our own AMIs based on the Windows_Server-2022-English-Full-ECS_Optimized AMIs. On the AMI we install ssh, then pull our windows docker images, and finally terminate it by installing EC2Launchv2. Once the AMI is ready we use it on our ECS cluster with the user data :
Periodically one of the instances in the ASG fails to get attached to the ECS Cluster with the following errors:
This error makes the instance unusable to the cluster, so the ASG launches a new one while the old one is left dangling unused.
Expected Behavior
The ECS-Agent reliably connects to the ECS cluster without errors.
Observed Behavior
The ECS-Agent will sometimes fail, and the instance will not be attached to the ECS cluster and will just continue running. Rebooting the instance fixes the issues and the agent no longer produces the error.
Before the reboot we get:
After reboot when it starts to work :
Environment Details:
Supporting Log Snippets
UserScript.ps1.log
output.log
err.log
The text was updated successfully, but these errors were encountered: