XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Issue creating Ubuntu 18.04 desktop VM

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    25 Posts 6 Posters 6.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      In your case, it seems it doesn't change the issue (do you have disable VGA at the same time using UEFI?).

      Here is my advanced settings where it works without any VM modification:

      T 1 Reply Last reply Reply Quote 0
      • T Offline
        tinjaw @olivierlambert
        last edited by

        @olivierlambert I had VGA on. (Which must be the default.) Turned it off and advancing much farther now. Thank you.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tinjaw
          last edited by

          Just for closure...

          I followed all your helpful guidance and am now up and running. Thank you all for your assistance.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Good, thanks for the feedback, we have now documented this in case someone else got the issue 🙂

            Thanks for the link @stormi 👍

            Dr4s1l 0D 1 Reply Last reply Reply Quote 0
            • Dr4s1l 0D Offline
              Dr4s1l 0 @olivierlambert
              last edited by Dr4s1l 0

              @olivierlambert i'm using a ova import with UEFI comming from virtualbox, folowed all previous option and ddocumentation and still can't get my VM to boot. It's stuck with black screen and no network or whatever informations. Using this packer template to build the VM :

              {
                "variables": {
                  "vm_name": "mjolmir-base",
                  "cpu": "2",
                  "ram_size": "2048",
                  "disk_size": "5000",
                  "iso_url": "ubuntu-18.04.5-server-amd64.iso",
                  "iso_checksum_type": "sha1",
                  "iso_checksum": "c5dc820b3b46ccdd94bb1568715852ea3bf772a4",
                  "username" : "vagrant",
                  "password" : "vagrant"
                },
                "builders": [
                {
                  "vm_name":"{{user `vm_name`}}",
                  "type": "virtualbox-iso",
                  "format": "ova",
                  "output_directory": "./data",
                  "boot_wait": "5s",
                  "disk_size": "{{user `disk_size`}}",
                  "headless": true,
                  "guest_additions_mode":"disable",
                  "http_directory": "./http/",
                  "iso_url": "{{user `iso_url`}}",
                  "iso_checksum": "{{user `iso_checksum`}}",
                  "communicator":"ssh",
                  "ssh_username": "{{user `username`}}",
                  "ssh_password": "{{user `password`}}",
                  "ssh_timeout": "4h",
                  "shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now",
                  "boot_command": [
                      "e<down><down><down><down><down><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>",
                      "<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>",
                      "linux /install/vmlinuz<wait>",
                      " auto<wait>",
                      " console-setup/ask_detect=false<wait>",
                      " console-setup/layoutcode=us<wait>",
                      " console-setup/modelcode=pc105<wait>",
                      " root=/dev/sda",
                      " debconf/frontend=noninteractive<wait>",
                      " debian-installer=fr_FR<wait>",
                      " vga=normal fb=false<wait>",
                      " kbd-chooser/method=fr<wait>",
                      " keyboard-configuration/layout=FR<wait>",
                      " keyboard-configuration/variant=FR<wait>",
                      " locale=fr_FR<wait>",
                      " netcfg/get_domain=localdomain<wait>",
                      " netcfg/get_hostname=mjolmir<wait>",
                      " grub-installer/bootdev=/dev/sda<wait>",
                      " noapic<wait>",
                      " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/http/18.04/preseed-cloud-init.cfg",
                      " -- <wait><enter>",
                      " initrd /install/initrd.gz<wait>",
                      "<f10>"
                  ],
                  "guest_os_type": "Ubuntu_64",
                  "firmware":"efi",
                  "iso_interface": "sata",
                  "vboxmanage": [
                    [
                      "modifyvm","{{.Name}}","--memory","{{user `ram_size`}}"
                    ],
                    [
                      "modifyvm","{{.Name}}","--cpus","{{user `cpu`}}"
                    ],
                    [
                      "modifyvm","{{.Name}}","--firmware","EFI"
                    ]
                  ]
                }],
                "provisioners": [{
                  "type": "shell",
                  "execute_command": "echo 'vagrant' | sudo -S -E sh {{.Path}}",
                  "scripts": [
                    "./script/update.sh",
                    "./script/cloud-init.sh",
                    "./script/cleanup.sh"
                  ]
                }],
                "post-processors": [
                  {
                    "keep_input_artifact": true,
                    "output": "../../{{.Provider}}/mjolmir.box",
                    "type": "vagrant"
                  }
                ]
              }
              

              with provisioning script :

              #!/bin/sh
              
              #Disable conflict service
              systemctl stop apt-daily.service
              systemctl kill --kill-who=all apt-daily.service
              
               wait until `apt-get updated` has been killed
              while ! (systemctl list-units --all apt-daily.service | egrep -q '(dead|failed)')
              do
                sleep 1;
              done
              #Disable service at startup
              systemctl mask apt-daily.service apt-daily-upgrade.service
              systemctl disable apt-daily.service apt-daily-upgrade.service
              systemctl disable apt-daily.timer apt-daily-upgrade.timer
              
              # install cloud-init
              apt-get update && apt-get upgrade
              apt-get install linux-image-generic xserver-xorg
              apt-get remove linux-image-generic-hwe-18.04
              apt-get install --install-recommends -y cloud-init xe-guest-utilities cloud-initramfs-growroot xserver-xorg-video-all
              
              #hostname will be managed by cloud-init, but the current value will not be removed
              HOSTNAME=`hostname`
              sed -i "/${HOSTNAME}/d" /etc/hosts
              sed -i s/enp0s3/eth0/g /etc/network/interfaces
              sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet\"/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet vga=normal fb=false dsmode\=nocloud\\;s\=\/ratatosk\"/g" /etc/default/grub
              #sed -i "s/Before\=sysinit\.target/After\=sysinit\.target/g" /etc/systemd/system/cloud-init.target.wants/cloud-init.service
              #sed -i "s/\[Service\]/\[Service\]\r\nAfter\=\cloud-init.service/g" /lib/systemd/system/xe-daemon.service
              #sed -i "s/\[Service\]/\[Service\]\r\nExecStartPre\=\/bin\/sleep 30/g" /etc/systemd/system/cloud-init.target.wants/cloud-init.service
              #sed -i "s/\[Service\]/\[Service\]\r\nExecStartPre\=\/bin\/sleep 30/g" /etc/systemd/system/cloud-init.target.wants/cloud-init-local.service
              sed -i "s/datasource_list: \[ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, SmartOS, Bigstep, Scaleway, AliYun, Ec2, CloudStack, Exoscale, RbxCloud, UpCloud, None \]//g" /etc/cloud/cloud.cfg.d/90_dpkg.cfg
              cp /tmp/cloud.cfg /etc/cloud/cloud.cfg && rm /tmp/cloud.cfg
              cat <<EOF >> /etc/cloud/cloud.cfg.d/90_dpkg.cfg
              
              datasource_list: [ NoCloud, None ]
              datasource:
                NoCloud:
                  seedfrom: /ratatosk/
              EOF
              
              update-grub
              mkdir /ratatosk
              echo "/dev/xvdb  /ratatosk  vfat  defaults  0  2" >> /etc/fstab
              DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force
              dpkg-reconfigure -f noninteractive cloud-init
              

              stuck on :

              034b3235-383a-4aec-8a72-52bc9fb8c9ea-image.png

              Any suggestion or whatever i'm missing ? Ubuntu 16.04 OVA created the same way can be imported and booted flawlessly.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post