AMI based on Ubuntu 18.04 AWS image does not have network interface












1















I have an issue while creating an AMI based on the standard AWS Ubuntu 18.04 server image. This issue did not occur with Ubuntu 16.04.



When I boot a standard AWS Ubuntu 18.04 image and create a new AMI without touching anything on the image, I have no issue when using this new AMI to boot another instance.



However, if I simply run the following commands:



sudo apt update
sudo apt install ubuntu-desktop


then create a new AMI and use it to boot a new instance, bang, no network interface, whatever the type of instance I try to launch. Usually an 'ens3' or 'eth0' network interface should appear.



I narrowed down the problem to be perhaps related to the new netplan network handler which is may be disturbed by the sudden installation of ubuntu-desktop and may be bad interaction with NetworkManager.



Any idea on the possible cause of this behavior?



UPDATE



ubuntu@ip-172-31-13-58:~$ ls -al /etc/netplan/
total 12
drwxr-xr-x 2 root root 4096 Jun 19 04:10 .
drwxr-xr-x 88 root root 4096 Jun 19 04:10 ..
-rw-r--r-- 1 root root 473 Jun 19 04:10 50-cloud-init.yaml
ubuntu@ip-172-31-13-58:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
ens3:
dhcp4: true
match:
macaddress: 02:7a:e7:bc:e8:c8
set-name: ens3
ubuntu@ip-172-31-13-58:~$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 172.31.13.58 netmask 255.255.240.0 broadcast 172.31.15.255
inet6 fe80::7a:e7ff:febc:e8c8 prefixlen 64 scopeid 0x20<link>
ether 02:7a:e7:bc:e8:c8 txqueuelen 1000 (Ethernet)
RX packets 692 bytes 665816 (665.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 366 bytes 41639 (41.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184 bytes 14306 (14.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184 bytes 14306 (14.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question

























  • Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

    – chili555
    Jun 18 '18 at 21:43











  • See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

    – user4786142
    Jun 19 '18 at 4:22











  • "I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

    – chili555
    Jun 19 '18 at 13:02











  • No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

    – user4786142
    Jun 19 '18 at 14:22











  • Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

    – chili555
    Jun 19 '18 at 15:03
















1















I have an issue while creating an AMI based on the standard AWS Ubuntu 18.04 server image. This issue did not occur with Ubuntu 16.04.



When I boot a standard AWS Ubuntu 18.04 image and create a new AMI without touching anything on the image, I have no issue when using this new AMI to boot another instance.



However, if I simply run the following commands:



sudo apt update
sudo apt install ubuntu-desktop


then create a new AMI and use it to boot a new instance, bang, no network interface, whatever the type of instance I try to launch. Usually an 'ens3' or 'eth0' network interface should appear.



I narrowed down the problem to be perhaps related to the new netplan network handler which is may be disturbed by the sudden installation of ubuntu-desktop and may be bad interaction with NetworkManager.



Any idea on the possible cause of this behavior?



UPDATE



ubuntu@ip-172-31-13-58:~$ ls -al /etc/netplan/
total 12
drwxr-xr-x 2 root root 4096 Jun 19 04:10 .
drwxr-xr-x 88 root root 4096 Jun 19 04:10 ..
-rw-r--r-- 1 root root 473 Jun 19 04:10 50-cloud-init.yaml
ubuntu@ip-172-31-13-58:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
ens3:
dhcp4: true
match:
macaddress: 02:7a:e7:bc:e8:c8
set-name: ens3
ubuntu@ip-172-31-13-58:~$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 172.31.13.58 netmask 255.255.240.0 broadcast 172.31.15.255
inet6 fe80::7a:e7ff:febc:e8c8 prefixlen 64 scopeid 0x20<link>
ether 02:7a:e7:bc:e8:c8 txqueuelen 1000 (Ethernet)
RX packets 692 bytes 665816 (665.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 366 bytes 41639 (41.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184 bytes 14306 (14.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184 bytes 14306 (14.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question

























  • Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

    – chili555
    Jun 18 '18 at 21:43











  • See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

    – user4786142
    Jun 19 '18 at 4:22











  • "I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

    – chili555
    Jun 19 '18 at 13:02











  • No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

    – user4786142
    Jun 19 '18 at 14:22











  • Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

    – chili555
    Jun 19 '18 at 15:03














1












1








1








I have an issue while creating an AMI based on the standard AWS Ubuntu 18.04 server image. This issue did not occur with Ubuntu 16.04.



When I boot a standard AWS Ubuntu 18.04 image and create a new AMI without touching anything on the image, I have no issue when using this new AMI to boot another instance.



However, if I simply run the following commands:



sudo apt update
sudo apt install ubuntu-desktop


then create a new AMI and use it to boot a new instance, bang, no network interface, whatever the type of instance I try to launch. Usually an 'ens3' or 'eth0' network interface should appear.



I narrowed down the problem to be perhaps related to the new netplan network handler which is may be disturbed by the sudden installation of ubuntu-desktop and may be bad interaction with NetworkManager.



Any idea on the possible cause of this behavior?



UPDATE



ubuntu@ip-172-31-13-58:~$ ls -al /etc/netplan/
total 12
drwxr-xr-x 2 root root 4096 Jun 19 04:10 .
drwxr-xr-x 88 root root 4096 Jun 19 04:10 ..
-rw-r--r-- 1 root root 473 Jun 19 04:10 50-cloud-init.yaml
ubuntu@ip-172-31-13-58:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
ens3:
dhcp4: true
match:
macaddress: 02:7a:e7:bc:e8:c8
set-name: ens3
ubuntu@ip-172-31-13-58:~$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 172.31.13.58 netmask 255.255.240.0 broadcast 172.31.15.255
inet6 fe80::7a:e7ff:febc:e8c8 prefixlen 64 scopeid 0x20<link>
ether 02:7a:e7:bc:e8:c8 txqueuelen 1000 (Ethernet)
RX packets 692 bytes 665816 (665.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 366 bytes 41639 (41.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184 bytes 14306 (14.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184 bytes 14306 (14.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question
















I have an issue while creating an AMI based on the standard AWS Ubuntu 18.04 server image. This issue did not occur with Ubuntu 16.04.



When I boot a standard AWS Ubuntu 18.04 image and create a new AMI without touching anything on the image, I have no issue when using this new AMI to boot another instance.



However, if I simply run the following commands:



sudo apt update
sudo apt install ubuntu-desktop


then create a new AMI and use it to boot a new instance, bang, no network interface, whatever the type of instance I try to launch. Usually an 'ens3' or 'eth0' network interface should appear.



I narrowed down the problem to be perhaps related to the new netplan network handler which is may be disturbed by the sudden installation of ubuntu-desktop and may be bad interaction with NetworkManager.



Any idea on the possible cause of this behavior?



UPDATE



ubuntu@ip-172-31-13-58:~$ ls -al /etc/netplan/
total 12
drwxr-xr-x 2 root root 4096 Jun 19 04:10 .
drwxr-xr-x 88 root root 4096 Jun 19 04:10 ..
-rw-r--r-- 1 root root 473 Jun 19 04:10 50-cloud-init.yaml
ubuntu@ip-172-31-13-58:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
ens3:
dhcp4: true
match:
macaddress: 02:7a:e7:bc:e8:c8
set-name: ens3
ubuntu@ip-172-31-13-58:~$ ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 172.31.13.58 netmask 255.255.240.0 broadcast 172.31.15.255
inet6 fe80::7a:e7ff:febc:e8c8 prefixlen 64 scopeid 0x20<link>
ether 02:7a:e7:bc:e8:c8 txqueuelen 1000 (Ethernet)
RX packets 692 bytes 665816 (665.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 366 bytes 41639 (41.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 184 bytes 14306 (14.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 184 bytes 14306 (14.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0






networking 18.04 aws






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 19 '18 at 4:21







user4786142

















asked Jun 18 '18 at 17:23









user4786142user4786142

63




63













  • Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

    – chili555
    Jun 18 '18 at 21:43











  • See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

    – user4786142
    Jun 19 '18 at 4:22











  • "I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

    – chili555
    Jun 19 '18 at 13:02











  • No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

    – user4786142
    Jun 19 '18 at 14:22











  • Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

    – chili555
    Jun 19 '18 at 15:03



















  • Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

    – chili555
    Jun 18 '18 at 21:43











  • See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

    – user4786142
    Jun 19 '18 at 4:22











  • "I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

    – chili555
    Jun 19 '18 at 13:02











  • No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

    – user4786142
    Jun 19 '18 at 14:22











  • Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

    – chili555
    Jun 19 '18 at 15:03

















Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

– chili555
Jun 18 '18 at 21:43





Please edit your question to add the result of the terminal commands: ls /etc/netplan and also: cat /etc/netplan/*.yaml and finally: ifconfig

– chili555
Jun 18 '18 at 21:43













See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

– user4786142
Jun 19 '18 at 4:22





See my updated post above. The output is of course AWS instance type dependent as 'ens3' could very well be 'eth0'. This file is created by cloud-init at boot time once it has extracted meta-data from AWS. Of course I cannot tell you what it looks like on the other instance based on the newly created AMI as it is lacking a network interface.

– user4786142
Jun 19 '18 at 4:22













"I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

– chili555
Jun 19 '18 at 13:02





"I cannot tell you what it looks like on the other instance based on the newly created AMI" So the results posted above are not from the instance from which you are having trouble?

– chili555
Jun 19 '18 at 13:02













No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

– user4786142
Jun 19 '18 at 14:22





No, they are not. cloud-init is supposed to create this yaml file but for some reason a package and/or a set-up from ubuntu-update brings havoc to the set-up that otherwise works totally fine.

– user4786142
Jun 19 '18 at 14:22













Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

– chili555
Jun 19 '18 at 15:03





Installing ubuntu-desktop probably installs Network Manager. The netplan configurations are completely different for server vs. Network Manager. I suspect that is the underlying issue. Without diagnostics, it's difficult to fix. Is Network Manager running? ps aux | grep etwork Do you want networking in the faulty instance handled by netplan's yaml or by clicking the Network Manager icon to connect?

– chili555
Jun 19 '18 at 15:03










1 Answer
1






active

oldest

votes


















0














I hit the same problem. It turns the ifupdown pkg is up to blame. Simply removing it (apt purge ifupdown) should solve the problem.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1047671%2fami-based-on-ubuntu-18-04-aws-image-does-not-have-network-interface%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I hit the same problem. It turns the ifupdown pkg is up to blame. Simply removing it (apt purge ifupdown) should solve the problem.






    share|improve this answer






























      0














      I hit the same problem. It turns the ifupdown pkg is up to blame. Simply removing it (apt purge ifupdown) should solve the problem.






      share|improve this answer




























        0












        0








        0







        I hit the same problem. It turns the ifupdown pkg is up to blame. Simply removing it (apt purge ifupdown) should solve the problem.






        share|improve this answer















        I hit the same problem. It turns the ifupdown pkg is up to blame. Simply removing it (apt purge ifupdown) should solve the problem.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 3 at 20:41









        tinlyx

        77121023




        77121023










        answered Jan 3 at 17:25









        Jun SunJun Sun

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1047671%2fami-based-on-ubuntu-18-04-aws-image-does-not-have-network-interface%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            File:DeusFollowingSea.jpg