VMware Horizon Community
ebelange
Enthusiast
Enthusiast

PXE Booting Vmware View Linux Client w/Ubuntu (Not using LTSP)

This topic has been thrown around in here before but I'd like to start a new discussion on the topic and describe what we do today versus where we'd like to be.

Current Situation

Today, we're re-purposing old PCs and installing WinXP with only Vmware View installed. We enable autologin and replace the default shell with the VMware View client so when the machine starts up it goes right to the VMware View login screen. Then we create an image and clone other PCs using that image. We have a different image for each different desktop model we own. Although this works well, it can be time consuming to maintain all these images and having to clone desktops.

Future Goal

We would like to PXE boot a minimal Ubuntu 11.10 installation with LXDE, autologin and autostart the VMware View client for Linux (Not the open client). This will allow us to maintain one or just a few client images right from the server and will also be able to remove the hard drives from our old desktops.

Status

  • Ubuntu Server 11.10 has been setup with DHCP, TFTP and NFS
  • Minimal ubuntu client image has been created and LXDE and Vmware View client packages have been installed.
  • The client boots up with LXDE desktop and autologin has been enabled.
  • The client boots up in less than 50 seconds

Next Steps

  • Setup autostart of VMware view client with custom parameters
  • Enable sound and USB redirection
  • Configuration for multiple displays

I plan document the steps that i followed to setup my environment once i have everything finalized. In the meantime, if anyone is working on something similar, I'd really like to hear about your experience.

Stay tuned....

60 Replies
JSebast
Contributor
Contributor

Hi Ebelange,

Do you have any devlopment about this post ? I work in the same project, but I try to boot a LiveCD from PXE with automatic startup of VMware View client with PCoIP support... Do you have any documents that could help me to do that ?

Regards

Jean-Sébastien Lavoie

0 Kudos
ebelange
Enthusiast
Enthusiast

As a matter of fact, I did make some progress. I managed to make this work with a single monitor, sound and USB redirection. Works really well but i haven't a chance to finish my documentation yet. I hope to get this done soon.

In the meantime, are there specific steps you have questions about?

0 Kudos
JSebast
Contributor
Contributor

Yes, maybe you can help me...

As I tell you, I want to PXE boot my old PCs to start my VMware view client (Linux) with PCoIP, USB and multimedia redirection support.

I have an openSUSE LiveCD that boot the VMware View Client and is working fine, but I have more than 500 computers and I can't use a CD to boot ! I setup a TFTP server with an NFS share and my DHCP server with the rights options. I'm able to connect to my TFTP server but I cannot boot with my LiveCD. I don't know which parameters I must to have in my /tftpboot/pxelinux.cfg/default file to boot an openSUSE LiveCD.

Anyway, the Linux distribution may be anything... Is it more easy to boot LXDE ? How can I setup my TFTP server ?

0 Kudos
ebelange
Enthusiast
Enthusiast

To setup my TFTP/DHCP server and client i followed the instructions on the following site. If you follow these instructions, it should allow you to boot a simple client. From there you can login and install LXDE and the VMware View client. Once you have this done I can help you with customizing your client so that it will automatically start with a VMWare View login and locked down LXDE desktop. I find this method to work really well and my client boots within 45 seconds. I even went to the extent of using an NFS share on my Netapp filer instead of the Linux server to provide better fault tolerance. Anyway have a look at this and let me know if you have any questions.

http://mindref.blogspot.com/2011/03/debian-diskless.html

Eric

0 Kudos
JSebast
Contributor
Contributor

Very good web site... I'm now able to pxe boot my Linux Debian. The next step is to import LXDE in the NFS share but how ? Is it possible to debootstrap the LXDE CDrom ? I have a failure when I try...

--------------

# debootstrap --arch i386 testing /srv/diskless/c2 file:///mnt/cdrom

...

...

# W: Failure trying to run: chroot /srv/diskless/c2 mount -t proc proc /proc

--------------

0 Kudos
ebelange
Enthusiast
Enthusiast

Sorry, I should have told you, this article was based on Debian not Ubuntu so the command you should run if you want Ubuntu 11.10 which is what i'm using is:

debootstrap -arch i386 oneiric /srv/diskless/c2

This will install the minimal files you need for your Ubuntu 11.10 client in /svr/diskless/c2

I also modified the /srv/tftp/pxelinux.cfg/default so it doesn't prompt me for an image

DEFAULT linux
LABEL linux
        MENU linux
        KERNEL vmlinuz-3.0.0-12-generic-pae
        APPEND root=/dev/nfs initrd=initrd.img-3.0.0-12-generic-pae nfsroot=172.19.192.117:/vol/pxeroot ip=dhcp rw

I'm using an external NAS for my NFS share but here you would just replace the IP and path to your local server and NFS share you created

Here are the steps that i took to install and customize LXDE and VMWare View:

You'll want to copy /etc/apt/sources.list to your /clientrootpath/etc/apt/sources.list as the one for the client is very minimal and LXDE will fail to install.

The next steps can be done from the client after it boots successfully or from the server by using chroot into your client's path. I find it easier and less confusing to do my customization directly on the client. I wouldn't recommend using root to run Vmware View. I created a user called "view" and i have it login automatically on startup.

Login as root on the client and install these packages:

Installing Vmware view linux client

         Enable canonical partners in /etc/apt/sources.list

         apt-get update

         apt-get install vmware-view-client:i386

Installing LXDE Desktop

          apt-get install lxde –no-install-recommends (this will not install suggested packages which we don’t need)

          apt-get install xorg

0 Kudos
chulerico
Enthusiast
Enthusiast

Ebelange,

thanks for the info, looking forward to the documentation, right now doing it as the same way discribe at the top, using windows and changing the shell.

would love to use pxe

thanks

Sam

0 Kudos
jbunn
Contributor
Contributor

What command line switches do you run to get the linux client to pass that information?

Sorry, I'm a linux noob and I know how to do it for WinXP but I'm exploring using ubuntu as an easier option.

0 Kudos
ebelange
Enthusiast
Enthusiast

The syntax the we use to launch the View Client looks like this:

vmware-view.bin --serverURL=https://server.abc.com --domainName=DOMAIN --desktopSize=full

Does that answer your question?

0 Kudos
glaffoon
Contributor
Contributor

eblange,

How did you get USB redirection to work as from what I read the linux client doesn't have that option included?  I almost have a complete working solution, but I don't have any USB redirection?

0 Kudos
jbunn
Contributor
Contributor

Yes that helps I really appreciate your quick response. 

I am looking to have it autostart and relaunch when closed if possible.  Right now I have it set to pass username/password and desktopname as well.  I'd like to make it as seamless as possible.

0 Kudos
ebelange
Enthusiast
Enthusiast

You are correct the file you need is missing but it is available on HP's Thinpro client which we happen to have.  If you look around I'm sure your can find it online. Once you have the file this is what you need to do:

Fix USB Redirection

Copy vmware-view-usb from HP thinpro client to /usr/bin

Chmod 4755 /usr/bin/vmware-view-usb

glaffoon
Contributor
Contributor

Thanks for the quick response.

0 Kudos
ebelange
Enthusiast
Enthusiast

My configuration, automatically launches the VMware view client and if the user closes the application, it re-launches automatically. It also locks the desktop down so they can't mess around with anything. Below are the tweaks that i made to my View client:

  • Auto login from tty1

          Open /etc/init/tty1.conf as root:
     sudo nano /etc/init/tty1.conf

          Change the last line of this file to (where USERNAME is the username of the user you want to log in):
     exec /bin/login -f USERNAME < /dev/tty1 > /dev/tty1 2>&1

  • Install alsa-base package to enable sound on client

                                Apt-get install alsa-base

  • USB Redirection

          copy vmware-view-usb from HP thinpro client to /usr/bin

          Chmod 4755 /usr/bin/vmware-view-usb

  • Disable LXDE screensaver

          Delete “@xscreensaver –no-splash” from /etc/xdg/lxsession/LXDE/autostart



  • Remove right click desktop menu options

                                Right click on desktop and choose “Desktop Preferences”

                                Select the advanced tab and check off “Show menus provided by window managers   when desktop is clicked”

                                Edit “/etc/xdg/openbox/menu.xml” and remove everything between <menu id=”root-menu” label=”Openbox 3”> and </menu>

  • Disable the LXPanel

                                Edit “/etc/xdg/lxsession/LXDE/autostart” and comment out

                                @lxpanel –profile LXDE

                                Should look like #@lxpanel –profile LXDE

  • Autostarting Vmview

                                Create a script to autostart vmware view and save it in the user’s home directory

                                Modify “/etc/xdg/lxsession/LXDE/autostart”

                                Add a line that says:

                                @~/viewstart

                                My script  looks like this:

                                #!/bin/bash

                                While true;  do

                                Vmware-view.bin  --serverURL= URLofViewServer –domainName=ADDomainName  --desktopSize=full

                                Done

0 Kudos
jbunn
Contributor
Contributor

I got all of this working, thanks to your last post.  Last thing I would like to do is to hide the top shade completely.  I've tried the switch --unattended which I believe worked on the windows client but with no luck.

Do you know how to do that?

0 Kudos
ebelange
Enthusiast
Enthusiast

What do you mean by the top shade? Do you mean the VMware View connetion bar?

0 Kudos
chulerico
Enthusiast
Enthusiast

Well getting closer, but trying to get it going with MS WDS (tftp + nfs). Right now getting stuck at the booting process, init is complaining,but feel is one of the files that got corrupted when I did the transfer from the ubuntu machine.

guys would love to get a copy of the files, 

thanks

Sam

0 Kudos
ebelange
Enthusiast
Enthusiast

I haven't had much luck with the copy method myself either. Have you tried the procedure that I posted earlier in this discussion? To be honest it doesn't much simpler and I found using the command "debootstrap" much easier to get your client environment setup.

Sent from my iPhone

0 Kudos
jbunn
Contributor
Contributor

The top shade or connection bar.  Where you can change the view client settings and can pin/unpin it from showing up.

Ultimately I am planning on using these desktops as kiosk VMs so I would prefer they don't have access to those features.

0 Kudos