@phillxnet, @mikemonkers, @2fatdogs
I tried to get the standard OpenSUSE vagrant box to work … the comparison of installed packages between the bento version and opensuse version was a 600+ package difference, so that didn’t really seem to help.
I then took the piecemeal approach of trying to get through this one step at a time …
Here is what I found so far:
the culprit really seems to be a bogged guest addition installation on the opensuse image. When running vagrant up
(following the readme for the vagrant load), then it will typically fail with the same/similar message we’ve seen earlier in the thread:
and I tried to get this rectified by adding updates/upgrades to the vagrant file, however since the script already falls on its nose before it even gets to anything else, it seems to me (and, of course, I might be wrong), that I have to force the installation/reinstallation of the guest additions before the rest of the script will even run through.
So, since - despite the error mounting the shared folders - the vagrant machine is running, I did the following:
vagrant ssh
sudo zypper -n --non-interactive-include-reboot-patches update
which could of course be written like this in one line:
vagrant ssh -c "sudo zypper -n --non-interactive-include-reboot-patches update"
this in turn highlighted mostly these three items to be upgraded, all related to the Virtualbox guest additions:
virtualbox-guest-tools, virtualbox-guest-x11 and virtualbox-kmp-default
As the vagrant box ages (and I purposefully removed a pinned version from the vagrant file to get the most recent one) it will likely install more patches/updates, but that should be ok.
The vagrant plugin vbguest didn’t attempt an auto-update of the guest additions or anything helpful at this time (so forced to not auto-update at this time in the vagrant file), this was the only way that I could continue.
So, once that installation/update is completed. I reloaded the vagrant box with vagrant reload
and, it started going through the rest of the vagrant script namely the shell command in the bottom section.
Now, after a few more attempts I had to amend @mikemonkers installation additions.
I found that in order to get the actual build of the Rockstor ISO to work I had to add a few more installations. Furthermore, pip was not installed so the pip reinstall command at the bottom of the file failed
So, here are the dependencies for our kiwi ng installer/image creator:
git
- already pointed out by @mikemonkers
btrfsprogs
- already pointed out by @mikemonkers
gfxboot
- already pointed out by @mikemonkers
qemu-tools
gptfdisk
e2fsprogs
squashfs
xorriso
As you can tell the last 5 packages all related to creating an image/live CD type output in the end.
And in order to address the issue with the lxml package I had to also install
python3-pip
upgrade pip
for good measure
force reinstall lxml
as pointed out by @mikemonkers
Once the vagrant box finishes the script, I performed another vagrant reload
as I wasn’t sure what happens if I were to put a sudo reboot
into the vagrantfile (and ran out of energy to experiment with that) and then executed the:
vagrant ssh -c "cd /home/vagrant/rockstor-installer/vagrant_env; ./run_kiwi.sh"
and after some time (seemed longer than on the bento box for some reason) … and a few warnings (@phillxnet not sure whether these are expected during the kiwi ng install procedure or whether some action needs to be taken on the overall installer) the iso file was generated and available in the vagrant_env folder. I ran a test installation up until I can get to the webui for the first configuration, so I presume it’s all good now.
Now, here’s the updated excerpt of the vagrant file, but I have no idea whether there is a better/different way to avoid the guest addition re-installation, that where smarter folks than me need to come in. But I think I at least narrowed the “missing” items from the opensuse image to get a successful image built:
Vagrant File - click to expand
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Required plugins
required_plugins = %w(
vagrant-host-shell
vagrant-sshfs
vagrant-vbguest
)
required_plugins.each do |plugin|
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
end
MEM = 2048
CPU = 2
PROFILE = ENV['PROFILE'] || 'x86_64'
VAGRANTFILE_API_VERSION = '2'
#
# Fully documented Vagrantfile available
# in the wiki: https://github.com/josenk/vagrant-vmware-esxi/wiki
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#commented out, since this folder is mounted by default via vagrant
#config.vm.synced_folder "./", "/vagrant"
config.vm.synced_folder "../", "/home/vagrant/rockstor-installer"
# Disable update of guest additions when box is opensuse
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
config.vm.define "rockstor-installer" do |v|
v.vm.hostname = "rockstor-installer"
if PROFILE == "x86_64" then
# Switch back to bento until we figure out what broke in opensuse
v.vm.box = 'opensuse/Leap-15.2.x86_64'
# disabled, want to pull latest vagrant box version
#v.vm.box_version = "15.2.31.325"
#v.vm.box = 'bento/opensuse-leap-15'
else
v.vm.box = 'opensuse/Leap-15.2.aarch64'
end
# Provider specific variable
v.vm.provider :virtualbox do |vb|
vb.memory = MEM
vb.cpus = CPU
end
if PROFILE == "x86_64" then
config.vm.provision "shell", inline: <<-SHELL
sudo zypper --non-interactive addrepo --refresh http://download.opensuse.org/repositories/Virtualization:/Appliances:/Builder/openSUSE_Leap_15.2/ appliance-builder
sudo zypper --non-interactive --gpg-auto-import-keys refresh
# probably not necessary here, if it's done outside prior to the Vagrant file successfully completing
sudo zypper -n --non-interactive-include-reboot-patches update
# probably dangerous to try this within the vagrant file, hence left it commented
# sudo reboot
SHELL
else
config.vm.provision "shell", inline: <<-SHELL
sudo zypper --non-interactive addrepo --refresh http://download.opensuse.org/repositories/Virtualization:/Appliances:/Builder/openSUSE_Leap_15.2_ARM/ appliance-builder
sudo zypper --non-interactive --gpg-auto-import-keys refresh
sudo zypper --non-interactive-include-reboot-patches update
# probably dangerous to try this within the vagrant file, hence left it commented
# sudo reboot
SHELL
end
config.vm.provision "shell", inline: <<-SHELL
REPO_URL="https://github.com/rockstor/rockstor-installer.git"
REPO_DIR="rockstor-installer/"
# additional packages required to be installed
sudo zypper --non-interactive install git btrfsprogs gfxboot qemu-tools gptfdisk e2fsprogs squashfs xorriso
sudo zypper --non-interactive install python3-kiwi
if [ ! -e ${REPO_DIR} ]; then
git clone ${REPO_URL} ${REPO_DIR}
fi
# Fix for broken python lxml (see: https://www.suse.com/support/kb/doc/?id=000019818)
# unfortunately requires pip installation and upgrade before reinstall can be done
sudo zypper --non-interactive install python3-pip**
sudo pip install --upgrade pip
sudo pip install --force-reinstall lxml
SHELL
end
end