cockpit-project / cockpit-machines

Cockpit UI for virtual machines
GNU Lesser General Public License v2.1
297 stars 75 forks source link

machines: Unattended installation breaks with underscores in hostnames #41

Open garrett opened 3 years ago

garrett commented 3 years ago
  1. Create an Ubuntu machine on the VM page
  2. Name type something like "ubuntu server", which gets changed to "ubuntu_server"
  3. Select unattended installation
  4. Let Cockpit install
  5. While the disk is named appropriately, installation fails due to an invalid hostname

Failure screen:

Screenshot_2021-03-18 Virtual Machines - garrett Rain(4)

Context:

Screenshot_2021-03-18 Virtual Machines - garrett Rain(3)

This may happen with other distros, most likely Debian as well. Unsure if it happens with Fedora/CentOS/RHEL or others.

garrett commented 3 years ago

Solution would be to use a dash, at least for the hostname. I'm not sure how much influence Cockpit has on the automatic scripts, however. Cockpit could pass a dash for installation and still use an underscore itself for the name and/or disk, for example.

KKoukiou commented 3 years ago

It's a bit hard to know what are the allowed hostnames for each OS. I find that this is the kind of issue that we can agree it's a WONTFIX, and the users who will take the steps described above, will just realize from the installer errors what are the valid names.

garrett commented 1 year ago

Same problem on Fedora as on Ubuntu, with a similar fix suggested (sanitation of names; using a dash instead of underscore). https://github.com/cockpit-project/cockpit-machines/issues/919