Skip to content

January 5, 2012

23

Creating a VMware View Live CD with SUSE Studio

This post continues my efforts to provide information on how to use the VMware View Client for Linux in fun and interesting ways. This time, we’re going to use the output from my last post on extracting the VMware View Client from the Ubuntu .DEB file to create a new live CD on a different distro – in this case OpenSUSE 12.1. Further we’ll be using SUSE Studio to create the ISO.

As always, let’s get this out of the way-

DISCLAIMER: This process is in no way supported by VMware. Use the extracted VMware View Client and subsequent OpenSUSE live CD ISO at your own risk. Neither I, nor VMware Inc. make any warranties that either of these artifacts will work for you in any way, in fact they may explicitly harm you and your family if you are not careful – but probably they won’t. Do not contact myself or VMware Inc. for support when utilizing either the extracted files or the OpenSUSE live CD ISO containing them. You have been warned.

Moving on…

SUSE Studio

First let me say that I have been a huge fan of SUSE Studio since the moment I got into the beta for it. I have always thought that it is not only easy to use but also very powerful – a rare combo indeed! If you have never heard of it before I like to describe it as a wizard-driven Linux appliance factory. Admittedly that description probably sucks, but that’s what I like to tell people who have never heard of it – therefore they can’t easily argue with me about it. By the time they go and see it for themselves I am usually long gone.

Getting started

In order to use SUSE Studio you will need to have an account, thankfully SUSE Studio supports OpenID, so if you don’t have an existing Novell account, you can sign in with a pretty board range of other accounts you likely already have:

Plenty of account options

Plenty of account options

Once you get logged in, you are brought to your homepage. Here, you will find any previously built appliances and you’ll be given the option to create a new appliance. As that’s exactly what we are here to do, go ahead and click it.

Create a new appliance

Create a new appliance

Template Selection

Once you do that you will be taken to base template selection. This is the one item you only get to pick once, so make it count! There are several options you can choose from including the most recent OpenSUSE release, the most recent SLES release, and the previous SLES release. Within each section are multiple configurations targeting different deployment scenarios ranging from JeOS (Just Enough OS or “Juice”) to a text only server to a full blown desktop client with all the fixin’s.

For this tutorial we want to select the openSUSE 12.1 Minimal X base template and the 32bit architecture. We’ll also name this appliance ‘VMware View LiveCD’.

Selecting a base template

Selecting a base template

Once you are done, click ‘Create appliance’ and you will shortly be taken to the ‘Start’ tab of the SUSE Studio wizard.

The Start tab

After template selection, you’ll notice some key stats and a little thumbnail preview of the visual “look” of your appliance on the left. This will update automatically as you change the appliance configuration. On the Start tab all you can do is change the name of the appliance. The wizard suggests that we move on to the ‘Software’ tab, and I concur.

The Start tab

The Start tab

The Software tab

Now we are getting somewhere. Stuff to do! This tab is where you can add just about anything you like to your base template. Anything in the SUSE repositories is immediately available, and you can add additional repositories or even just directly upload your own custom RPMs to be applied to the base template during the appliance build. Much like any modern Linux install you can select pre-grouped patterns such as “Games” or “Java Development” which will install all required packages and dependencies or you can select individual packages and let the robot looking version of Clippy determine the requirements and deps automatically.

The Software tab

The Software tab

In order to satisfy the requirements of the VMware View Client we will need to add a few libraries. I’ve gone through the hell of finding out what’s already included in the base template, and what needs to be added so I’ll spare you the details. In short, the following packages will need to be added:

  • libopenssl0_9_8
  • libpng12-0
  • libatk-1_0_0
  • libgtk-2_0_0
  • libgdk_pixbuf-2_0_0

You will add these packages by entering them into the ‘Search for software’ text box and then clicking the ‘+ add’ button next to them.

Adding a package

Adding a package

Once you have added all the required packages it is time to move on to the ‘Configuration’ tab.

