Skip to content
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

Support for scripts to install Ubuntu 18.04 LTS (Bionic Beaver) #51

Closed
sud335 opened this issue Jun 28, 2018 · 7 comments
Closed

Support for scripts to install Ubuntu 18.04 LTS (Bionic Beaver) #51

sud335 opened this issue Jun 28, 2018 · 7 comments
Milestone

Comments

@sud335
Copy link

@sud335 sud335 commented Jun 28, 2018

Hi,

The current release version of xen-tools (4.7-1) source package does not have official scripts to install the new dist version Ubuntu-18.04 [https://launchpad.net/ubuntu/bionic/amd64/xen-tools/4.7-1]. Are there any plans to release them soon? Also, is there any alternative method that I can install 18.04 on the new VM.

@xtaran

This comment has been minimized.

Copy link
Member

@xtaran xtaran commented Jun 28, 2018

Are there any plans to release them soon?

Support for Ubuntu 17.10 Artful, Ubuntu 18.04 Bionic and preliminary support for Ubuntu 18.10 Cosmic will be surely part of the next xen-tools release.

I just can't give any promises when that will be. Might be weeks or months. (I need at least half a day to do a proper xen-tools release.)

Also, is there any alternative method that I can install 18.04 on the new VM.

It probably suffices

  • to create a symlink named bionic.d pointing to karmic.d analogous to other recent Ubuntu releases (ln -vis karmic.d bionic.d), and
  • to add an entry to /etc/xen-tools/distributions.conf analogous to the zesty one.
@zhanghan177

This comment has been minimized.

Copy link

@zhanghan177 zhanghan177 commented Jul 31, 2018

Thanks for the reply. I tried the above approach and installed Ubuntu 18.04 image. However, the new VM has no network connection upon system bootup.

I think this might have some thing to do with Ubuntu switching to Netplan since 17.10.

The ethernet interface eth0 in the 18.04 image shows as state DOWN. (also, only ip works and no ifconfig). After I tried to bring up the eth0, I could only get inet6 address and no internet connection. I have only set up an IPv4 address for the guest and it should get the address through DHCP. Is there something wrong with the bridge networking with the host? The full result is

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether <correct_mac_address> brd ff:ff:ff:ff:ff:ff
    inet6 <some_ip_v6_address> scope link tentative
       valid_lft forever preferred_lft forever

Do you have any idea what might have caused the problem? Thanks!

@prjpet

This comment has been minimized.

Copy link

@prjpet prjpet commented Aug 7, 2018

Zhanghan177,

First, ifconfig is not a standard part of the Ubuntu distros from 17.04 if I'm correct. Have you tried to manually allocate an IPv4 address using the ip address add / dev eth0 command, that is in the same subnet as the switch? It is working for me... Also, you probably only get a link local IPv6 address allocated to the interface (starting with fe80::) that is not routable, so you will not get internet.

Hope this helps.

@zhanghan177

This comment has been minimized.

Copy link

@zhanghan177 zhanghan177 commented Aug 7, 2018

Thanks for the reply.

Manually setting IP addresses doesn't work, unfortunately. However, I worked out a solution to this issue. The root cause is that Ubuntu 18.04 switches to netplan, but the fresh install (from xen-create-image) gives an empty configuration inside /etc/netplan/. To solve the problem, I added a default configuration file in netplan directory and restart netplan. To summarize, the full solution goes as the following:

  1. create a symlink named bionic.d pointing to karmic.d analogous to other recent Ubuntu releases
cd /usr/share/xen-tools
ln -vis karmic.d bionic.d
  1. add an entry to /etc/xen-tools/distributions.conf as
bionic       = ubuntu     pygrub
  1. create Ubuntu 18.04 image with --dist=bionic.

  2. once the VM is created, add the following file for netplan configuration.

# /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
  1. After writing that file, run netplan to apply these changes:
sudo netplan --debug apply

And now I have internet access and DHCP resolves properly.

@arno481

This comment has been minimized.

Copy link

@arno481 arno481 commented Aug 10, 2018

Hi

would be nice to fix this, we use xen-create-image extensively. Attached is a script to replace 40-setup-networking-deb in /usr/share/xen-tools/bionic.d which supports 18.04's netplan.io. It handles two simple cases: a single static IP and DHCP and creates a /etc/netplan/01-netcfg.yaml for those.

CU,
Arno and Peter
40-setup-networking-deb-netplan.txt

@xtaran xtaran added this to the 4.8 milestone Dec 16, 2018
@xtaran

This comment has been minimized.

Copy link
Member

@xtaran xtaran commented Dec 16, 2018

Attached is a script to replace 40-setup-networking-deb in /usr/share/xen-tools/bionic.d which supports 18.04's netplan.io.

*sigh* Thanks!

Will look into this for the next release.

@fake-name

This comment has been minimized.

Copy link

@fake-name fake-name commented Jan 11, 2019

For anyone running into this issue, @ arno481's script solves it but you have to set up the builder manually:

Cribbing from the other comments here:

  1. Copy the ubuntu template dir into a new directory named bionic.d
cd /usr/share/xen-tools
cp -r karmic.d bionic.d
  1. add an entry to /etc/xen-tools/distributions.conf as
bionic       = ubuntu     pygrub
  1. Replace contents of the /usr/share/xen-tools/40-setup-networking with the contents of the 40-setup-networking-deb-netplan.txt file arno481 provided (or remove it and add the new file, making sure the permissions don't change).

  2. create Ubuntu 18.04 image with --dist=bionic.

  3. Done! Networking should work out-of-the-box now.


More generally, what's the status of getting this merged?

xtaran added a commit that referenced this issue Feb 3, 2019
@xtaran xtaran closed this in 9ee1f63 Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.