jetbrains-infra / packer-builder-vsphere

Packer plugin for remote builds on VMware vSphere
Mozilla Public License 2.0
543 stars 175 forks source link

Ubuntu 18.04 example #176

Open sebbbastien opened 5 years ago

sebbbastien commented 5 years ago

Hi,

I try to adapt Ubuntu 16.04 example to 18.04, but floppy is not mount at boot. boot_command is:

[...]
      "boot_command": [
        "<esc><wait><esc><wait><f6><wait><esc><wait>",
        "<bs><bs><bs><bs><bs>",
        " find_preseed=/preseed.cfg auto automatic-ubiquity noprompt",
        " priority=critical",
        " locale=en_US",
        " preseed/file=/floppy/preseed.cfg",
        " file=/floppy/preseed.cfg",
        " --- <enter>"
      ]
[...]

At boot I see that casper is trying to acess to /root/floppy/preseed.cfg.

Do you have a working example for Ubuntu 18.04?

Best regards,

-- Sébastien B.

mkuzmin commented 5 years ago

As mentioned in https://github.com/jetbrains-infra/packer-builder-vsphere/issues/108#issue-325712554, Ubuntu removed floppy driver from the kernel.

At the moment you'll have to manually create ISO image with required files, and upload it into a datastore.

In future we'll be able to provide preseed files by a remote HTTP server (#108) and generate ISO images (#177).

mrgeoffrich commented 5 years ago

I have an ubuntu 18.04 build working at the moment. If you look at this repo: https://github.com/homelabaas/haas-content/tree/master/packer/ubuntu1804iso you can see the files I am using to do an Ubuntu 18.04 installation from the ISO file.

I am having an issue however where the build exits prematurely, still trying to figure that one out. It happens intermittently.

edit: I have been using this person's repository as a guide: https://github.com/heizo/packer-ubuntu-18.04

ideologysec commented 5 years ago

I'm very confused. I was able to configure and provision an Ubuntu 18.04 VM with a preseed file on the floppy device using the alternate server install version - not the Subiquity one.

What Ubuntu 18.04 version are you using?

Additionally, it appears that as of 18.04.2 the Subiquity installer is the only option; I can't find an "alternate" version that still uses debinstall to save my life. (Nor a download option for any ISO versions older than 18.04.2, which doesn't feel like a conspiracy at all...)

rismoney commented 4 years ago

Has anyone been able to install ubuntu 18.04 desktop ? Struggling with the subiquity (ubiquity) configuration.
Getting hung up on keyboard language selection.

ideologysec commented 4 years ago

Has anyone been able to install ubuntu 18.04 desktop ? Struggling with the subiquity (ubiquity) configuration. Getting hung up on keyboard language selection.

@rismoney I have not had any luck with subiquity; I've only had luck with the original ("alternative") debinstall version. Specifically, the "64-bit PC (AMD64) server install image" from this page.

rismoney commented 4 years ago

So I made it through a nearly a full install with this:

  "boot_command_prefix": "<esc><wait8s><enter><wait5><f6><wait5><esc><wait5><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><wait5>",
      "{{ user `boot_command_prefix` }}",
          " /casper/vmlinuz initrd=/casper/initrd",
          " auto=true",
          " url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-desktop.cfg",
          " keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA",
          " keyboard-configuration/variant=USA",
          " partman-auto/disk=/dev/sda",
          " ubiquity/reboot=true",
          " partman-auto/method=regular",
          " partman/choose_partition=finish",
          " partman/confirm=true",
          " partman/confirm_nooverwrite=true",
          " languagechooser/language-name=English",
          " locale=en_US",
          " automatic-ubiquity boot=casper",
          " domain=foo.com",
          " hostname={{user `vm_name`}}",
          " noprompt -- ",
          "<enter>"

Where I am struggling is I can't figure out now, how to install open-sshserver and open-vm-tools

This doesn't work in preseed:

ubiquity ubiquity/success_command string \
  in-target apt-get install --no-install-recommends -y open-vm-tools net-tools openssh-server ntp
ideologysec commented 4 years ago

are you using the desktop or server install? I am unclear why Ubiquity wouldn't work, as that uses the old preseed file format; the server uses Subiquity, and to my understanding that requires an answers.yml file instead of a preseed.cfg

rismoney commented 4 years ago

I am trying to install 18.04.03 desktop.