[WorksForMe] Miss OS file directories after reboot of OS

This is for discussing general topics about how to use VirtualBox.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Miss OS file directories after reboot of OS

Post by Perryg »

Pretty much only Linux users would know what LEMP or LAMP meant, but it is a valid acronym. LEMP (Linux, Nginx, MySQL, and PHP) has a smaller footprint by design but I don't understand what this would have to do with VirtualBox as it is OS specific code and not actually controlled by VirtualBox.
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

scottgus1 wrote:Have you tried shutting down the guest from within the guest's OS, using its built-in Shut Down feature?
I was exiting users and then "power off" but I get the same results with the ACPI shutdown.
I just tried "shutdown" in the OS and it did look like it was gracefully shutting down, waited 60 seconds before executing, but the directory was missing again on reboot.
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

Perryg wrote:...I don't understand what this would have to do with VirtualBox as it is OS specific code and not actually controlled by VirtualBox.
I'm not sure where the problem lies and that's why I'm asking. Like I said I've never experienced this with my live servers but again I've only ever rebooted them via console, not power cycled them. I would think as /run/ and /var/run/ are default locations for sockets this issue would be documented but there's practically nothing in google results for it.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Miss OS file directories after reboot of OS

Post by Perryg »

I can pretty much say with certainty that this is not a VirtualBox issue. I asked in your other thread if you had talked to them and until you do and can show that this is actually an issue with VirtualBox I have nothing more to add to this discussion.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Miss OS file directories after reboot of OS

Post by Martin »

Are these "installed to the virtual harddisk" guests or are you maybe just running lifeboot ISOs?
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

Yeah installed to virtual hard disc. I forget which option, I just chose the defaults.

The rest of my changes stick and my full websites are there but won't show because php-fpm can't run without the directory.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Miss OS file directories after reboot of OS

Post by socratis »

pom wrote:Yeah installed to virtual hard disc
I haven't seen the slightest proof for that.
  1. Start the VM. Not from a saved or paused state. Clean start.
  2. Take the steps required to generate/observe the error.
  3. Shut down the VM (if it hasn't aborted by itself). Not saved or paused. Completely shut down. If you can't shut it down by normal means, close the VM window and select "Power off".
  4. Right-click on the VM in the VirtualBox Manager. Select "Show Log..."
  5. Save it (only the first VBox.log), ZIP it and attach it to your response (see the "Upload attachment" tab below the reply form).
I would also like to see the "recipe" of the VM, the ".vbox" file:
  1. Right-click on the VM in the VirtualBox Manager. Select "Show in Finder/Explorer/Whatever".
  2. ZIP the selected ".vbox" file and attach it to your response.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

Ok, here's the log and .vbox...
log and vbox.zip
(22.62 KiB) Downloaded 13 times
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

Here's a couple of screenshots too if they're any help.

Making the /run/php/ directory, setting permissions, enabling php-fpm to run at start, and shutdown from the OS.
VirtualBox_old crumplclobber_09_08_2017_15_58_21.png
VirtualBox_old crumplclobber_09_08_2017_15_58_21.png (10.63 KiB) Viewed 2679 times
Rebooted, checked the status of php-fpm and for the /run/php/ directory...
VirtualBox_old crumplclobber_09_08_2017_16_04_18.png
VirtualBox_old crumplclobber_09_08_2017_16_04_18.png (14.64 KiB) Viewed 2679 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Miss OS file directories after reboot of OS

Post by Perryg »

https://serverfault.com/questions/61546 ... ntu-server
/var/run is a temporary mounted filesystem, that is re-created after each reboot, so changes are not persisted in it. So in order to have a custom directory for socket files you will have to create it every time. The best place to add such functionality is an upstart config for PHP FPM....
/run is pretty much the same thing. Like I said it is package/OS specific and not an issue with VirtualBox.
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: Miss OS file directories after reboot of OS

Post by pom »

Yeah I found that thread and another.

Their solutions are to create a global pid but it is already explicitly set in my case, I've double checked the conf file to make sure. "enable" in centos initialises the process to start at boot which I have done too.
You might very well be right that it is OS specific but the issue has only been brought to my attention by using virtualbox and I'm only asking here in case any others have had similar experience.
If it is OS specific I might never have know until a power outage or similar on my remote servers as they have the exact same setup as my guests.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Miss OS file directories after reboot of OS

Post by socratis »

pom wrote:If it is OS specific I might never have know until a power outage or similar on my remote servers as they have the exact same setup as my guests.
I would hurry then and fix the real servers, to prevent a power outage wiping the real deal. But, as Perryg found out, this is definitely *not* a VirtualBox problem. I'll mark the thread as [WorksForMe].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pom
Posts: 13
Joined: 9. Aug 2017, 06:18

Re: [WorksForMe] Miss OS file directories after reboot of OS

Post by pom »

[solved] It's definitely not virtualbox specific in my case.
There is a /run/php-fpm/ directory that is persistent after hard boots and I've been trying to force it on /run/php/ which isn't.
Still not entirely sure why, I'm guessing it's a difference between my typical LEMP install notes and a php version outside of the main repo, and I'm creating a process that can't start again after a hard boot.
socratis wrote:I would hurry then and fix the real servers, to prevent a power outage wiping the real deal.
I'm on it. If any good's came out of this it's that virtualbox has alerted me to a potential problem. All's well that ends well.
Thanks for your help.
Post Reply