Guest crash on ubuntu startup

Discussions related to using VirtualBox on Linux hosts.
Post Reply
latoubes
Posts: 3
Joined: 15. Jun 2009, 13:04
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: Ubuntu & Windows 2003

Guest crash on ubuntu startup

Post by latoubes »

Hi,

This is my configuration,
Virtualbox 2.2.4.
Host -> Ubuntu 9.04, Kernel version 2.6.28-11-generic
Guest -> Ubuntu 8.04 LTS

I made a script for start/stop the Guest when the Ubuntu Host start and stop.

This script work perfect if i executed when the Ubuntu Host was completely started but if i try to put this script in the boot process of Ubuntu, the guest crash!..

This is the log catched of the Guest

Code: Select all

00:00:00.036 VirtualBox 2.2.4 r47978 linux.amd64 (May 29 2009 17:33:13) release log
00:00:00.036 Log opened 2009-06-17T15:14:15.384369000Z                             
00:00:00.036 OS Product: Linux                                                     
00:00:00.036 OS Release: 2.6.28-11-generic                                         
00:00:00.036 OS Version: #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009               
00:00:00.036 Executable: /usr/lib/virtualbox/VBoxHeadless                          
00:00:00.036 Process ID: 3296                                                      
00:00:00.036 Package type: LINUX_64BITS_UBUNTU_9_04                                
00:00:00.047 VRDP: TCP server listening on port 3391.                              
00:00:00.102 SUP: Loaded VMMR0.r0 (/usr/lib/virtualbox/VMMR0.r0) at 0xffffffffa017cfe0 - 
ModuleInit at ffffffffa018d8a0 and ModuleTerm at ffffffffa018d860                        
00:00:00.102 SUP: VMMR0EntryEx located at ffffffffa018d790, VMMR0EntryFast at ffffffffa01
8ca30 and VMMR0EntryInt at ffffffffa018c810                                              
00:00:00.142 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={9511bc54-15ee-4ddf-808e
-472aba03809c} aComponent={Console} aText={Unknown error creating VM (VERR_GENERAL_FAILUR
E)} aWarning=false, preserve=false                                                       
00:00:00.170 Power up failed (vrc=VERR_GENERAL_FAILURE, rc=NS_ERROR_FAILURE (0X80004005))
00:00:00.398 VRDP: TCP server closed.

This is the script, based on http://farfewertoes.com/code/vboxcontrol/

Code: Select all

#! /bin/sh
### BEGIN INIT INFO
# Provides:          vboxboot  
# Required-Start:    $local_fs $syslog $remote_fs vboxdrv
# Required-Stop:     $local_fs $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: Virtual Box Images Boot
# Description:       Script for start/stop/reload/status list of VirtualBox Images
### END INIT INFO
#
# Copyright (c) 2009 Luis Toubes . toubes@gmail.com
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the
# Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice
# shall be included in all copies or substantial portions of
# the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Options
# The username assigned to run the images.
VBOX_USER='sysat'
# List of Images to start/stop
VBOX_IMAGE_LIST='Lisa seymour stud'
# VirtualBox Command-Line Manager
VBOX_MANAGER='/usr/bin/VBoxManage'

#COSAS NUEVAS
export PATH="${PATH:+$PATH:}/bin:/usr/bin:/usr/sbin:/sbin"
#PATH=/usr/sbin:/usr/bin:/sbin:/bin
#FIN


# Exit if the package is not installed
[ -x "$VBOX_MANAGER" ] || exit 0

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

# Start Script for VirtualBox Images
do_start() {
    for d in $VBOX_IMAGE_LIST
      do        
        log_action_msg "Starting VM '$d' ..."
        # Check if the VM is already running
        sudo -H -u $VBOX_USER $VBOX_MANAGER showvminfo "$d"|grep "^State:\s*running" >/dev/null && {
            log_action_msg "Ups!, '$d' is already running ..."
            continue #Go to the next element
        }

        # Starting the VM and check if is failed
        sudo -H -u $VBOX_USER $VBOX_MANAGER startvm "$d" -type vrdp >/dev/null || {
             log_action_msg "Oh, no!!!, failed to start '$d' ..."
             continue #Go to the next element
        }
	log_action_msg "'$d' started!"
      done
      return 0
}

# Stop Script for VirtualBox Images
do_stop() {
    for d in $VBOX_IMAGE_LIST
      do
        log_action_msg "Shutting down VM '$d' ..."
        # Check if the VM is already stopped
        sudo -H -u $VBOX_USER $VBOX_MANAGER showvminfo "$d"|grep "^State:\s*running" >/dev/null || {
          log_action_msg "Ups!, '$d' is already stopped ..."
          continue
        }

        sudo -H -u $VBOX_USER $VBOX_MANAGER controlvm "$d" savestate >/dev/null || {
           log_action_msg "Oh, no!!!, failed to stop '$d' ..."
           continue
        }       
      log_action_msg "'$d' suspended!"
      done
      return 0
}

do_restart() {
   do_stop
   do_start
}

do_status() {
    for d in $VBOX_IMAGE_LIST
      do
	log_action_msg "'$d': "
        sudo -H -u $VBOX_USER $VBOX_MANAGER showvminfo "$d" | grep "^State:\s*.*$"
      done 
}

   # Daemon service
   case "$1" in
     start)
        do_start
        ;;
     stop)
        do_stop
        ;;
     restart|reload)
        do_restart
        ;;
     status)
        do_status
        ;;
     *)
         log_failure_msg "Usage: $0 {start|stop|status|restart}" >&2
         exit 3
         ;;
    esac

    exit 0
Any help??? Should i post this in Ubuntu forums???
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Guest crash on ubuntu startup

Post by Perryg »

It does not sound like it is a VirtualBox issue to me since this is a special script that is not working properly in Ubuntu. I would talk to them.
latoubes
Posts: 3
Joined: 15. Jun 2009, 13:04
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: Ubuntu & Windows 2003

Re: Guest crash on ubuntu startup

Post by latoubes »

To put the script in the boot process of Ubuntu i used

Code: Select all

$> update-rc.d -f vboxboot defaults 99 10

And this is the permission of the script

-rwxr-xr-x 1 root root 3968 2009-06-17 18:45 /etc/init.d/vboxboot

Really don't know what i am doing wrong !!! :cry:

I try to post the script in Ubuntu forums...

Thks :)
Post Reply