Page 1 of 2 12 LastLast
Results 1 to 10 of 60

Thread: VBox as a service in Lucid

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    The last place I look
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    VBox as a service in Lucid

    I have an ubuntu Desktop server that I run semi-headless and connect to remotely. upon it I have a Virtual box instance, running an ubuntu server edition server (rsyslogd server).
    When I reboot I have to login to the box over freenx to start the log server (and to shut it down prior to shutdown).

    I would like to run the logserver instance as a service, and I have investigated several init.d scripts to integrate it, but none of them have worked right for me. I notice that this topic has changed a great deal over the years.

    Can anyone point me to an autostart tutorial/script for VBox VMs that is sure to work with lucid x64 hosts?

    Thanks
    Things are rarely just crazy enough to work, but they're frequently just crazy enough to fail hilariously.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: VBox as a service in Lucid

    Hi,

    Have you checked my startup/shutdown script here?

    I have it set to run a loop, but if you are starting just one VM, you can modify the script to do that instead.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Dec 2007
    Location
    The last place I look
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: VBox as a service in Lucid

    Quote Originally Posted by CharlesA View Post
    Hi,

    Have you checked my startup/shutdown script here?

    I have it set to run a loop, but if you are starting just one VM, you can modify the script to do that instead.
    Rock On! I'll give em a try!
    Things are rarely just crazy enough to work, but they're frequently just crazy enough to fail hilariously.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: VBox as a service in Lucid

    Let me know if you run into any problems. I tested it on my Lucid box with VBox 4 without any problems, but nothing is perfect.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Dec 2007
    Location
    The last place I look
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: VBox as a service in Lucid

    ok, almost there methinks.

    on start the script exits with:
    Code:
    Host:/$ sudo service vmboot start
    No Saved VMs to start!
    Host:/$ sudo service vmboot status
    No VMs Currently Running!
    so I started going after the vboxmanage list calls:
    Code:
    Host:/$ vboxmanage list vms | sed -e 's/^".*".*{\(.*\)}/\1/'
    b1f339e8-6351-45fb-9edd-5c8A84d346cf
    Host:/$ v=`vboxmanage list vms | sed -e 's/^".*".*{\(.*\)}/\1/'`; vboxmanage showvminfo $v | grep saved
    Host:/$ v=`vboxmanage list vms | sed -e 's/^".*".*{\(.*\)}/\1/'`; vboxmanage showvminfo $v
    Name:            LogServer_Lucid32
    Guest OS:        Ubuntu
    UUID:            b1f339e8-6351-45fb-9edd-5c81b4d346cf
    <snip />
    I removed the grep and:
    Code:
    Host:/$ sudo service vmboot start
    Waiting for VM "LogServer_Lucid32" to power on...
    VM "LogServer_Lucid32" has been successfully started.
    so is there any danger to this mod? it seems reasonable, but...

    Thanks for your help Charles,
    Franklin
    Last edited by doas777; September 16th, 2011 at 05:00 AM.
    Things are rarely just crazy enough to work, but they're frequently just crazy enough to fail hilariously.

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: VBox as a service in Lucid

    Nah no danger. The script was designed to start any vm that was in a saved state, which is why it runs grep.

    Were you trying to start a vm from a powered off state?

    Also, how were you able to get it to run via service? I recall trying that and it not working.
    Last edited by CharlesA; September 16th, 2011 at 02:28 PM.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    May 2013
    Beans
    4

    Re: VBox as a service in Lucid

    i cant seem to make it work please help me.. what vbox user am i looking for? iv tried several user but cant make it work.. please help

  8. #8
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: VBox as a service in Lucid

    The user in these scripts should be the one that owns the VMs. The default installation of vbox puts the VM directories under $HOME of the user who's installing the package, which normally is your own home directory. In that case, VBOXUSER in the scripts should be set to your user name.

    Hope this helps...

    EDIT: I see that Charles runs his VMs under a different user name, but that may be a bit advanced for you if you're having problems getting the scripts to work. Use a search utility such as find or catfish to locate your *.vdi files, which will be in a subdirectory of some user's home directory. That user will be the one to use.
    Last edited by JKyleOKC; May 10th, 2013 at 06:11 AM. Reason: add some details
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  9. #9
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: VBox as a service in Lucid

    Quote Originally Posted by JKyleOKC View Post
    The user in these scripts should be the one that owns the VMs. The default installation of vbox puts the VM directories under $HOME of the user who's installing the package, which normally is your own home directory. In that case, VBOXUSER in the scripts should be set to your user name.

    Hope this helps...

    EDIT: I see that Charles runs his VMs under a different user name, but that may be a bit advanced for you if you're having problems getting the scripts to work. Use a search utility such as find or catfish to locate your *.vdi files, which will be in a subdirectory of some user's home directory. That user will be the one to use.
    This pretty much covers it.

    If there is only one user on the machine, the VMs would be run under that user's account.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  10. #10
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: VBox as a service in Lucid

    You need to tell it to run as whatever user you have those VMs running as. I have mine running under vboxuser.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •