michaeltandy / ubuntu-desktop-22.04-autoinstall

7 stars 4 forks source link

Can't launch in VM #5

Open Its-Alex opened 2 months ago

Its-Alex commented 2 months ago

Hello :wave:

First, thanks for your repository. My problem is that I can't launch images builded with this repository in a VM, I use vagrant with the following configuration:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/jammy64"
  config.vm.box_version = "20240131.0.0"

  config.ssh.insert_key = false
  config.ssh.username = "ubuntu"

  config.vm.provider "virtualbox" do |vb|
    vb.gui = true

    vb.cpus = "8"
    vb.memory = "4096"

    # Enable EFI boot
    vb.customize ["modifyvm", :id, "--firmware", "efi"]
    # Add live iso from cdrom for install
    vb.customize ["storageattach", :id, "--storagectl", "IDE", "--port", "0", "--device", "1", "--type", "dvddrive", "--medium", Dir.pwd + "/custom-ubuntu-22.04.4-live-server-amd64.iso"]
  end
end

VM boot on UEFI shell. I think the boot from the original ISO is broken.

michaeltandy commented 2 months ago

I'm glad you found it useful!

I gather Canonical has completely replaced this stuff for Ubuntu 24.04 which IIRC comes out some time this month. Some details here: https://discourse.ubuntu.com/t/from-installation-to-provisioning-upgrading-the-ubuntu-desktop-installer/42139

I had to apply weird hacks to get the server autoinstall stuff to install a desktop system - I believe with 24.04 automating desktop installation shouldn't require that. If you're about to start a project automating desktop Ubuntu installation, could I recommend you consider using 24.04 first?

On Tue, 16 Apr 2024 at 17:12, Alexandre Marre @.***> wrote:

Hello 👋

First, thanks for your repository. My problem is that I can't launch images builded with this repository in a VM, I use vagrant with the following configuration:

-- mode: ruby --

vi: set ft=ruby :

Vagrant.configure("2") do |config| config.vm.box = "ubuntu/jammy64" config.vm.box_version = "20240131.0.0"

config.ssh.insert_key = false config.ssh.username = "ubuntu"

config.vm.provider "virtualbox" do |vb| vb.gui = true

vb.cpus = "8"
vb.memory = "4096"

# Enable EFI boot
vb.customize ["modifyvm", :id, "--firmware", "efi"]
# Add live iso from cdrom for install
vb.customize ["storageattach", :id, "--storagectl", "IDE", "--port", "0", "--device", "1", "--type", "dvddrive", "--medium", Dir.pwd + "/custom-ubuntu-22.04.4-live-server-amd64.iso"]

end end

VM boot on UEFI shell. I think the boot from the original ISO is broken.

— Reply to this email directly, view it on GitHub https://github.com/michaeltandy/ubuntu-desktop-22.04-autoinstall/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASWAAU7BNLQCCOFOQHXINTY5VEV3AVCNFSM6AAAAABGJVH3PCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DMNBSHA4DIMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Its-Alex commented 2 months ago

I wanted to do it for 22.04, do you think you could help me? I can't find any solutions to automate desktop installation, normally I use subiquity 😕

Previously, I used this config https://github.com/Its-Alex/custom-ubuntu-server-20.04.6-live-iso

michaeltandy commented 2 months ago

I've heard people say they've done automated desktop installation by installing the server version, then installing the "ubuntu-desktop metapackage"

I didn't love that solution myself because when I tried it I ended up with some differences to a 'normal' desktop installation (e.g. some network devices got managed by netplan instead of networkmanager IIRC) and I wasn't sure how deep the differences ran. Also it needed a network connection to download the extra packages. But for your purposes it might work fine?

Its-Alex commented 2 months ago

@michaeltandy I need to make it work in an air-gapped environment. Unfortunately, when I tried to add the ubuntu-desktop package to the squashfs, GNOME failed to start :confused:

You can close the issue if you do not intend to make it work in a VM.

In any case, thanks for your insight. :pray: