0

some days ago I realized that my vps lost files in /etc/init.d/ which was completely empty. So I decided to make a clean install of the OS (ubuntu 10.04 on OPENVZ)

i restored the OS template on my VPS, reinstalled the basic stuff, htop, nginx, php5, php5-fpm, phpmyadmin, mysql, nano and vsftpd. I created my user, added it as SU user. the /etc/init.d is full and normal, DIDNT change anything except those deamons conf and restarted them after every change so everything was ok , I could access via SSH with my user, pERFECT. I reboot my VPS, bam, im locked out! ram seems to be there about 38MB used (ok maybe something is not starting) but sshd and webserver are not starting so sites wont load and i can't do anything! I asked my provider (spacerich) to tell me if there's some way I can access the vps, so I'm waiting for them to respond. what exactly is the procedure to follow in this case?

Anyway now that I think about it I think I found the reason: I did an "apt-get upgrade", do you think that could be the problem? Should I never do it on OPENVZ? IS the SolusVM console supposed to give me access anyway? (which is currently disabled)

Sandro Antonucci
  • 183
  • 2
  • 10

3 Answers3

0

With Xen and a new virtual machine installation it was easy to hit a similar bug with Debian installation images; by default udev was not installed and that was required for starting ssh server.

So in my case a simple apt-get install udev made the trick. Check out your process list and see if udev is running or not.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • if I had access to the VPS I would :) – Sandro Antonucci Sep 06 '10 at 12:43
  • Oh, I thought you could have some kind of remote console view there. If not, then this is more difficult to solve. – Janne Pikkarainen Sep 06 '10 at 13:02
  • If you have no access to the server, either physically or via somewhere else, and your remote access has failed, your question is pretty much "how do I hack into a server that's not online". – James L Sep 06 '10 at 14:17
  • lol :) anyway they put the server back online saying it's an issue with ubuntu template and ip configuration in fact if I reboot it it will be back to the starting point with no access. what I'd like to know is "does solusvm console give me access to the serial console without having SSH started"? If it does they should totally active it for my account otherwise how can I manage my unmanaged VPS in those situations?? – Sandro Antonucci Sep 06 '10 at 15:51
  • The "issue with ubuntu template and ip configuration" sounds like there is a bug in your VPS-provider's system, no? – JanC Sep 06 '10 at 17:59
  • yup it's theirs :) at least that, I know I didn't do it. They will fix the template soon, I just have to avoid rebooting in the meanwhile :) – Sandro Antonucci Sep 06 '10 at 19:20
0

If they can determine RAM usage, it sounds like it has booted up. If you can't PING it, it may well have failed to start network configuration. It's hard to say why, /etc/init.d/network might be doing the wrong thing (no idea what), or perhaps the VM has ended up on eth2 or 3 instead of eth0 after a reboot (I've seen that happen before).

If you can get access, do an ifconfig - if the lo isn't there you've probably not started network at all. If it is there but eth* isn't, do ls -al /etc/sysconfig/network-scripts/ifcfg-eth* and then ifup eth[whatever_number_it_returned]. If you try that and it says "network adapter not present" or similar, do dmesg | grep eth and see if it says, eg. it has moved to eth4 - then move /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-eth4, open it in a text editor and change the label to eth4, and then try ifup eth4

James L
  • 6,025
  • 1
  • 22
  • 26
0

I see apt-get is your package manager.

If you are using Debian Sid or Testing, these break OpenVZ compatibility with their core packages (kernel, systemD stuff) almost constantly. After the third go around I just switched to Fedora.

Arthur Kay
  • 471
  • 2
  • 10