[PYTHON] Move the environment created with Oracle VM Virutual Box and Cent OS 7 to another computer

What kind of person is the article for?

The countdown for the new year is approaching. I think there are many people who will jump out into a new world from next year. Some of them may find it troublesome to recreate a virtual environment created with Cent OS. At that time, I wrote the fabric for those who want to take over the virtual environment to another computer.

Reason for writing the article

The other day, when I tried to install a map module called Cartopy in Python, I got a long error and could not install it. I asked a question on qiita and told me the cause, but as shown in https://qiita.com/Daisuke__/items/99de0098ec5668070f75, using two types of module installation commands, conda and pip, breaks the environment. There seems to be something. When I installed the module, I searched Google teachers in the form of "installation of ..." and introduced it while looking at new articles, so it seems that I touched this taboo without knowing it. is. So, I decided to take this opportunity to create a new environment, but I faced the problem of ** mouse integration and automatic screen resizing not working **. When I first started using Linux, I set it up while looking at online articles, but I forgot how I did it. Fortunately, I had a virtual environment clone before mixing pip and conda, so I succeeded in installing the module using it, but I noticed ** that? Isn't it clogged if the computer changes? **. Later, I succeeded in introducing Guest Additions, but every time the computer changed, it was troublesome to recreate the virtual environment, so I tried to see if I could move the created virtual environment to another computer. At that time, as a beginner, I had some trouble, so I wrote an article as a log.

environment

The desktop that originally has Cent OS For ** Windows 10 **, VirtualBox used ** VirtualBox 6.0.14 ** downloaded from https://www.virtualbox.org. Laptops for those who move the environment I used ** Windows 10 ** and ** VirtualBox 6.0.14 **. I'm not sure if it's okay to straddle different OSs like Windows → MacOS, so I'd be happy if anyone could report it. (Because I personally plan to replace it with a Mac) CentOS-7x86_64-DVD-1908, Liunx Redhat 64bit.

What did you do

** Operation on the original computer ** First, I investigated where the guest OS I am currently using is stored.

C:\Users\Owner\VirtualBox VMs\"name"\"name".vdi

It seems that it is saved in. You can find it in the file path to the location in the information by opening Virtual Box and clicking Settings> Storage> Controller: SATA. image.png

Caution It's about 16GB, so it's quite heavy. I used SSD, USB, etc. to move the files.

Save this and move the operation to your laptop. ** Operation on the transferer's computer ** First, download Virtualbox from https://www.virtualbox.org. Then download Cent OS. Click Get CensOS Now and press Older Version (scroll down) then click here to select version 7. I haven't tried the latest Cent OS. image.png image.png image.png Even if you do not download Cent OS, it may be included in the saved file, so you may not need to download it, but download it just in case. ** Add virtual machine ** Click "Tools" in VirtualBox, select "Add (A)", and earlier image.png I selected the clone I saved earlier and started it up safely.

** Addition ** I was using about 90 GB out of 100 GB on my laptop, so I saved the clone file on an external SSD and started it, but it started quickly. It depends on the personal computer and other environment, but if it is an external hard disk, reading is slow and an error occurs, so I am using SSD.

At the end

I posted an article about ** how to integrate the mouse and automatically resize the screen of the guest OS **, so please refer to that. https://qiita.com/8M5MgHqNywfgw7q/items/69235bc2b239573acdbd

Recommended Posts

Move the environment created with Oracle VM Virutual Box and Cent OS 7 to another computer
Move what you installed with pip to the conda environment
I want to connect remotely to another computer, and the nautilus command
To improve the reusability and maintainability of workflows created with Luigi
Instantiation of the BOX development environment created earlier