Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: "Headless" VMs on Startup

  1. #1
    Join Date
    Mar 2012
    Location
    /home/ubun2to
    Beans
    356
    Distro
    Ubuntu 13.04 Raring Ringtail

    "Headless" VMs on Startup

    I set VirtualBox to launch my Windows XP VM at startup so I can run some applications for work. I used the command:
    Code:
    vboxmanage startvm Windows-XP
    It worked yesterday.
    However, it didn't show when I booted up today, so I went to start it manually. It said it was already open. According to the System Monitor, it was "headless", so I had to kill it from there.
    So, why does it do that?
    Backups are amazing. 99% of data loss can be prevented by spending less than $100 on an external drive.
    If you have seen an error, there is a good chance someone else has, too. Google is your friend.

  2. #2
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: "Headless" VMs on Startup

    Try using:
    Code:
    VBoxManage startvm --type gui  Windows-XP
    To force it to start in GUI mode (although this is the default option so it may not make any difference).

    If this still doesn't work then you may also need to prepend a sleep command to make sure that your VM isn't starting before the window manager is fully loaded:
    Code:
    sleep 5 && VBoxManage startvm --type gui  Windows-XP
    Cheesemill

  3. #3
    Join Date
    Mar 2012
    Location
    /home/ubun2to
    Beans
    356
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: "Headless" VMs on Startup

    Quote Originally Posted by Cheesemill View Post
    Try using:
    Code:
    VBoxManage startvm --type gui  Windows-XP
    To force it to start in GUI mode (although this is the default option so it may not make any difference).

    If this still doesn't work then you may also need to prepend a sleep command to make sure that your VM isn't starting before the window manager is fully loaded:
    Code:
    sleep 5 && VBoxManage startvm --type gui  Windows-XP
    I tried both, and it still won't appear-it remains "headless". Should I adjust sleep from 5 to 10 or 15?
    Does it matter what desktop interface you are using?
    Backups are amazing. 99% of data loss can be prevented by spending less than $100 on an external drive.
    If you have seen an error, there is a good chance someone else has, too. Google is your friend.

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

    Re: "Headless" VMs on Startup

    Quote Originally Posted by Ubun2to View Post
    I tried both, and it still won't appear-it remains "headless". Should I adjust sleep from 5 to 10 or 15?
    Does it matter what desktop interface you are using?
    It shouldn't matter what DE you are using.

    Is the VM just running in the background instead of showing in the VBox manager?

    EDIT: I've been running this command to start my VMs headless, it's similar to the one Cheesemill suggested:
    vboxmanage startvm vmname --type headless

    Try changing the sleep time.
    Last edited by CharlesA; June 25th, 2012 at 11:26 PM.
    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
    Mar 2012
    Location
    /home/ubun2to
    Beans
    356
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: "Headless" VMs on Startup

    Quote Originally Posted by CharlesA View Post
    It shouldn't matter what DE you are using.

    Is the VM just running in the background instead of showing in the VBox manager?

    EDIT: I've been running this command to start my VMs headless, it's similar to the one Cheesemill suggested:
    vboxmanage startvm vmname --type headless

    Try changing the sleep time.
    Did that, and it still is not working.
    It's running in the background-I can't bring it up, it just shows up in System Monitor. VirtualBox says it is already on, but provides no way to get to it.
    Also, I don't want to start it headless, if you need to know that.
    Backups are amazing. 99% of data loss can be prevented by spending less than $100 on an external drive.
    If you have seen an error, there is a good chance someone else has, too. Google is your friend.

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

    Re: "Headless" VMs on Startup

    If you start it with --type gui, it should launch automatically.

    Does it launch if you shut it down and try to launch it that way without rebooting?
    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
    Mar 2012
    Location
    /home/ubun2to
    Beans
    356
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: "Headless" VMs on Startup

    Quote Originally Posted by CharlesA View Post
    If you start it with --type gui, it should launch automatically.

    Does it launch if you shut it down and try to launch it that way without rebooting?
    Still launches it headless. It shows up as headless in the System Monitor. I do have --type gui in the startup command.
    Backups are amazing. 99% of data loss can be prevented by spending less than $100 on an external drive.
    If you have seen an error, there is a good chance someone else has, too. Google is your friend.

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

    Re: "Headless" VMs on Startup

    Odd.

    What happens if you launch it directly from vbox manager?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

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

  9. #9
    Join Date
    Mar 2012
    Location
    /home/ubun2to
    Beans
    356
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: "Headless" VMs on Startup

    Quote Originally Posted by CharlesA View Post
    Odd.

    What happens if you launch it directly from vbox manager?
    If I press the icon for VirtualBox, I can load it perfectly.
    If I press the .vbox virtual machine icon from the VirtualBox VMs folder for my VM, it also loads perfectly. I can also load it via terminal using:
    Code:
    VBoxManage startvm Windows-XP
    Is there a command to load a file via terminal? I've been looking around, but can't find a command to load a specific file.
    Also, is there a way to use the cd command and load a file from that specific directory that you switch terminal to in one command? If so, that could make it start VirtualBox correctly.
    Last edited by Ubun2to; June 26th, 2012 at 02:59 AM.
    Backups are amazing. 99% of data loss can be prevented by spending less than $100 on an external drive.
    If you have seen an error, there is a good chance someone else has, too. Google is your friend.

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

    Re: "Headless" VMs on Startup

    It goes off the name of the virtual machine.

    After starting it from the GUI, are you able to run it with VirtualBox --startvm Windows-XP from a terminal?
    Last edited by CharlesA; June 26th, 2012 at 03:00 AM. Reason: case sensitive
    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 3 123 LastLast

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
  •