How to do a Vagrant upgrade from Ubuntu 12 to 14 (precise64 to trusty64)

David

I’ve built a server on precise64 box (Ubuntu 12) and now want to upgrade it to trusty64 (Ubuntu 14). Can I simply change the config.vm.box from ubuntu/precise64 to ubuntu/trusty64 and then do a vagrant provision (or is it reload?), or will this potentially cause problems on my existing vm which has a lot of software installed on it already?

Giacomo1968

Can I simply change the config.vm.box from ubuntu/precise64 to ubuntu/trusty64 and then do a vagrant provision (or is it reload?), or will this potentially cause problems on my existing vm which has a lot of software installed on it already?

Well, if you change the value from ubuntu/precise64 to ubuntu/trusty64 all that will do is indicate that if you destroy the existing Vagrant VM (via vagrant destroy [box name]) and then rebuild it via vagrant up [box name] that the new Vagrant box will be ubuntu/trusty64. Meaning, you will not affect an OS upgrade of your existing boxes by simply changing the value of config.vm.box.

Upgrading Ubuntu 12 to 14 on an existing virtual machine.

If you want to upgrade your existing box to Ubuntu 14 from Ubuntu 12 without affecting already installed software on the the Ubuntu 12 install, you need to SSH into that Ubuntu 12 box and run this command to get the update manager core package installed:

sudo apt-get install update-manager-core

The run do-release-upgrade to actually do the upgrade from Ubuntu 12 to Ubuntu 14:

sudo do-release-upgrade

That said, read my note at the bottom on how a clean upgrade from one major release of an OS to another is not as simple as you might think.

You should investigate using provisioning scripts.

But that said, this is really not the way Vagrant should be upgraded or what it’s intended for. You are saying you have tons of software installed on the box, but if you installed those manually, you are not really leveraging Vagrant’s core strength: The ability to build, destroy and rebuild virtual machines on demand.

The way I use Vagrant is to have it build boxes but also run a provisioning script that can automate the process of software install and configuration.

You might need to reinstall or upgrade software and configs anyway.

But that said, when I had to upgrade my own Vagrant stuff from Ubuntu 12 to Ubuntu 14, I had to adjust my provisioning scripts to account for new items such as new file system locations, new versions of core software and such… Meaning, it’s not always a straightforward process and is highly dependent on what software you are using and what your specific configuration of that software is.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can't start gulp on Vagrant VM (Ubuntu, precise64)

From Dev

Can't start gulp on Vagrant VM (Ubuntu, precise64)

From Dev

How to config "ubuntu/trusty64" Vagrant box properly on Windows 10?

From Dev

How to install other distros than precise64 in Vagrant?

From Dev

How to install firefox in precise64 vagrant box

From Dev

Vagrant ubuntu/trusty64 apache2.4.7 not showing *.css files

From Dev

How do I upgrade Ubuntu OS from 32 to 64 bit?

From Dev

How To Achieve Python3.4 Virtualenv For Precise64 VirtualBox

From Dev

How To Achieve Python3.4 Virtualenv For Precise64 VirtualBox

From Dev

How do I upgrade Vagrant to the latest version in Ubuntu?

From Dev

Upgrade Ubuntu from 32 to 64 bit edition

From Dev

Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

From Dev

Should I upgrade to "Ubuntu 14.04 'Trusty Tahr'" from "Ubuntu 12.04 LTS" and what care do I need to take if I upgrade?

From Dev

How to upgrade Vagrant?

From Dev

Getting node.js and grunt to run on Vagrant box (ubuntu-precise12042-x64-vbox43)

From Dev

How to upgrade from Ubuntu minimal?

From Dev

How to upgrade from Ubuntu minimal?

From Dev

How do I upgrade from JavaVM 32bit to JavaVM64bit

From Dev

How to make Android's aapt and adb work on 64-bit Ubuntu without ia32-libs (works for versions 12, 13 and 14)

From Dev

unresolved host / Upgrade 12 to 14 Ubuntu/ Net Connection fine through browser

From Dev

Unable to do su or sudo after upgrade from 13 to 14

From Dev

Vagrant SSH failed with ubuntu/xenial64

From Dev

How do I upgrade everything on Ubuntu

From Dev

How do I provision a Dockerfile from Vagrant

From Dev

Stata 14 fails to start on Ubuntu 16.10/17.04/17.10, with "libpng12.so.0" error. How do I install libpng12?

From Dev

Unable to scp files to Ubuntu 14 with Vagrant

From Dev

How to upgrade Ubuntu from an ISO image

From Dev

How to upgrade from Ubuntu 14.04 to Xubuntu 16.04?

From Dev

How to upgrade Ubuntu from 19.04 to 19.10

Related Related

  1. 1

    Can't start gulp on Vagrant VM (Ubuntu, precise64)

  2. 2

    Can't start gulp on Vagrant VM (Ubuntu, precise64)

  3. 3

    How to config "ubuntu/trusty64" Vagrant box properly on Windows 10?

  4. 4

    How to install other distros than precise64 in Vagrant?

  5. 5

    How to install firefox in precise64 vagrant box

  6. 6

    Vagrant ubuntu/trusty64 apache2.4.7 not showing *.css files

  7. 7

    How do I upgrade Ubuntu OS from 32 to 64 bit?

  8. 8

    How To Achieve Python3.4 Virtualenv For Precise64 VirtualBox

  9. 9

    How To Achieve Python3.4 Virtualenv For Precise64 VirtualBox

  10. 10

    How do I upgrade Vagrant to the latest version in Ubuntu?

  11. 11

    Upgrade Ubuntu from 32 to 64 bit edition

  12. 12

    Why do I get these .vimrc errors in Ubuntu 14 after upgrade from Ubuntu 13?

  13. 13

    Should I upgrade to "Ubuntu 14.04 'Trusty Tahr'" from "Ubuntu 12.04 LTS" and what care do I need to take if I upgrade?

  14. 14

    How to upgrade Vagrant?

  15. 15

    Getting node.js and grunt to run on Vagrant box (ubuntu-precise12042-x64-vbox43)

  16. 16

    How to upgrade from Ubuntu minimal?

  17. 17

    How to upgrade from Ubuntu minimal?

  18. 18

    How do I upgrade from JavaVM 32bit to JavaVM64bit

  19. 19

    How to make Android's aapt and adb work on 64-bit Ubuntu without ia32-libs (works for versions 12, 13 and 14)

  20. 20

    unresolved host / Upgrade 12 to 14 Ubuntu/ Net Connection fine through browser

  21. 21

    Unable to do su or sudo after upgrade from 13 to 14

  22. 22

    Vagrant SSH failed with ubuntu/xenial64

  23. 23

    How do I upgrade everything on Ubuntu

  24. 24

    How do I provision a Dockerfile from Vagrant

  25. 25

    Stata 14 fails to start on Ubuntu 16.10/17.04/17.10, with "libpng12.so.0" error. How do I install libpng12?

  26. 26

    Unable to scp files to Ubuntu 14 with Vagrant

  27. 27

    How to upgrade Ubuntu from an ISO image

  28. 28

    How to upgrade from Ubuntu 14.04 to Xubuntu 16.04?

  29. 29

    How to upgrade Ubuntu from 19.04 to 19.10

HotTag

Archive