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
matt_o
Enthusiast
Enthusiast

Toine,

I had my own Linux (TinyCore based) booting in the first place but gave up when it came to support different machines.

I ended up using Stratodesk NoTouch. It is commercial but not expensive and we found it was worth it. One small Linux image, VMware View client with PCoIP included, and it can be PXE-booted out of the box or installed locally and it adapts well to different machines. Making it PXE-boot is really easy, this is what I found before trying: http://screencast.com/t/BYclSdSxxkRw

www.stratodesk.com

It worked on almost all my machines (various Dell models, and 15 HP wx4400) out-of-the-box, exception was one type (Optiplex GX160) where I had to contact support to make it running (worked out quickly) so I believe that deserves mentioning here.

I had several users on a "homegrown" Windows lock-down first before starting on Linux (following the VMware PDF that I just can't find the link to but everybody here knows it anyway I'd suppose) but quickly switched over all of those to Notouch.

I also had some USB issues. Very weird. A smartcard reader that would not connect every other boot. There is a switch though in NoTouch to use the 1.5 USB forwarder component instead of the 1.7 one and that solved the issue. I found that cool to have both of these in one image. Cutting long story short, USB now works fine.

-----

Matthew

Reply
0 Kudos
mrjohndoe
Contributor
Contributor

Hello,

the thing is that there isn't a vmware-folder in /etc.

I also have tried to edit the vmware-preferences in the home/.vmware directory with no effect. I have installed the client via apt-get.

Greetings

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

I may have to create the folder and file.

Reply
0 Kudos
SebMig
Contributor
Contributor

Hi,

I would like to thank ebelange to put us on that track of PXE booting over NFS for our repurposing solution! Here's our runlogs from our experience:

Create appropriate directory structure Ex. /srv/diskless/12_04XFCE

Debootstrap Ubuntu 12.04
sudo debootstrap --arch i386 precise /srv/diskless/12_04XFCE http://ca.archive.ubuntu.com/ubuntu


Copy APT source.list file
sudo cp /etc/apt/sources.list /srv/diskless/12_04XFCE/etc/apt/


sudo chroot /srv/diskless/12_04XFCE/
mount /proc

Edit /etc/fstab and make sure it contains this:
vi /etc/fstab

proc            /proc         proc    defaults 0 0
/dev/nfs        /             nfs     defaults 0 0
none            /tmp          tmpfs   defaults 0 0
#none            /var/run      tmpfs   defaults 0 0
#none            /var/lock     tmpfs   defaults 0 0
none            /var/tmp      tmpfs   defaults 0 0
none            /media        tmpfs   defaults 0 0
none            /var/log      tmpfs   defaults 0 0

Edit initramfs.conf
vi /etc/initramfs-tools/initramfs.conf and make sure that BOOT=nfs BEFORE installing kernel image

Configure Keymaps (In our case)
dpkg-reconfigure locale

update-locale LANG='fr_CA.UTF-8'

Configure Timezone
dpkg-reconfigure tzdata

Search available Kernel Images matching your server Kernel Image
apt-cache search linux-image-

And install it... in my case it was:
apt-get install linux-image-3.2.0-23-generic-pae
Answer yes to he question "Continue without installing GRUB"

Set root password and create a view user
passwd
useradd -m view
passwd view

Our machine name are provice by DHCP server we need to empty /etc/hostname
echo "" > /etc/hostname

Edit /etc/network/interfaces and make sure there is no entry for eth0

Edit /etc/apt/source.list to make sure that these lines are uncomment
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

apt-get update

Install Alsa-base to enable sound and add view user to audio group
apt-get install alsa-base
usermod -a -G audio view


Install Vmware view client and all dependencies
apt-get install vmware-view-client

Install XFCE4 Window Manager and all dependencies
apt-get install xfce4

Install ca-certificate to be able to import your root CA certificate
apt-get install ca-certificates

Google the vmware-view-usb file from HP on  and copy to /usr/bin/vmware-view-usb chmod it to 4755
chmod 4755 /usr/bin/vmware-view-usb

Make the user view autologin
vi /etc/init/tty1.conf
Replace this line: exec /sbin/getty -8 38400 tty1
By this: exec /bin/login -f view < /dev/tty1 > /dev/tty1 2>&1

Autostart XFCE on logon
vi /home/view/.profile
Add this at the end of the file:
if [ -z "$DISPLAY" ] && [ $(tty) = "/dev/tty1" ]; then
    startx
fi

Numlock ON
vi /home/view/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml

and make that replace false to true

<property name="Numlock" type="bool" value="true"/>

Create a file /home/view/viewstart that contains this:
#!/bin/bash
while true;  do
vmware-view.bin  --serverURL=view01.xxxxxxxxxxxxx.qc.ca --domainName=INFO --nomenubar=TRUE --nonInteractive --desktopSize=full
done

Autostart /usr/bin/numlockx on + Viewstart script when XFCE start
Create to file in /home/view/.config/autostart

File VMWare-View.desktop that contains:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=VMWare-View
Comment=
Exec=/home/view/viewstart
StartupNotify=false
Terminal=false
Hidden=false


Import our ROOT CA Certificate
Create extra directory in /usr/share/ca-certificates and copy your root CA .CRT file
Edit the /etc/ca-certificates.conf and add the new .crt file
vi /etc/ca-certificates.conf
Ex: extra/root-ca.crt
dpkg-reconfigure ca-certificates (answer yes and make sure that your new root CA is in the list)

At this point you can customize the look of your XFCE desktop
Remove all panels from XFCE


Exit the chroot environnment
exit

Copy  initrd.img and vmlinux for TFTPBOOT
sudo cp /img/i386/12_04XFCE/boot/initrd.img-3.2.0-23-generic-pae /tftpboot
sudo cp /img/i386/12_04XFCE/boot/vmlinuz-3.2.0-23-generic-pae /tftpboot

Thank you again for that great thread!

S. Mignacco

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Hello i think im also giving up on the TinyCore builder. the site IS back up but i think with the ubuntu its gonna run better and plus USB redirection and all that seems to be working.

I will follow step by steps you have posted SebMig and of course ebelange. Going to start from existing 12.04 ubuntu server(serving as DHCP and PXE boot server) debootstraping from there and doing all the steps SebMig posted. I hope to get it working. And to get some help if needed Smiley Happy

For info -  our usage scenario is : repurposing 4 - 6 year old pcs in our students lab to be thin clients. Like many of you here i dont want to deal with managing those thin clients. just wanna power on the machine and pxe boot it. What i was afraid of is that the ubuntu pxe boot will take as much time as windows pxe. but it seems that you are reporting boot ups in less than 50 sec. So this all should work perfectly for us as long as viewclient is 90% as good working as it is on a windows enviroment.

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Hello,

Started work on this and already a couple of problems (i am really not yet that linux proficient so bare with me ) :

first problem:

Configure Keymaps (In our case)
dpkg-reconfigure locale

update-locale LANG='fr_CA.UTF-8'

# dpkg-reconfigure locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Package `locale' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locale is not installed.

All othersteps after that went ok except i kept getting the locale errors which makes sense since i didnt set it.

then:

Numlock ON
vi /home/view/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml

and make that replace false to true

<property name="Numlock" type="bool" value="true"/>

there is no .config/ at all!

:/home/view# ls .*
.bash_logout  .bashrc  .profile

.:
viewstart

..:
view

so :

Autostart /usr/bin/numlockx on + Viewstart script when XFCE start
Create to file in /home/view/.config/autostart

File VMWare-View.desktop that contains:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=VMWare-View
Comment=
Exec=/home/view/viewstart
StartupNotify=false
Terminal=false
Hidden=false

also wasnt possible to to. should the .config be there or do i have to manualy make that ? with what permissions if so?

i only skipped the install certificates part as we dont use them/have them yet.

also how do you remove the panels?

At this point you can customize the look of your XFCE desktop
Remove all panels from XFCE

So i have done this on my ubuntu 12.04 server it is x64 thou. made the dir /srv/diskless/12_04XFCE and bootstrapped into that.

apt-cache search linux-image-

didnt return the list but then i did the apt-get update which of coure populates the cache :smileysilly:

so this is what i have installed in chroot

dpkg --list | grep linux-image
ii  linux-image-3.2.0-39-generic     3.2.0-39.62                             Linux kernel image for version 3.2.0 on 32 bit x86 SMP

on parrent i have this:

/# dpkg --list | grep linux-image
ii  linux-image-2.6.32-46-server         2.6.32-46.105                Linux kernel image for version 2.6.32 on x86_64
ii  linux-image-3.2.0-39-generic         3.2.0-39.62                  Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-server                   3.2.0.39.47                  Linux kernel image on Server Equipment.

I hope i did that part right.

I will use this server for all-in-one for now. meaning it is a DHCP/tftpboot/nfs all of it i want it for now on same server. Or is that a problem?

So anyhow even thou with some errors i wanted to test it if it will even pxe boot and how long will it take ive seen some big numbers when installing view client and kernel etc..

got stuck of course on the last part:

Copy initrd.img and vmlinux for TFTPBOOT
sudo cp /img/i386/12_04XFCE/boot/initrd.img-3.2.0-23-generic-pae /tftpboot
sudo cp /img/i386/12_04XFCE/boot/vmlinuz-3.2.0-23-generic-pae /tftpboot

how. where how the heck does one get initrd.img and vmlinuz. when i was working with tinycore i had to generate them. i am assuming it is the same here. but still would help to know exactly how if anyone can help.

or do i just pxe boot the files that are in /boot ?

/boot# ls
abi-3.2.0-39-generic  config-3.2.0-39-generic  grub  initrd.img-3.2.0-39-generic  System.map-3.2.0-39-generic  vmlinuz-3.2.0-39-generic

meaning cp-ing those 2 files from /srv/diskless/12_04XFCE chroot structure  and serving them to tftp in parent?

Then its off to figuring out how to pxe boot those files but that i did before and i think it wont be a problem.

Reply
0 Kudos
SebMig
Contributor
Contributor

Hi,

The .config will be create when you run xfce for the first time. For the moment you can skip the xfce customizeing part and boot your PXE client, login as view user and start xfce using startx command. The .config file structure will be create a this moment.

For the initrd and vmlinuz, those files are generated when you install the linux-image package in your deboostrap environnment. You need those files to be in tftpboot to be able to boot from pxe.

For the tftp part here's my config:

tech@tftpboot01:/$ tree /tftpboot/
/tftpboot/
├── initrd.img-3.2.0-23-generic-pae
├── menu.c32
├── pxelinux.0
├── pxelinux.cfg
│   └── default
├── vesamenu.c32
├── vmlinuz-3.2.0-23-generic-pae
└── wallpaper-suse2.png

tech@tftpboot01:/$ cat /tftpboot/pxelinux.cfg/default
DEFAULT vesamenu.c32

PROMPT 0
TIMEOUT 10
NOESCAPE 1
ALLOWOPTIONS 0

MENU TITLE CSA

LABEL c1
    MENU DEFAULT
    MENU LABEL Ubuntu 12.04 VMWare View 1.7.0 XFCE
    KERNEL vmlinuz-3.2.0-23-generic-pae
    APPEND root=/dev/nfs quiet panic=0 initrd=initrd.img-3.2.0-23-generic-pae nfsroot=x.x.x.x:/srv/diskless/12_04XFCE ip=dhcp rw

tech@tftpboot01:/$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#        to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/srv/diskless/12_04XFCE 10.0.0.0/255.0.0.0(rw,sync,no_root_squash,no_subtree_check)

Part of the dhcp config:

...

allow bootp;
allow booting;
        next-server x.x.x.x;
        use-host-decl-names on;
        if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
          filename "pxelinux.0";
        }

Hope this helps...

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

I'm just glad that some of you found this information useful. Smiley Happy

On 2013-04-09, at 4:18 PM, SebMig <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

It helps it helps! And yeah Ebelange very useful! thank you Smiley Happy

I have no files in cp /img/i386/12_04XFCE/boot/initrd.img-3.2.0-23-generic-pae

you said they get generated... where at? in bootstrap enviroment in /boot i suppose as i see this in there:

/boot$ ls
abi-3.2.0-39-generic  config-3.2.0-39-generic  grub  initrd.img-3.2.0-39-generic  System.map-3.2.0-39-generic  vmlinuz-3.2.0-39-generic

huge thanks i think if i find this files i can give it a try Smiley Happy

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

/boot is where i grabbed mine. See the step associated with this. Of course change the tftp path accordingly.

Copy kernel and make nfs specific changes to initrd image:

cp /boot/vmlinuz-`uname -r` /srv/tftp

mkinitramfs -d /etc/initramfs-pxe -o \

/srv/tftp/initrd.img-`uname -r` `uname -r

Let me know if this helps.

On 2013-04-10, at 8:02 AM, SpyCraftt <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Hello,

when i issue mkinitramfs i get error:

mkinitramfs  -d /etc/initramfs-pxe -o  /srv/tftp/initrd.img-3.2.0-39-generic
/usr/sbin/mkinitramfs: /etc/initramfs-pxe: Not a directory

also when pxebooting i get to the menu to select/autoselect the ubuntu view client and it just stays there.. it has the same effect as when i delete the

KERNEL line

basicaly just the menu loads it does not even continue to load kernel and initrams

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

Have a look at this: http://mindref.blogspot.ca/2011/03/debian-diskless.html

Did you do step 4. ?

That's when that folder gets created. If you flow these steps you shouldn't have any trouble.

On 2013-04-10, at 11:13 AM, SpyCraftt <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Damn missed that step so stupid.

Ok i am all set now. i think

tree /srv/tftp/
/srv/tftp/
âââ initrd.img-3.2.0-39-generic
âââ menu.c32
âââ pxelinux.0
âââ pxelinux.cfg
â   âââ default
âââ vesamenu.c32
âââ vmlinuz-3.2.0-39-generic

vmlinuz was copied from chroot enviroment from /boot dir.

and the initrd was done with what you suggested.

my default file:

cat /srv/tftp/pxelinux.cfg/default
DEFAULT vesamenu.c32


PROMPT 0
TIMEOUT 10
NOESCAPE 1
ALLOWOPTIONS 0


MENU TITLE CSA


LABEL c1
    MENU DEFAULT
    MENU LABEL Ubuntu 12.04 VMWare View 1.7.0 XFCE
    KERNEL vmlinuz-3.2.0-39-generic
    APPEND root=/dev/nfs quiet panic=0 initrd=initrd.img-3.2.0-39-generic nfsroot=x.x.x.x:/srv/diskless/12_04XFCE ip=dhcp rw

when i try to PXE boot from a client i do get the nice vesamenu. then it just cycles the menu if you know what i mean. it does not start loading kernel or anything i can press enter 10 times nothing happens.

cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

so thats all ok

cat pxelinux.cfg/default
DEFAULT vesamenu.c32


PROMPT 0
TIMEOUT 10
NOESCAPE 1
ALLOWOPTIONS 0


MENU TITLE CSA


LABEL c1
    MENU DEFAULT
    MENU LABEL Ubuntu 12.04 VMWare View 1.7.0 XFCE
    KERNEL memtest86+

then it loads the memtest over the pxe.. works fine so its something with vmlinuz-3.2.0-39-generic which i copied from /srv/diskless/12_04XFCE/boot ?

something about doing all of this on a 64 bit server?

starting to go crazy i think ill redo everything step by step in the morning. Smiley Happy

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

Try replacing your default file with this:

You don't need anything else.

DEFAULT c1

LABEL c1

MENU c1

KERNEL vmlinuz-3.2.0-39-generic

APPEND root=/dev/nfs quiet panic=0 initrd=initrd.img-3.2.0-39-generic nfsroot=x.x.x.x:/srv/diskless/12_04XFCE ip=dhcp rw

On 2013-04-10, at 11:52 AM, SpyCraftt <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Thank you that helped alot!

I could now see that it cannot find the vmlinuz file. so then i checked the permissions and they were the reason the thing didnt boot.

iv made alot of progress since then. i have now a "working" test enviroment. the client boots up. goes into xfce. and the view client starts up and autoconnects to the VDI. with preset command line options.

Now the usb redirection works. Audio does not am i missing a step? I did install the  alsa-base package assuming thats the drivers and did a

usermod -a -G audio view

for which i have no idea why . Smiley Happy

second is fullscreen it used to boot into fullscreen now it just a small windowed . even thou my command line is:

vmware-view.bin  --serverURL=xxxx --domainName=VMWARE --nomenubar=TRUE --nonInteractive --desktopSize=full --userName=xxx --password=xxx  --desktopName=VDI

So issue is audio and fullscreen, and if you can give me some pointers or a web site on how to lock this enviroment down. Like you can windows?

Basicaly im looking for a kiosk mode. no backround no trace of basicaly underlining OS no terminal no logout login no cancel button on view client while its connecting? when you turn the client on it should pxe boot straight into vmview client which would connect to VDI.

if you logout of VDI I want the client to just startup again and connect again. if you shut down the client it just logsout and shuts down.

in windows of course not pxe i managed to do that with some script files and of course changing the shell.

Im sure it can be done. with the right skill/help Smiley Happy or am i wrong and there are limits to what can be achieved in this pxe situation?

Reply
0 Kudos
ebelange
Enthusiast
Enthusiast

Have a look at this link, it helped me when I was setting up the audio on my pxe client.

https://help.ubuntu.com/community/SoundTroubleshooting

let me know if this helps.

Reply
0 Kudos
bjohn
Hot Shot
Hot Shot

Anyone have any instructions to make this work when you have an existing PXE server in place? WDS (SCCM).

Reply
0 Kudos
SpyCraftt
Contributor
Contributor

Helpful page but this worries me:

. Is my sound card supported by the Ubuntu sound system?

obtain a new sound card that is supported by ALSA, or contact the ALSA developers and request support for your sound card.

my card gets listed when i do the

lspci -v | grep -A7 -i "audio"

but its intel ICH9. and thats not listed ont he support page. that and another card also not supported.

Aaand i cannot go changing sound cards to our 100 computer that wont work Smiley Happy

so i found this page on the page you suggested : https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules

and after adding the ppa

# apt-get install linux-alsa-driver-modules-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-alsa-driver-modules-3.2.0-39-generic
E: Couldn't find any package by regex 'linux-alsa-driver-modules-3.2.0-39-generic'

stuck.

Reply
0 Kudos
Eerd
Contributor
Contributor

second is fullscreen it used to boot into fullscreen now it just a small windowed . even thou my command line is:

vmware-view.bin  --serverURL=xxxx --domainName=VMWARE --nomenubar=TRUE --nonInteractive --desktopSize=full --userName=xxx --password=xxx  --desktopName=VDI

-I have the same problem and cannot seem to find a solution for it..

Also i cannot seem to get 2 monitors to work inside my VM (Windows 😎

The 2 monitors inside my client (Debian) are working correctly....

-And where can i download the HP usb driver? i cannot find it on google anywhere!!

-If i go with ubuntu, what should i install? Because in tis topic i read different things. Can i use Xubuntu or is Ubuntu 12.04 with XFe recuired?

I want a slightly different story : Just a Linux desktop from were i can run Vmware view 2.0 ( i am using Vmware Horizon View 5.2 so i want the newest client, or is this nonsense?) This Linux variant must be as light as possible.

The things that i want to work are :

1. 2 monitors with extended screen

2. USB redirection.

3.Sound.

Reply
0 Kudos
kevin79
Contributor
Contributor

I'm looking to do the same type of thing. Any chance you finished your instructions?

Reply
0 Kudos