Building desktop Fedora Vagrant box

182 views
Skip to first unread message

Henrik Lynggaard Hansen

unread,
Oct 24, 2016, 7:24:26 PM10/24/16
to Packer
Hi

I am trying to use packer for building a Fedora 24 Desktop Vagrant box, but I am running into issues

Context: In our setup we have a lot of windows users which needs a Linux VM for development environment. By development environment I mean GUI/Desktop and installed IDEs etc. I am trying to use Ansible to provision the IDEs etc which should be relatively easy once I have a base box ideally with GUI. However we don't want users to run around installing Ansible on their windows machines, instead we want to use the ansible-local provisioner. However here we run into the step that we need to build our own base image, since I haven't been able to find a good (official) image that
a) is close to RHEL including using yum
B) has a GUI
c) has ansible installed

I have tried to use the Bento Boxes for fedora as an example, but when I change the iso used from Server to Workstation I get into problems. The packer script is hanging at the "waiting for SSH". Looking at the GUI in virtualbox I can see it correctly boot up, and enter the KS script location. After that the boot process starts with all the normal term lines, but once the "Gui" opens all I get is a blank (black) screen with a mouse pointer.

I have also tried to update the ks script from the bento default to one that I got from manually installing a Fedora 24 but no help there just same error.

Am I doing something simple wrong or am I going down a completely wrong path?

Would it be better to use the server image as bento does it and just add the ansible package, and possibly cinnamon-desktop?

Best regards
Henrik
 

Alvaro Miranda Aguilera

unread,
Oct 25, 2016, 3:26:17 AM10/25/16
to packe...@googlegroups.com
Hi

I will suggest take a more simple aproach and move in slow steps.

1. You haven't said which version of RedHat.

If RedHat 7, heres in an example:

Focus on getting a RH7 that installl from the iso and thats all.

Then add steps:

- Install from ISO

- Update

- Install VBoxTools
- Install Asible

- run a HelloWorld with Ansible Local

- Add Vagrant post processor

- Test a Vagrant up vs this new box.


and then iterate on Ansible.

I do have RH Licenses/support agreements/etc, so if you put on GitHub what you are doing, I am happy to have a look and help you there.

Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/ae7b94c7-b5b3-427d-994e-959c5d9749f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Henrik Lynggaard Hansen

unread,
Oct 25, 2016, 3:48:50 AM10/25/16
to packe...@googlegroups.com
Hi

I now have got the fedora Server example to work in text mode, but don't know how to add the GUI manually. Apparently installing a desktop environment with dnf only puts the packages there.

Your Redhat example is also only using the server image to build with so they don't really get me further :( The missing step is the GUI.

I can't seem to launch the automated installer on the fedora workstation, which is why I am looking to add gui to server. Question if there is a good guide for this? I hope I am not the first one to try something like this

Best Regards
Henrik
 

You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/fjB-nKSiWTQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ezXa%2B4GTH07mkAkcteb0LGj0M%3D5AwAk9t_NmG4J8T7u%3DQ%40mail.gmail.com.

Alvaro Miranda Aguilera

unread,
Oct 25, 2016, 5:04:04 AM10/25/16
to packe...@googlegroups.com

On Tue, Oct 25, 2016 at 9:48 AM, Henrik Lynggaard Hansen <hen...@hlyh.dk> wrote:
now have got the fedora Server example to work in text mode, but don't know how to add the GUI manually. Apparently installing a desktop environment with dnf only puts the packages there.

Hello.

We are on Packer mailing list, and most ppl will use it for server like boxes, so will be command line.

For redhat, the way to install is:

yum grouplist

identify the group you want

yum groupinstall -y "Nameofthegroup"

Then, update /etc/initttab to 5

That will take care of the next run it will have a Graphical login.

You can add users with scripts, you can install software with scripts, etc.

So you should be able to create a boxthat when a user turns it on, they see a graphical desktop.

What packer/scripts wont do, is run an graphical application and press buttons.

Is normal practice in unix/linux that applications have configuration files in the filesystem you can update, is very rare one software that can't be configured by command line.


Hope this helps
Alvaro.



--
Alvaro

Rickard von Essen

unread,
Oct 25, 2016, 5:48:21 AM10/25/16
to packe...@googlegroups.com
On Fedora doing: dnf groupinstall "Fedora Workstation" will install whatever you get on Workstation version.

I recommend just download and unpack a bento fedora box and run virtualbox-ovf on that. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages