terrywang / vagrantboxes

Handcrafted Arch Linux Vagrant base box with :heart:
250 stars 29 forks source link

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

Closed tkleiber closed 10 years ago

tkleiber commented 10 years ago

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 commented 10 years ago

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

tkleiber commented 10 years ago

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 https://github.com/terrywang/vagrantboxes/issues/4#issuecomment-31383030 .Das Bild wurde vom Absender entfernt.

terrywang commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

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 commented 10 years ago

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 commented 6 years ago

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 commented 4 years ago

"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.