Problem installing Guest Additions on CentOS7 with Win10 host

General support questions
ramasaig
Posts: 7
Joined: 2017/02/27 15:40:57

Problem installing Guest Additions on CentOS7 with Win10 host

Post by ramasaig » 2017/02/27 17:31:16

Hello,

I have installed an Oracle VirtualBox with CentOS7 on my Windows 10 desktop without much trouble.
I now want to install MySQL (in the VM), for which it seems I need to share files with the host (because that's where my download MySQL install stub resides) and so require Guest Additions.

I have downloaded the additions from the VB site, and the *.iso file appears in 'c:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso'. It also appears in the VBox Manager under 'Storage...[Optical Drive]' but I cannot get it to install.

I've set up a Shared folder in VM Manager. When I run the VM and go to 'Devices > Shared Folders > Shared Folder Settings' I get a long error message telling me that Guest Additions have not been installed. If I select 'Devices > Insert Guest Editions CD image' (as instructed by the error message) I get another error message 'Unable to insert the virtual optical disk...' (presumably because it's already there?). If I look under 'Details' I see 'Could not mount the media/drive 'C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED)'. I end up going around in circles (mounting, un-mounting etc. etc.).

It would seem that for some reason I'm not managing actually to RUN the *.iso file.

I have seen there were questions about this a few years back, but they were with different versions. I've tried the suggestions there but without success. I'd appreciate some help here please. I must be missing some very simple step?

I'm new to VMs and CentOS but not to Windows.
Tim Dawson
Isle of Mull, Scotland

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by TrevorH » 2017/02/27 17:49:57

it seems I need to share files with the host (because that's where my download MySQL install stub resides) and so require Guest Additions.
You what? I really wouldn't try to run a mysql database with its data files on a vbox shared folder. Performance will be abysmal and selinux will throw a fit.
It would seem that for some reason I'm not managing actually to RUN the *.iso file.
You don't run the iso file. You mount it on say /mnt and then you run the file that's in /mnt that ends with .sh. But really, as above, I don't think you want to. What is that you have on your host machine that you need on the guest? I'd just copy them over and be done with it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by tunk » 2017/02/27 19:07:07

Can you access internet from your CentOS VM?
If that's the case and you don't mind using MariaDB (fork/successor to MySQL) then you can install it following the instructions here: https://mariadb.com/kb/en/mariadb/yum/

NB: I have no experience with DBs, so you may want to wait until someone more experienced can give you advice.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by TrevorH » 2017/02/28 02:15:51

CentOS 7 already ships mariadb in preference to mysql so yum install mariadb-server is the way to go.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ramasaig
Posts: 7
Joined: 2017/02/27 15:40:57

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by ramasaig » 2017/03/02 13:12:04

Thank you, TrevorH for your two replies.

I can't have explained my problem very well. I'm proposing to run the VM as an Apache server (a test-bed prior to purchasing a VPS for web hosting) so of course I want to run MySQL on my server, surely? I was trying to access the MySQL installation/download stub which is in my Win10 machine, in order to download MySQL into the VM.

I currently run an Apache server locally on the Win10 (with PHP & MySQL). It is only used for local testing, there's no public access. I'm trying to set up something close to identical on the VM.

Secondly the thing I'm trying to get to install is called 'VBox Guest Additions' and is nothing to do with MySQL. I'll see if I can get what you say to work.

Lastly, from your second reply (and the reply from 'tunk'): I've noticed that 'MariaDB' is shipped with CentOS. But I haven't yet been able to find anything that unequivocally states that existing MySQL DB files will run in MariaDB unaltered. At very least I'd have to edit all my PHP 'connect' files. I have several web sites using MySql (which I shall transfer to my VM server), so I was thinking of sticking with the devil I know. But I will follow up on your suggestions (and that from 'tunk').
Tim Dawson
Isle of Mull, Scotland

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by TrevorH » 2017/03/02 13:20:37

Mariadb is a fork of mysql which was made by the original mysql authors after Oracle and Sun bought mysql. It is binary compatible and works with existing code and SQL. You just need to yum install mariadb-server and you will have a running mariadb server. It should read existing mysql database files though I rather suspect the correct way to migrate, even from one mysql version to another, is by running mysqldump on the old server and importing into the mysql client on the new one.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ramasaig
Posts: 7
Joined: 2017/02/27 15:40:57

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by ramasaig » 2017/03/02 19:02:28

Thank you TrevorH.

It's good to have positive confirmation that MariaDB will handle MySQL files. I thought it probably was, but nothing like being sure. When it comes to migrating the database files I'm sure you're right about using mysqldump. It's the actual installation of MySql that is giving me a problem. Maybe I can avoid it by using MariaDB..

You said in your first reply:
What is that you have on your host machine that you need on the guest? I'd just copy them over and be done with it.
It's the 'copying over' that's giving me grief. According to what I have read, in order to do this I need to install 'VBox Guest Additions'.

I've followed the instructions given in a booklet I've got called 'Learning CentOS' (actually the instructions for installing CentOS, which worked) but I've modified them to mount the ''VBoxGuestAdditions.iso'. According to the VirtualBox Manager I've got the VboxGuestAdditions.iso' duly mounted. It's supposed to 'run' (or be installed) when I click the large green arrow in VirtualBox Manager. When I do that the VM command box duly opens, but 'VBoxGuestAdditions' does not seem to have been added. I just go round in circles.

I'd be the first to accept that the solution is probably very simple, and that my difficulty is caused by my unfamiliarity with CentOS and VBoxes generally. Perhaps this isn't really a CentOS problem and I'd do better to look in a VirtulBox forum.
Tim Dawson
Isle of Mull, Scotland

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by TrevorH » 2017/03/02 20:37:17

You don't need the guest additions to copy files over. You can use scp for example.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ramasaig
Posts: 7
Joined: 2017/02/27 15:40:57

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by ramasaig » 2017/03/03 00:07:55

Thank you TrevorH.

Not being familiar with Linux I'll need to find out the syntax for 'scp'. I'm sure that won't be difficult.

I'm also quite interested to work out why I don't seem able to install 'VBoxGuest Additions' as it seems to enable a number of functions which may be useful. Like making the clipboard work between host and guest. If I can't install it I may find something else is wrong too.
Tim Dawson
Isle of Mull, Scotland

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Problem installing Guest Additions on CentOS7 with Win10 host

Post by tunk » 2017/03/03 14:32:27

You probably want to run e.g. winscp or filezilla on your windows host to transfer files to your CentOS VM.

Post Reply