The Configuration tab

This is where you’ll likely spend the meat of your time when making a new appliance. There are several sub-tabs here and we will go through each one. Let’s get started…

General

This sub-tab is where you will add users, configure basic networking and firewall rules, set time zone, and configure language/locale info. For this build I tweaked a few things – disabled the firewall, and switched the user account name to ‘view’. I left all passwords at defaults for the sake of this build, but I don’t recommend doing that in the real world.

General settings sub-tab

General settings sub-tab

 Personalize

Here you can tweak the appearance of your appliance via a custom logo and/or background. I took a moment to whip up some custom artwork (available here and here) and uploaded them to make this appliance look a bit more VMware View-ish. You are free to peruse DeviantArt or 500px for your custom artwork though. Experiment.

Looking a bit more VMware-ish

Looking a bit more VMware-ish

Startup

This sub-tab controls the default runlevel of the appliance (leave it alone here – 5: Graphical Login) and allows you to add a EULA to the appliance if you require one, for our work here, we don’t, so leave it be.

Startup sub-tab - Nothing to see here...

Startup sub-tab - Nothing to see here...

Server

Another sub-tab where we don’t need to touch anything, we have no database installed, and want to keep it that way.

Servers? Nope.

Servers? Nope.

Desktop

Ah! Something we care about again! Here we will configure the appliance to auto login as the ‘view’ user we created back on the ‘General’ sub-tab and we’ll also setup the VMware View Client to be automatically started once the user is logged in.

Check the box to ‘automatically log in user’ and select ‘view’ from the dropdown box (should be the default).

Next, click ‘Add new autostart program’. In the ‘Command’ box enter:

/usr/bin/vmware-view --fullscreen

Select ‘view’ in the ‘Start for user” dropdown, and enter “VMware View Client” in the comment (or don’t). Lastly, make sure the ‘Enabled’ check box is in fact checked – otherwise we just did all this work for nothing.

Setting up auto login, and auto launch of the VMware View Client

Setting up auto login, and auto launch of the VMware View Client

 Appliance

This sub-tab isn’t terribly relevant to running our appliance as a live CD except for a few options towards the bottom of the page. Primarily this is to configure the RAM and disk attributes when deploying the appliance as a virtual machine.  Since we are only looking to make an ISO right now don’t mess with those settings, they won’t have any impact.

The one location we do care about here is the ‘Additional Options’ section.  Here we are presented three options:

  • Add live installer to CDs and DVDs
  • Enable VMware CD-ROM support
  • Enable WebYaST

If you want to build a live CD that also supports installation, leave ‘Add live installer to CDs and DVDs’ checked. But be aware this will increase the size of the resulting ISO a bit. For now,  deselect that option and leave the others as-is.

The Appliance sub-tab

The Appliance sub-tab

 Scripts

This sub-tab will allow you to execute scripts at the end of the build process and/or each time the client boots. Again, for the sake of simplicity we’re going to skip adding/changing anything here but when trying to reduce the size of your ISO/image file the ‘end of build’ script can be a very powerful tool to run through and delete unneeded files and directories. I suggest re-visiting these options after your initial build if your interest lies in minimizing the ISO footprint.

The Scripts sub-tab

The Scripts sub-tab

That wraps up the ‘Configuration’ tab settings. Now we’ll move into the ‘Files’ tab.

The Files tab

Up till this point you may have been wondering when or how the actual VMware View Client itself was going to get installed. Well, wonder no more! This is tab is where we will add the .tar.gz file created from extracting the VMware View Client out of the Ubuntu .DEB file.

The ‘Files’ tab allows you to add pretty much any kind of file you like to the base template. This is incredibly useful if you’ve made an archive of many specific settings/properties files and just want to lay them in over the base image.  It’s also a great place to drop in custom or home-built software which is what we are going to do right now.

Click ‘Upload file…’ and navigate to the location where you placed your extracted VMware View Client .tar.gz archive. Wait for it to upload, and we are done. In this case all the default settings are what we want – the archive should be extracted into ‘/’ or the root directory and since permissions will be preserved we shouldn’t need to touch those.

`VMware View Client uploaded, and set to extract

VMware View Client uploaded, and set to extract

 The Build tab

And now the magic happens. The Build tab is where you configure how you would like your appliance to be “output” – what formats it will be created in.

Since our goal here is to make a live CD let’s set that to the default. Choose ‘Live CD/DVD (.ISO)’ from the drop down list.

Default build format selected

Default build format selected

With that setup we can now kick off  the build of the live CD. Click ‘Build’ and go grab something to drink. Or you can peruse this captivating gallery of a build in process:

The build is about to begin!

The build is about to begin!

Look! It's building!

Look! It's building!

Almost there!

Almost there!

Annnnd we're back!

Annnnd we're back!

The build is complete. Now we get to one of the coolest features of SUSE Studio – the testdrive! You’ll notice this option to the right of the final build size for your appliance. Clicking it will launch a new browser window and will load your appliance into a virtual machine. The console for the machine opens in the new browser window and you can interact with it from there. It’s important to note that NO outbound network traffic is allowed from a testdrive, it’s just there to let you verify and modify the configuration of your appliance before wasting the time and bandwidth to download it. It’s an incredibly useful tool. One other note is that if you look carefully you’ll see that the version number of your appliance has been auto-incremented. This will happen on each build. You can of course set your own specific version number but this is also a nice touch.

Let’s take this appliance for a testdrive…

As you can see the custom logo and background are present and looking rather dapper. One thing that could be changed is the bootloader timeout – it should probably be reduced to 0. That would be a good thing to add to a post-build script or apply via a configuration file archive but for now I will leave that as an exercise for the reader. You can also see that the VMware View Client launches automatically in full screen mode so all a user would see is the prompt to connect and login.

Closing Thoughts

So that’s it. We have a good basis for a PC re-purposing live CD built quite easily and quickly via SUSE Studio. It’s substantially smaller (230MB) than the Ubuntu live CD I showed you how to build previously, but to be fair, no time at all was spent on optimizing that image. Still, I think it’s quite a bit easier to build an image via SUSE Studio than to use UCK and manually strip out significant portions of the OS. However, this method also means you’re completely unsupported but as Captain Kirk once said, “Risk is part of the game. You want to sit in that chair?”. Well, do you?

This post gives just enough information to build a starting point. There are several tweaks and enhancements that can be made from this point:

  • Adjust bootloader timeout to 0 to avoid users doing whatever it is that users do when they break stuff
  • Add a script to determine the proper VMware View Connection Server and pass it in via command line to the VMware View Client
  • Add a script that locks the user into the VMware View Client so that when they exit it, or logoff from a desktop it automatically relaunches
  • Re-enable the firewall and open only the required ports
  • Prune the image to reduce overall size. It’s not bad right now, but could probably get under 200MB with a bit of effort and probably to about 150MB with a bit more

I hope you find this information useful. Post in the comments if there’s another distro you’d like to see me mess with, or if you already have and have had success.

That’s all for now.

Read more from Linux, PCoIP, VDI, View, VMware
23 Comments Post a comment
  1. Brian
    Jan 10 2012

    At the end of the tutorial, you have a list of tweaks that could be made. I am very interested in a script that locks the user in the View Client when they logoff and also automatically inputs the Connection Server. Could you point me in the right direction on how to accomplish this? Thanks for the wonder guides!

    Reply
  2. RexRemus
    Jan 10 2012

    @Brian There are several ways to do these actions, but perhaps no one global way that will work for everyone. I plan to look into it and provide some future posts with information along these lines though – at least as a jumping off point. However my current work schedule is going to limit my updates to the blog for at least the next several weeks (through Feb.) once that settles down I’ll pick things back up. In the meantime there are several examples of how to do infinite loops in shell scripting. Look at those, and then apply those techniques into the vmware-view wrapper/launcher script – that’s why I left it in place in the extracted bundle to act as an easy location to place this kind of functionality. As for adding a default View server, just run vmware-view –help and examine the –serverURL argument. If you know your connection server address will be static you can simply add that option to the launch of the View Client inside the infinite loop. If you need a more complex method of selecting a connection server you would need to script it. Perhaps you’d poll the load balancer via an HTTP request, extract the proper connection server URL and then use that. You’d do that action prior to falling into the infinite loop. Anyway this is becoming a blog post in itself but I think you get the idea. Don’t wait on me, the information you need is already out there.

    Reply
  3. JaredKberg
    Jan 17 2012

    First, thank you for this great tutorial! I am a very green Linux user who has been thrust into this enviorment with a request from my new job and this by far the most helpful item I have come accross.

    Second, I was able to make everything work, except the virtaul client at the end of the video never appears. Instead I have a blank screen with just the background on it.

    I think it is because I was not able to find the specific VMWareview client mentioned above. Do you know where I can find that specific one?

    Reply
  4. Jan 17 2012

    -s 1.1.1.1 is the syntax to connect to specific connection server. So it will be /usr/bin/vmware-view –fullscreen -s 1.1.1.1

    Reply
  5. RexRemus
    Jan 17 2012

    @JaredKberg Thanks and glad you found this post useful. The View client used for this tutorial was extracted from the Ubuntu package.
    I don’t want to distribute that package directly for various reasons but you can find a tutorial on how to extract it in my previous blog post. Can’t post a link directly right now but you can find it right up top. Hope that helps.

    Reply
  6. JaredKberg
    Jan 27 2012

    @RexRemus – I was able to get the files extracted following your other tutorial! Thanks!

    The two issues I have left are the boot CD does not allow me to reboot when I am done. I can select reboot, but nothing happens. Maybe I missed something in the extraction?

    Any idea if I could use the open VM client instead of this one? Wasn’t sure if that would even work as the client hasnt been updated in over a year.

    Thanks again, great site!

    Reply
  7. RexRemus
    Jan 30 2012

    @JaredKberg I don’t see why you couldn’t use the open client but that won’t get you PCoIP support as the Ubuntu version does. Still, I imagine it should work fine with a little testing/tweaking.

    As for the reboot issue I don’t recall having a problem with it but it’s something I can take a look at. Again, per my last post – my schedule for VMware is pretty insane through March (Q1) so it may be a while before I can seriously commit to more lab work. But if I can test it out, I will, or if anyone else can verify that this is an issue for them as well that would be good.

    Reply
  8. jason
    Feb 16 2012

    I have tried this both with the extracted package directions you posted earlier and with the code found on google posted by VM Ware. I get errors on startup either way.

    If I use the Ubuntu extract, when the CD boots, after the initial splash screen I get brought to a black screen with a logon prompt. Very generic. Even though I have auto log in selected. If I type the user information it goes very quickly (unrecognizable) and back to this black prompt. If I use the google code version, it just boots to basic ICE desktop.

    I am a complete Linux noob and have no idea where to go. I’ve tried 6 different builds all with no luck. Is there any way someone could post a working .iso that boots right to the VMWare client? I could even provide hosting for it, if needed.

    Reply
  9. centus
    Feb 27 2012

    Can VMVIEW set AutoConnect USB devices?
    I come to it. If anyone have other experiences, please share them.
    Thank Centus

    Reply
  10. JaredKberg
    Mar 27 2012

    Update on this:

    I still am not able to get reboot commands to work. Shutdown doesnt work,etc. Interestingly enough logging out “works” and presents you with a Linux screen.

    I have also noticed a pattern in what boots and what doesn’t. In laptops I have had almost zero success at booting via the boot disc. On desktops I have had the opposite, almost 100% success rate.

    Strange, right?

    Reply
    • RexRemus
      Mar 27 2012

      Not all that strange – laptops tend to be more picky. Using a different variant of the core OS might have better results on laptops but again the point of this wasn’t to build the one ISO to rule them all, merely to point people down the right path. I find the reboot stuff more odd. That makes far less sense to me – it should “just work”

      Reply
  11. Shawn
    Mar 31 2012

    This is awesome. The only thing I could want that you haven’t done yet is this setup, over PXE boot. Not as a bootable CD. Maybe a new write up idea for you? ***hint hint…*** Great work BTW.

    Reply
    • RexRemus
      Mar 31 2012

      PXE is absolutely in the works here – also some more info/examples of how to control the View Client launch config. I’ve literally been on the road teaching or learning about View/PCoIP non-stop since the start of Q1. Next week is my first full week back (where I wasn’t violently ill :-)) that I can possibly do some lab work. Once things settle down a bit I plan to get some more posts up on this – thank you all for being patient while my “real” job was in the way!

      Reply
  12. Shawn
    Mar 31 2012

    If anyone is looking to speed up the GRUB selection after you create a live CD, download ISO Master and navigate to /boot/i386/loader and vi isolinux.cfg you will see a parameter called timeout that was set to 200 by default, change it to what ever you please. I changed it to 5 to have a very slight chance to hit an option key just in case.

    Reply
  13. Rich
    May 2 2012

    This is a great post! What packages would I need to add to the template in order to get sound to work?

    Reply
  14. Ed
    May 2 2012

    Linux noob here.

    Any idea why the connection server’s certificate would be rejected by this boot CD, but accepted by the Windows and Android clients? Hitting connect says ‘Untrusted View Connection’, but viewing the certificate doesn’t show anything obviously wrong. It’s a DigiCert wildcard certificate.

    Reply
  15. Spliff666
    Jun 4 2012

    Cheers for this, got it all working nicely, however ran into problems with I’m guessing the limits of the linux client.

    Can’t log in multiple times with it using the same user/pw.

    Its a trivial thing, but I’m working in a primary school and this was a needed feature, tested it with out embedded wyse and samsung clients and with windows clients too and it worked, just not with this one unfortunatly.

    Maybe in a few updates it’ll work, I even ended up resorting to installing ubuntu and testing it from that.

    Windows embedded it is… :(

    Reply
  16. Brian
    Jun 4 2012

    Just checking in now that the official Linux version of View has been released to see if you have any new builds with customizable scripts coming out. Thanks again for all your work on this project!

    Reply
  17. Thomas Petterberg
    Jun 18 2012

    Check out this blog post … Awesome stuff that completely automates the configuration of a Linux image including the view client. It’s less than 40MB inluding graphics and network drivers. Awesome!!!

    http://myvirtualcloud.net/?p=3446

    Reply
    • RexRemus
      Jun 18 2012

      Yeah, I have been watching this develop internally and it’s part of the reason I have not come back to revisit these posts in a while – frankly they were doing exactly what I hoped to do but had the time and were doing it better than I was :) Much credit, and hopefully we can pull this stuff internally and offer it up as an easy desktop re-purposing tool right from VMware. But until then – have at it. Great work.

      Reply
  18. Chris
    Nov 1 2013

    Thank you very much for this writeup. It was great.
    I built out my image and everything is working.
    The only thing I am having a problem with is multiple monitor support.
    I have tried this on several workstations and I cannot get suse to do anything but just clone my second and third monitors to the default backround image.
    Any help would be appreciated .
    Thank you again for this great article.

    Reply
    • RexRemus
      Nov 6 2013

      I can’t really comment on this directly here. Have you opened this up to VMware Support? That’s probably the best route to resolution.

      Reply

Trackbacks & Pingbacks

  1. Thin OS for VMware View Client | VMman

Share your thoughts, post a comment.

(required)
(required)

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

Subscribe to comments