Ma version de Ubuntu :
$ cat /etc/*release | grep "DISTRIB" DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
Je vais donc faire un petit test, d’abord l’installation de de virtualbox 5 à la palce de virtualbox 6.1 . Et ensuite l’installation de vagrant :
$ sudo apt-get install virtualbox
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
gconf-service gconf-service-backend gconf2 gconf2-common libappindicator1 libcurl3-nss libdbusmenu-gtk4 libfwup1 libgconf-2-4 libindicator7
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets supplémentaires suivants seront installés :
libgsoap-2.8.60 libvncserver1 virtualbox-dkms virtualbox-qt
Paquets suggérés :
vde2 virtualbox-guest-additions-iso
Les paquets suivants seront ENLEVÉS :
virtualbox-6.1
Les NOUVEAUX paquets suivants seront installés :
libgsoap-2.8.60 libvncserver1 virtualbox virtualbox-dkms virtualbox-qt
0 mis à jour, 5 nouvellement installés, 1 à enlever et 0 non mis à jour.
...
$ sudo apt-get install vagrant
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
gconf-service gconf-service-backend gconf2 gconf2-common libappindicator1 libcurl3-nss libdbusmenu-gtk4 libfwup1 libgconf-2-4 libindicator7
Veuillez utiliser « sudo apt autoremove » pour les supprimer.
Les paquets supplémentaires suivants seront installés :
augeas-lenses bsdtar cpu-checker cryptsetup cryptsetup-bin db-util db5.3-util dmeventd extlinux hfsplus ipxe-qemu ipxe-qemu-256k-compat-efi-roms keyutils
ldmtool libafflib0v5 libarchive-tools libaugeas0 libbfio1 libcacard0 libconfig9 libdevmapper-event1.02.1 libewf2 libfdt1 libguestfs-hfsplus libguestfs-perl
libguestfs-reiserfs libguestfs-tools libguestfs-xfs libguestfs0 libhfsp0 libhivex0 libintl-perl libintl-xs-perl libiscsi7 libldm-1.0-0 liblvm2app2.2
liblvm2cmd2.02 libnfsidmap2 librbd1 librdmacm1 libsodium-dev libspice-server1 libstring-shellquote-perl libsys-virt-perl libtirpc1 libtsk13
libusbredirparser1 libvirt0 libwin-hivex-perl libxen-4.9 libxenstore3.0 libxml-xpath-perl lsscsi lvm2 lzop mdadm msr-tools mtools nfs-common
nfs-kernel-server osinfo-db qemu-block-extra qemu-system-common qemu-system-x86 qemu-utils reiserfsprogs rpcbind ruby-bcrypt-pbkdf ruby-blankslate
ruby-builder ruby-childprocess ruby-domain-name ruby-erubis ruby-excon ruby-ffi ruby-fog-core ruby-fog-json ruby-fog-libvirt ruby-fog-xml ruby-formatador
ruby-http-cookie ruby-i18n ruby-json ruby-libvirt ruby-listen ruby-log4r ruby-mime-types ruby-mime-types-data ruby-multi-json ruby-net-scp ruby-net-sftp
ruby-net-ssh ruby-netrc ruby-nokogiri ruby-oj ruby-pkg-config ruby-rb-inotify ruby-rbnacl ruby-rest-client ruby-sqlite3 ruby-unf ruby-unf-ext scrub seabios
sgabios sharutils sleuthkit supermin syslinux syslinux-common vagrant-libvirt xfsprogs zerofree
Paquets suggérés :
augeas-doc augeas-tools libguestfs-gfs2 libguestfs-jfs libguestfs-nilfs libguestfs-rescue libguestfs-rsync libguestfs-zfs thin-provisioning-tools
dracut-core floppyd open-iscsi watchdog vde2 ovmf ruby-builder-doc ruby-activesupport sharutils-doc autopsy mac-robber xfsdump quota
Les NOUVEAUX paquets suivants seront installés :
augeas-lenses bsdtar cpu-checker cryptsetup cryptsetup-bin db-util db5.3-util dmeventd extlinux hfsplus ipxe-qemu ipxe-qemu-256k-compat-efi-roms keyutils
ldmtool libafflib0v5 libarchive-tools libaugeas0 libbfio1 libcacard0 libconfig9 libdevmapper-event1.02.1 libewf2 libfdt1 libguestfs-hfsplus libguestfs-perl
libguestfs-reiserfs libguestfs-tools libguestfs-xfs libguestfs0 libhfsp0 libhivex0 libintl-perl libintl-xs-perl libiscsi7 libldm-1.0-0 liblvm2app2.2
liblvm2cmd2.02 libnfsidmap2 librbd1 librdmacm1 libsodium-dev libspice-server1 libstring-shellquote-perl libsys-virt-perl libtirpc1 libtsk13
libusbredirparser1 libvirt0 libwin-hivex-perl libxen-4.9 libxenstore3.0 libxml-xpath-perl lsscsi lvm2 lzop mdadm msr-tools mtools nfs-common
nfs-kernel-server osinfo-db qemu-block-extra qemu-system-common qemu-system-x86 qemu-utils reiserfsprogs rpcbind ruby-bcrypt-pbkdf ruby-blankslate
ruby-builder ruby-childprocess ruby-domain-name ruby-erubis ruby-excon ruby-ffi ruby-fog-core ruby-fog-json ruby-fog-libvirt ruby-fog-xml ruby-formatador
ruby-http-cookie ruby-i18n ruby-json ruby-libvirt ruby-listen ruby-log4r ruby-mime-types ruby-mime-types-data ruby-multi-json ruby-net-scp ruby-net-sftp
ruby-net-ssh ruby-netrc ruby-nokogiri ruby-oj ruby-pkg-config ruby-rb-inotify ruby-rbnacl ruby-rest-client ruby-sqlite3 ruby-unf ruby-unf-ext scrub seabios
sgabios sharutils sleuthkit supermin syslinux syslinux-common vagrant vagrant-libvirt xfsprogs zerofree
0 mis à jour, 114 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 30,5 Mo dans les archives.
Ensuite téléchargement de la VM our Valgrant :
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
$ curl https://az792536.vo.msecnd.net/vms/VMBuild_20190311/Vagrant/MSEdge/MSEdge.Win10.Vagrant.zip --output MSEdge.Win10.Vagrant.zip ... $ mkdir Vagrant $ mv MSEdge.Win10.Vagrant.zip Vagrant/. $ unzip MSEdge.Win10.Vagrant.zip
Ensuite on passe à la phase d’installation :
$ vagrant box add windows/win10-edge 'MSEdge - Win10.box' ==> box: Box file was not detected as metadata. Adding it directly... ==> box: Adding box 'windows/win10-edge' (v0) for provider: box: Unpacking necessary files from: file:///datadisk/Vagrant/MSEdge%20-%20Win10.box ==> box: Successfully added box 'windows/win10-edge' (v0) for 'virtualbox'! $ vagrant init windows/win10-edge A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant. $ vagrant plugin install vagrant-mutate Installing the 'vagrant-mutate' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: conflicting dependencies fog-core (~> 1.43.0) and fog-core (= 1.45.0) Activated fog-core-1.45.0 which does not match conflicting dependency (~> 1.43.0) Conflicting dependency chains: fog-core (= 1.45.0), 1.45.0 activated versus: vagrant-libvirt (> 0), 0.0.41 activated, depends on fog-core (~> 1.43.0) $ wget -c https://releases.hashicorp.com/vagrant/2.0.3/vagrant_2.0.3_x86_64.deb $ sudo dpkg -i vagrant_2.0.3_x86_64.deb (Lecture de la base de données... 365253 fichiers et répertoires déjà installés.) Préparation du dépaquetage de vagrant_2.0.3_x86_64.deb ... Dépaquetage de vagrant (1:2.0.3) sur (2.0.2+dfsg-2ubuntu8) ... Paramétrage de vagrant (1:2.0.3) ... Traitement des actions différées (« triggers ») pour man-db (2.8.3-2ubuntu0.1) ... $ vagrant plugin install vagrant-mutate ==> vagrant: A new version of Vagrant is available: 2.2.7! ==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html Installing the 'vagrant-mutate' plugin. This can take a few minutes... Fetching: vagrant-mutate-1.2.0.gem (100%) Installed the plugin 'vagrant-mutate (1.2.0)'! $ vagrant mutate windows/win10-edge libvirt Converting windows/win10-edge from virtualbox to libvirt. (100.00/100%) The box windows/win10-edge (libvirt) is now ready to use. $ vagrant box remove --provider virtualbox windows/win10-edge Removing box 'windows/win10-edge' (v0) with provider 'virtualbox'... $ vagrant up --provider libvirt --no-destroy-on-error The provider 'libvirt' could not be found, but was requested to back the machine 'default'. Please use a provider that exists.
Je n’aurai pas du supprimer la version virtualbox … mais bon le but était libvirt :
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'windows/win10-edge' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 The box 'windows/win10-edge' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Vagrant Cloud, please verify you're logged in via `vagrant login`. Also, please double-check the name. The expanded URL and error message are shown below: URL: ["https://vagrantcloud.com/windows/win10-edge"] Error: The requested URL returned error: 404 Not Found
Impossible de faire l’installation :
$ vagrant plugin install libvirt
Installing the 'libvirt' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies ffi (~> 0.6.3) and ffi (= 1.9.23)
Activated ffi-1.9.23
which does not match conflicting dependency (~> 0.6.3)
Conflicting dependency chains:
ffi (= 1.9.23), 1.9.23 activated
versus:
libvirt (> 0), 0.1.0 activated, depends on
ffi (~> 0.6.3)
$ vagrant plugin list
vagrant-mutate (1.2.0)
$ sudo vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
ERROR: Failed to build gem native extension.
current directory: /home/arias/.vagrant.d/gems/2.4.3/gems/ruby-libvirt-0.7.1/ext/libvirt
/opt/vagrant/embedded/bin/ruby -r ./siteconf20200407-13090-1gvs01e.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/vagrant/embedded/bin/$(RUBY_BASE_NAME)
--with-libvirt-include
--without-libvirt-include
--with-libvirt-lib
--without-libvirt-lib
--with-libvirt-config
--without-libvirt-config
--with-pkg-config
--without-pkg-config
extconf.rb:73:in `': libvirt library not found in default locations (RuntimeError) To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/arias/.vagrant.d/gems/2.4.3/extensions/x86_64-linux/2.4.0/ruby-libvirt-0.7.1/gem_make.out extconf failed,
exit code 1
Je vais donc refaire l’installation de libvirt :
$ sudo apt install qemu-kvm libvirt-bin ... Des erreurs ont été rencontrées pendant l'exécution : lvm2 libguestfs0:amd64 libguestfs-reiserfs:amd64 libguestfs-perl libguestfs-hfsplus:amd64 libguestfs-tools libguestfs-xfs:amd64