Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The box does not start in gui mode after changing corresponding configuration in Vagrantfile #4

Closed
tkleiber opened this issue Dec 30, 2013 · 8 comments
Assignees
Labels

Comments

@tkleiber
Copy link

Hi!

I have modified my Vagrantfile and uncomment following lines for booting with gui:

config.vm.provider :virtualbox do |vb|
# Don't boot with headless mode
vb.gui = true
end

But the box starts every time in headless mode?

Kind regards
Torsten Kleiber

@terrywang
Copy link
Owner

Which box are you having problem with?

I've tested the Oracle Linux 6.5 x86_64 and it works fine.

Extract from the Vagrantfile

  config.vm.provider :virtualbox do |vb|
    # Don't boot with headless mode
    vb.gui = true

    # Use VBoxManage to customize the VM. For example to change memory:
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--cpus", 2]
    # vb.customize ["modifyvm", :id, "--vram", 16]
    # vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
    # vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
  end

Take a close look at your Vagrantfile and make sure this is no broken code block. Also try to halt before up instead of reload.

BTW: VirtualBox 4.3.6 + Vagrant 1.4.1

@ghost ghost assigned terrywang Dec 31, 2013
@tkleiber
Copy link
Author

tkleiber commented Jan 1, 2014

Hi!

Have added the lines with memory and cpu modification without success.

All other configurations and the software versions are the same.

What is your host os?

Kind regards

Torsten

From: Terry Wang [mailto:notifications@github.com]
Sent: Tuesday, December 31, 2013 5:01 AM
To: terrywang/vagrantboxes
Cc: tkleiber
Subject: Re: [vagrantboxes] The box does not start in gui mode after changing corresponding configuration in Vagrantfile (#4)

Which box are you having problem with?

I've tested the Oracle Linux 6.5 x86_64 and it works fine.

Extract from the Vagrantfile

config.vm.provider :virtualbox do |vb|
# Don't boot with headless mode
vb.gui = true

# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", 2]
# vb.customize ["modifyvm", :id, "--vram", 16]
# vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
# vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]

end

Take a close look at your Vagrantfile and make sure this is no broken code block. Also try to halt before up instead of reload.

BTW: VirtualBox 4.3.6 + Vagrant 1.4.1


Reply to this email directly or view it on GitHub #4 (comment) .Das Bild wurde vom Absender entfernt.

@terrywang
Copy link
Owner

Host OS: Ubuntu 13.10 x86_64 and 12.04.3 x86_64 + saucy (3.11 HWE) kernel

Please ignore those vbox customizations, it is NOT related to the GUI issue anyway. Just upgraded to Vagrant 1.4.2 and it works as good as before.

I recommend enabling Vagrant debugging log to troubleshoot further.

VAGRANT_LOG=debug vagrant up > debug.log 2>&1

Look into the debug.log, start from "Booting VM..." like below

 INFO warden: Calling IN action: #<VagrantPlugins::ProviderVirtualBox::Action::B
oot:0x000000027b9268>
 INFO interface: info: Booting VM...
[default] Booting VM...
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "startvm", "50716c94-825b-42a0-878c-3e0a4e284048", "--type", "gui"]

NOTE: Try to reply to the issue directly as email replies mess up the format ;-)

@tkleiber
Copy link
Author

tkleiber commented Jan 3, 2014

Host OS: Windows 7:


 INFO warden: Calling IN action: #
 INFO interface: info: Booting VM...
[default] Booting VM...
 INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "startvm", "2157b2cc-c263-4586-887b-cf141d1450c6", "--type", "gui"]

But the started machine shows only a terminal not an OEL gui:

virtualbox

@terrywang
Copy link
Owner

Now I understand you mean by "GUI". You are actually after X Window System and Desktop Environment inside the vagrant box. NOT the VirtualBox GUI.

Vagrant boxes are minimal base Linux installations without X (Desktop Environment), this is because

  • On servers, we DO NOT need Desktop Environment (minimize system as a general security best practice)
  • Even though X is needed, ssh X11 Forwarding will do the job, no need to install GNOME/KDE or other WMs. See oraclelinux-6-x86_64.md
  • Keep the box size reasonable (<1GB)

Anyway, you can install GNOME Desktop within the box, do the following within the box (vagrant ssh)

# Get root
sudo -i

# Install X Window System and GNOME
yum groupinstall "X Window System" Desktop

Once done, execute startx to start GDM. Change init level from 3 to 5 if you like.

@Gidz109
Copy link

Gidz109 commented Jul 2, 2014

The easiest way is to modify the inittab file on the linux machine.

cd /etc/
vi inittab

Change the “id:3:initdefault:” line to “id:5:initdefault:”

This will then boot Linux into X11 mode.

@pantaoran
Copy link

pantaoran commented Dec 5, 2017

Just wanted to note that the info about changing the init level above is outdated for Oracle Linux 7.
This system now uses Systemd as init system, and instead of changing /etc/inittab you would type the following:

$ sudo systemctl set-default graphical.target

@MostafaElKatoury
Copy link

"On servers, we DO NOT need Desktop Environment (minimize system as a general security best practice)"
i have a question as I got confused , is this means that the VMs generated using vagrant are only for servers not desktops, forexamlpe if I want to code or use any IDEs to depug , run ... , VMs generated from vagrant aren't the right place to code , would you clarify this point as I started to implement my dev desktop enviorment not server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants