Skip to content

December 21, 2011

31

Building an Ubuntu Live CD for VMware View

With the recent public release of a full PCoIP View client for Linux I imagine many people will look to use this as a low-cost platform for re-purposing PCs as a lightweight View endpoint.

As the VMware View Client for Linux is only (officially) available for Ubuntu right now I will focus on that. Consider this the first part of an ongoing series, but right now I’m just going to cover the basics of getting an image setup so that you can live boot Ubuntu and have the View Client installed in the image.

 

Getting Started

Before we do anything you are going to need to grab Ubuntu 11.10 (http://www.ubuntu.com/download/ubuntu/download). I will be using the 32-bit version for this walk-through.

I also will be doing the creation and testing of the live CD from a virtual machine and I highly recommend you do the same. I am using my home lab with vSphere 5, so I’ll be using vCenter to create a new VM, but any virtualization platform can be used.

The virtual machine we’re creating here will be our live CD “build” machine, there’s nothing special about it, it’s just a straight installation of Ubuntu, so let’s get on with it. First, create a new VM, select “Typical”, give it a name and location, select resource pools, and select storage placement – I assume the audience for this blog is quite familiar with this process, so I will skip detailed instructions. When prompted for “Guest Operating System”, select Linux, and under “Version” select Ubuntu Linux (32-bit).

OS Selection

Selecting Ubuntu Linux for guest OS

Complete the final steps of the New Virtual Machine Wizard – I created a 30GB disk which is likely overkill – and create the VM. I did make some changes to the hardware settings – I bumped up to 2GB RAM and added a second CPU. This is not required, it just made me feel good.

VM Hardware Settings

VM Hardware Settings

Once the VM is created mount the Ubuntu ISO file into it via whatever your preferred method is. I uploaded the ISO to a datastore, and mapped it into the VM from there. If you use this method make sure to select “Connected” and “Connect at power on” – and then to deselect these options after the installation process is complete.

Mount the Ubuntu ISO

Mount the Ubuntu ISO

Access the console for the VM, and power it on. Shortly after it boots  you will be presented with the following screen, select “Install Ubuntu”

Install selection

Install selection

Again, I am going to skim the details of OS installation as I assume my audience is familiar with the process:

  • I selected “Download updates while installing”
  • I allowed the installer to use the whole disk and took the default file system layout (2 partitions)
  • Select your location and language preferences
  • Enter your user account information, and select “Log in automatically”
  • Let the installation complete
  • When prompted to restart, click “Restart Now”. You should then be prompted to remove the installation media per the image below
  • Disconnect the ISO image from the VM, go back into the console, and press ‘Enter’ to complete the shutdown
Time to disconnect the ISO

Time to disconnect the ISO

The VM will reboot and you should be taken directly to the Ubuntu desktop (if you selected Log in automatically, otherwise you will be prompted for credentials):

The Ubuntu Desktop

The Ubuntu Desktop

You may want to maximize the resolution of the desktop as things can get a little cramped at the default 1024×768, but this is personal preference.

Ok, the prep work is mostly complete. Next up, we will get ready to start creating our live CD image using UCK.

 

Installing the Ubuntu Customization Kit (UCK)

The Ubuntu Customization Kit (UCK) allows you to create a new live CD ISO from an existing Ubuntu installation ISO image and to apply any desired customization along the way.

UCK is available right from within the Ubuntu Software Center, but there are newer versions available from SourceForge. For this walk-through I will be using UCK 2.4.5. The easiest way to get this installed is to open Firefox within the Ubuntu VM and navigate to: http://sourceforge.net/projects/uck/files/uck/2.4.5/

UCK Download Page

UCK Download Page

Select and download ‘uck_2.4.5-0ubuntu1_all.deb’, when prompted, choose to open the file with Ubuntu Software Center, and click ‘OK’:

Downloading UCK

Downloading UCK

After the download completes, Ubuntu Software Center will launch, and you’ll be prompted to install UCK. Notice the warning that an older version is available, chuckle to yourself about all the people running an older version when they could be on the bleeding edge like yourself, and then click “Install”. Note that you will be prompted for your password to perform root level operations.

Installation of UCK

Installation of UCK

During installation you will be asked if you want to add UCK to the launcher, I chose to do so, but it’s not required, you’ll just need to open UCK via dash or a terminal shell if you choose not to add it. Once installation is complete, close Ubuntu Software Center and Firefox. Now we are ready to move into image customization.

 

Customizing and Creating the LiveCD Image

Before we launch UCK we need to pull down a copy of the Ubuntu installation ISO as that is what UCK will be performing it’s customization on. Accomplish this by whatever means suit you – you can download it directly from Ubuntu again from within the VM, pull it off a network share, FTP, etc. I grabbed my copy from the webserver on my NAS via Firefox so it has been placed in my user ‘Downloads’ directory which maps to ‘/home/<user>/Downloads’. You’ll need to know the path so you can provide it to UCK.

UCK Icon

UCK Icon

Once you have a copy of the Ubuntu ISO accessible to the VM, launch UCK. The process to do this may vary depending on the options you selected during the installation process, but if you followed my advice and added it to the launcher simply click the UCK icon to launch it.

You will see a welcome screen, which you can dismiss, followed by language pack selection screens. I chose ‘en’ but choose whichever items are appropriate for your use case. Eventually you’ll come to a desktop environment selection screen.

UCK Desktop Environment Selection

UCK Desktop Environment Selection

I selected ‘gnome’. You are now asked to locate the ISO image that will be the basis of the newly created live CD. Navigate to the location where you placed the ISO, and click ‘OK’

LiveCD ISO Selection

LiveCD ISO Selection

UCK will then prompt you to name your CD, I entered “VMware View live CD”. Next UCK will ask if you want to customize the CD manually during building – why yes you do! Select ‘yes’ and continue.

You will be asked if you want to delete all Windows-related files from the CD. As I am not planning to run this CD under Windows, I chose to remove them. Next up is the selection for a hybrid image (ISO/USB), I chose yes as I imagine we might want to run this from a USB stick as well as a CD.

Initial configuration of UCK is now complete and the package creation will now begin. After clicking ‘OK’ you will be prompted for your user password again to allow root-level activities to take place.

Ready to build!

Ready to build!

UCK will unpack the ISO, mount it, and open up a chroot’d environment so that you can further customize the live CD environment. This may take several minutes depending on the speed of your VM and storage. Once this process is complete you’ll be presented with customization options – you can either run the package manager to add/remove packages, or run a console application (open a terminal as root) to do whatever you like.  Let’s begin by getting the VMware View Client installed.

Ready to Customize

Ready to Customize

Installing the VMware View Client for Linux

Unfortunately, we can’t just go right out and grab the VMware View Client. Nope, first we need to fix a few things.

Select “Run console application” and click ‘OK’. This will open the UCK cutomization console and leave you at a root prompt.

UCK customization console

UCK customization console

At this prompt type:

vi /etc/apt/sources.list

You are welcome to use a different editor but I prefer vi. If you are unfamiliar with vi commands please Google ‘vi’ and you will find several excellent guides.

Initial apt sources.list

Initial apt sources.list

As you can see the list of sources is pretty slim so let’s add a few before continuing, switch to edit mode, open a new line and add the following repositories:

deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe
deb http://archive.canonical.com/ubuntu oneiric partner
New repositories added

New repositories added

After adding the new repository locations, save the file and exit (ESC :wq in vi). Then run:

apt-get update

This will allow apt to update the package lists from the newly added repositories. Now we should be able to install the VMware View Client by typing:

apt-get install vmware-view-client

You will notice that libssl0.9.8 is added to the install list and you will be prompted for confirmation. Confirm that you do want to continue and just let the magic happen.

Ready to install the View Client

Ready to install the View Client

After the installation completes you can test out the VMware View Client by typing:

vmware-view

You will have to accept the EULA and then the client should open. Hooray!

The VMware View Client for Linux

I love the smell of PCoIP in the morning, it smells like... pixels

Since all we want right now is a live CD with the VMware View Client available, then our modifications are done. Let’s complete the build and get an ISO.

 

Completing the live CD Build

Exit out of the UCK customization console by entering:

exit

You will return to the customization action screen. Select “Continue building” and click ‘OK’

UCK will then begin creating the live CD ISO.  Expect this to take several minutes to complete.

UCK building an ISO

UCK building an ISO

Once the build is complete you will get a summary screen informing you of where the ISO file has been placed.  Typically this is: /home/<user>/tmp/remaster-new-files/livecd.iso

Build Complete

Build Complete

Click ‘OK’ to close the summary window. If you started UCK from the launcher icon there will still be a terminal window open, it will ask you to press ‘Enter’ to close the terminal, and you should do as it says, we certainly don’t want to make it angry now after having come so far.

 

Testing the Newly Created ISO

Before we waste a DVD or needlessly format a thumb drive it would probably be a good idea to test the ISO we just made. This is easy to do and we can reuse our Ubuntu VM to do the testing.

First we should transfer the ISO file off the VM because if we don’t, we can’t really boot into it now can we? I moved my ISO file off to my NAS again, and renamed it to livecd_view_client.iso, but you can name it anything you wish. I then once again uploaded the file to a datastore via vCenter.

Next we need to configure the VM to boot off the CD. To do this, edit the VM settings, go to the “Options” tab, and select “Boot options”. On the right-hand side, check the “Force BIOS Setup” box.

Force BIOS Setup

Force BIOS Setup

This will allow us to tweak the boot order so that the CD-ROM drive will take precedence over the hard drive. Restart the Ubuntu VM from the system settings menu (the icon that looks like a gear crossed with a power button icon) by selecting “Shut Down…” and then selecting “Restart”. Wait for the VM to restart into the BIOS setup utility.

BIOS Setup

Is it live, or is it VMerex?

Using the arrow keys, select the “Boot” menu, and then highlight “CD-ROM Drive”. Use the ‘+’ key to move it up in the boot order on top of the “Hard Drive” option.

Adjusting the boot order

Adjusting the boot order

Press ‘F10’ to save and exit, and before you confirm the changes, open the VM settings one more time, and map in the live CD ISO file. I did this just as I did above when preparing the VM for the initial Ubuntu installation (see the earlier screenshot). Make sure you check “Connected” and “Connect at power on”.

Now go ahead and confirm the BIOS changes which will cause the VM to restart.

If you did everything right, you should be prompted with a screen like this:

Live CD Boot

Choose, but choose wisely...

Dash Icon

Dash Icon

Select “Try Ubuntu” and you will be taken to a desktop running under the ‘ubuntu’ user. Now since we didn’t make any effort to create an icon for the View client on the desktop or in the Launcher we have to open it another way. One quick option is to use Dash.

Click the Dash icon and in the search box enter ‘vmware’. This should locate the VMware View Client application. Click the VMware View Client icon and off you go.

Dash Search

Thar she blows!

You will once again need to accept the EULA (this is a new user) and then the VMware View Client should launch.

VMware View Client via live CD

VMware View Client via live CD

Let’s go ahead and get connected to a desktop…

Win7 Aero Desktop

It really works!

 

Wrapping Up

Now that you have tested the live CD ISO you are welcome to deploy it however you like. Burn it directly to a CD/DVD depending on size, or use one of the many guides available to deploy it to a USB drive.

To be fair, this is not in any kind of state to act as a true base image for something like full-scale PC re-purposing, it’s far too large, and it doesn’t automatically boot into the VMware View Client. Going forward i plan to address some of these shortcomings, but for now this is a good way to least get a feel for the performance of the new VMware View Client for Linux on a range of hardware without causing any damage to the underlying OS installation.

More to come on this as time permits.

UPDATE: I have been asked to provide the resulting ISO so here is a link you can use to grab it. As with anything you might get from someone else’s Dropbox – Use at your own risk. I take no responsibility for any damages that may be caused by the use of this file, and I make no warranty as to it’s validity or authenticity – is that scary enough for ya? With that out of the way, here you go:  livecd_view_client.iso

Read more from Linux, PCoIP, VDI, View, VMware
31 Comments Post a comment
  1. Dec 22 2011

    really cool and i think this will be a good strategy for companies moving forward with VDI that don’t want to pay for 2x Windows Licenses per seat.

    I think an even better solution is a live CD that gets PXE booted from a central location and it automatically boots into the View Client and doesn’t allow a user to access the actual linux desktop… A poor man’s zero client. :)

    Reply
  2. RexRemus
    Dec 22 2011

    @Kendrick Coleman That very thing will be the focus of this effort going forward. As I said this is really the MOST basic step towards that, but still, even in this form it’s useful so figured I would post now just to get the wheels turning.

    Reply
  3. Dec 22 2011

    Rex thanks for linking the actual ISO for me…save me a job being a busy person ;-)

    Reply
  4. RexRemus
    Dec 22 2011

    @Ricky “Busy” is it? ;) No worries.

    Reply
  5. Dec 22 2011

    Thanks for sharing this, Chuck! I’ve implemented a similar solution previously based on Ubuntu and the unofficial PCoIP .deb from HP.

    I’m very happy that VMware now has released an official version of this software.

    Lars

    Reply
  6. Dec 23 2011

    Along the lines of Kendrick’s suggestion, I have done this to make workstation desktop appear to be the default OS for a particular user.

    1.)Write a script that will launch the View client, preferably full screen (if possible, will play with this next week).
    2.)Then make that script the default shell for a user.
    3.)Allow that user to log in without a password.

    Anyone selecting that user will immediately get a screen with the View client up. When they close the View client, it exits the script and drops their session back to the user login screen.

    I will try to document this better and post back here with updates or a URL.

    BTW – excellent post, thanks for sharing this!

    Reply
    • forbsy
      Mar 29 2012

      Hi Mark. How would I go about making sure that the View Connection server address is pre-populated in the View client and launch fullscreen?
      Basically we need to launch the client inside a separate X session (with a particular geometry) so that we can share it, but when we do this, the VMWare-View client is not reading the proper resolution geometry – and we can’t figure out where it is getting the geometry from. When running inside this separate X session, and I tell it to go fullscreen, it doesn’t fill the whole screen.

      Thanks

      Reply
  7. Bozo Popovic
    Dec 23 2011

    Thanks for putting the effort, this is really good news for all those trying to repurpose. Keep up the good work!

    B.

    Reply
  8. Chulerico
    Dec 24 2011

    Thanks for this will definelly tried it, and Mark suggestions would be awesome.

    Thanks

    Sam

    Reply
  9. Jan 3 2012

    This seems to be a great technical solution but I don’t see a viable possibility for PXE boot in a real environment.
    I worked on this since a year and for now, the lighter and really efficient solution we have still Tinycore. We were able to include the VM client full pcoip in it as well and the size of our image is slightly different. We are speaking about 30 MB in total.. And hardware compatibility for old PC is arround 93% over 45 000 workplaces I have to manage.
    Just think about it.
    Jocelyn

    Reply
  10. RexRemus
    Jan 3 2012

    @issalene I agree with you. I am already doing work to reduce the size of the deployed image in preparation for a PXE-style deployment. Understand that this first post was not intended to be a viable solution for that environment, only as a way to allow people to quickly and easily test/demonstrate what a re-purposed PC using Linux might be like. All I can say at this point is to be patient. With the current Ubuntu support it’s going to be difficult to seriously reduce the deployment size and maintain VMware support. However, for those willing to move beyond a fully supported configuration (and anyone running Linux PCoIP from the hacked out bits from HP falls into that category) there should be several viable options that emerge before too long. I find myself in a unique position being a VMware employee here in that while I already have made good progress in that area I am leery of promoting something that goes directly against what the company will support as I don’t want anyone contacting our support staff and saying
    “But one of your employees said… “. But give it time, I am working with internal resources to find a way to get good information out to the community while avoiding any issues that may arise internally. I don’t have a solution for that yet, but I am working on it.

    Reply
  11. Jan 9 2012

    Man thanks a lot for your post, everything is working pretty good here on my enviroment, but what I really need if possible to vmware be opened automatically.. thanks againg .. take care

    Reply
    • RexRemus
      Jan 9 2012

      If you must use Ubuntu, I don’t have anything handy at the moment but it should be easy to find documentation for setting up auto launch of an app. If you are ok using a different distro, follow the other two recent posts to extract the Ubuntu View client files and then build an OpenSuSE live CD – which WILL auto-launch out of the gate. It’ll also be much smaller than the Ubuntu ISO from this tutorial.

      Reply
  12. Aaron
    Jan 9 2012

    @Mark Vaughn
    Mark, Can you share the info on how you did that?

    Reply
  13. makes
    Jan 18 2012

    Many thanks for this article !. It has really helped me (a linux beginner) get a view client going on a LiveCD.

    Reply
  14. gaunab
    Feb 24 2012

    For those who want to boot int a vmviewer over PXE and without having something else around, I suggest to have a look on thinstation.org . I’ve recently managed to build an environment which does nothing else than booting directly to an vmviewer login screen. Maybe thats an solution for others, too.

    Reply
    • sam
      Mar 7 2012

      gaunab,

      any guides with thinstation?

      will love to try it out, thanks

      Sam

      Reply
  15. Jim
    Apr 6 2012

    I’m missing a key step because I’m ignorant about Linux. Following your instructions, I’m trying to add VMWare Player, rather than View, to a Live CD image. Installation (via the installation script, as I can’t find an apt-get package for Player) goes fine, but I’m missing how I tell the UCK to include VMWare Player in the ISO build process. I have the feeling it’s why this step is included: “UCK will unpack the ISO, mount it, and open up a chroot’d environment so that you can further customize the live CD environment.” So, is it the case that I must install the player into the mounted ISO space?

    Sorry for what’s probably a stupid question, and thanks for any help.

    Reply
    • RexRemus
      Apr 6 2012

      Not entirely sure of the process you are following but point is to install player into the chroot’d UCK environment and NOT the base Ubuntu environment. So install nothing into the base other than UCK (and the ISO it will be operating on), let UCK unpack it and create the chroot’d environment, THEN install whatever you want to live on your live CD into THAT environment. Let UCK package that back up and you should be ok.

      Reply
  16. Sean
    May 8 2012

    Great post. Thanks for share this.
    I have a question. Does it support ThinPrint?
    It seemes ThinPrint not work. Correct?
    Thanks.

    Reply
    • RexRemus
      May 8 2012

      I believe you are correct. No thin print support at the moment.

      Reply
      • Sean
        May 10 2012

        Thanks for your response.
        How about USB redirection?

        Reply
        • RexRemus
          May 12 2012

          Not currently supported. May see that sorted for MacOS first. I don’t have exact details.

          Reply
  17. Mik
    Oct 18 2012

    hi, the link in dropbox doesn’t work anymore; can you please re-upload? thank you.

    Reply
  18. May 5 2013

    Hi,

    Nice tutorial! I tried this with 13.04 and 12.04 LTS, but neither worked.

    Reply
    • RexRemus
      May 22 2013

      It may be time to revisit this for newer releases, I had hoped things would not change so much to cause this to break so easily.

      Reply
  19. Agamenon
    Mar 5 2014

    broken link :(

    Reply
  20. Ed Hensley
    Jul 25 2014

    Several things.
    1) Enable root (on a vmware workstation)
    2) snapshot at major points (rollback such a time saver)
    3) Forget adding dep lines. Copy your sources.list and past into the UCK’s sources.list) This will correct a ton of errors.
    4) remove liberoffice
    5) edit the eula for vmware-client to remove it or comment it out from ~/tmp/remaster-root/usr/bin/vmware-view
    6) eliminate the boot options for Ubuntu and directly load client.

    Reply

Trackbacks & Pingbacks

  1. How to Build an Ubuntu Live CD for VMware View | Wall's View
  2. Ryan Birk – Virtual Insanity » Ubuntu Live CD with VMware View Client!
  3. Extracting the VMware View Client for Use on Alternate Distros | MindFlux Inc.

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments