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
[BUG] Installing ubuntu-desktop with Packer breaks the VM #1612
Comments
I got the same error message when Ubuntu 18.04 boot up in VNET that enable IPv6. |
To narrow this report down even further, the Ubuntu package It's not clear to me if this is a bug with waagent, cloud-init, or should be resolved in ifupdown. The cause seems to be that I'll let package maintainers here or on cloud-init speculate what the best fix is, but as a user, I can say I dived really deep tracking this down and never would have guessed I suspect that if you install A potential fixAs part of your image clean up steps, you could uninstall ...
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo {{ .Path }}",
"inline": [
"apt-get remove -yq ifupdown",
"apt-get autoremove -yq"
]
},
... Packer configThis config will reproduce the bug if you add the necessary environment variables for your subscription. The resulting image cannot be used to boot an image -- the NIC will never come. {
"variables": {
"instance_type": "Standard_B1ms",
"resource_group": "{{ env `AZURE_RESOURCE_GROUP` }}",
"location": "{{ env `AZURE_LOCATION` }}",
"client_id": "{{ env `ARM_CLIENT_ID` }}",
"client_secret": "{{ env `ARM_CLIENT_SECRET` }}",
"subscription_id": "{{ env `ARM_SUBSCRIPTION_ID` }}",
"tenant_id": "{{ env `ARM_TENANT_ID` }}"
},
"builders": [
{
"type": "azure-arm",
"client_id": "{{ user `client_id` }}",
"client_secret": "{{ user `client_secret` }}",
"subscription_id": "{{ user `subscription_id` }}",
"tenant_id": "{{ user `tenant_id` }}",
"os_type": "Linux",
"os_disk_size_gb": 80,
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "18.04-LTS",
"managed_image_name": "test-failure-{{ isotime \"2006-01-02-1504\" }}",
"managed_image_resource_group_name": "{{ user `resource_group` }}",
"location": "West US 2",
"vm_size": "{{ user `instance_type` }}"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo {{ .Path }}",
"inline": [
"set -x",
"/usr/bin/cloud-init status --wait",
"systemctl stop apt-daily.timer",
"systemctl stop apt-daily.service",
"systemctl stop apt-daily-upgrade.timer",
"systemctl stop apt-daily-upgrade.service",
"systemctl stop unattended-upgrades.service",
"apt-get install -yq ifupdown",
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
]
}
]
} |
Update: I hit an identical bug on AWS yesterday as well, so seems like this is a conflict between I'll open an issue against |
Tracked in https://bugs.launchpad.net/cloud-init/+bug/1867029 and seems to be fixed. |
Describe the bug
Installing ubuntu-desktop on 18.04 LTS with Packer, creates a broken image that is not able to boot. I'm not sure this is an issue with WALinuxAgent / Cloud-Init / Azure.
It seems like network interface
eth0
is unable to go UP, and everything else breaks.Packer file:
Distro and WALinuxAgent details (please complete the following information):
Additional context
Booting a VM created from that image:
The text was updated successfully, but these errors were encountered: