Posts tagged VDI
The E.T.D.F. Series – Setting up the Network and Dedicated Remote Access (Part 3)
Jun 8th
- OK, we are *almost* done getting our network set up properly for VDI, but we’ve got a few more things to do. Specifically, we need to address:
- Handling our external, Internet facing, dynamic IP address.
- DHCP and DNS
- External VPN access
Dynamic External IP
Most ISP’s (not all) provide a single, dynamic IP address for consumer grade service (i.e. home use). But when we’re trying to connect to our virtual desktops from somewhere out on the public Internet, how do we know which IP address to connect to?
Generally speaking, connecting to an IP address is bad practice because it’s inflexible. Instead, we should connect to a Fully Qualified Domain Name (FQDN). OK fine, so we’ll set up a DNS entry and use a FQDN to connect to our desktops. But what happens when our dynamic IP address changes and the DNS entry is still mapped to the old IP address?
What we need is an external Dynamic DNS (aka DDNS) service which will allow us to programmatically update our IP address whenever it changes. There are a number of both free and paid-for DNS providers out there that can deliver DDNS services. Personally, I use EditDNS (www.editdns.net). They have a ton of functionality and they’ve been rock solid for the past few years I’ve been using their services, so I’m quite happy with them.
Now, many home use routers these days have the capability to update a DDNS provider. But in my experience, the functionality is somewhat limited. What if, for example, I want aaron.sweemer.com and desktop.sweemer.com to be dynamic entries and www.sweemer.com to be a static entry, pointing to my blog server hosted somewhere else? In reality, I’ve got about 20 FQDN’s that I need to be dynamically updated and about 100 that I want static. So instead, I created a script that will:
- Query my external IP address (check this out, a free tool from Whatismyip.com)
- Compare the result of the query with the IP obtained from the previous query
- If the IP is the same, or contains something other than an IP (e.g. HTTP error), the scirpt exits.
- If the IP is different, the script updates my DDNS entries via the EditDNS API, then updates a log file documenting the change, and finally adds the new IP to the last line of a file called previous_ips.
If you’d like to use the script I wrote, you’ll first need to do the following:
- If don’t already have one, set up an account with EditDNS and make sure you have properly configured the domain name(s) you own.
- Verify your linux distro has lynx (a command line, text only, www client)
- Verify your linux distro has curl (a tool to transfer data using HTTP)
- Create a directory (anywhere you have rwx access is fine) for the script and its files to live
- In this directory, create a text file called editdns.sh. Paste the content (below) into it.
- Replace XXXXXXXX with your EditDNS password.
- Make editdns.sh executable (chmod +x /path/to/editdns/editdns.sh)
- Create another text file called records and, one per line, enter the FQDN’s of the DDNS entries you wanted updated (e.g. mydesktop.mydomain.com)
- Add the editdns.sh script to your crontab to run at regular intervals (e.g. mine runs every five minutes and the entry in cron looks like this: */5 * * * * cd /usr/local/editdns; ./editdns.sh)
And here’s a copy of the actual script …
#!/bin/bash
EDITDNSPASS=”XXXXXXXX”
LYNX=`which lynx`
TIME=`date`
CIP=`curl -s http://www.whatismyip.com/automation/n09230945.asp | awk –re-interval ‘$1 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ {print}’`
PIP=`tail -1 ./previous_ips`if [ "$CIP" != "$PIP" && –n "$CIP" ]; then
cat ./records | while read FQDN; do
$LYNX -source “http://DynDNS.EditDNS.net/api/dynLinux.php?p=$EDITDNSPASS&r=$FQDN”
done
echo “IP Change! New IP is $CIP. Editdns.net was updated at $TIME.” >> ./editdns.log
echo $CIP >> ./previous_ips
else
exit 0
fi
If you have any issues or questions, feel free to email me. Also, keep in mind, this a quick and dirty script that accomplishes what I want it to accomplish. Feel free to make it more robust (e.g. error handling or better logging) to suit your needs.
DNS and DHCP
It’s quite possible you’ll want to skip this section and opt for setting up DHCP and DNS via Microsoft’s built in DHCP and DNS services that come out of the box with their server products. To properly set up VMware View, we’ll need to set up Active Directory anyway, and quite frankly, it’s far easier to set up a Microsoft server with DHCP and DNS than it is to set up a Linux server. So feel free to skip this section and leverage Microsoft for these services. If, however, you’re a gluten for punishment then by all means, read on.
Let’s first start with DNS. Here too we need Dynamic DNS because as we’re handing out IP addresses via DHCP, we want our DNS server to properly reflect current information as IP addresses change. So, if you don’t already have bind9 (the DNS server), go ahead and install it (sudo apt-get install bind9 should work on Ubuntu / Debian distros).
The default configuration for bind9 is to act as a caching server, so the first thing we need to do is configure our DNS to forward all unknown DNS requests to another DNS server. These should be provided to you from your ISP. Edit the forwarders {} section of your named.conf.options file (usually located in /etc/bind/) to look like this …
asweemer@cincylab-rtr1:/etc/bind$ more named.conf.options
options {
directory “/var/cache/bind”;forwarders {
1.2.3.4;
5.6.7.8;
};auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
Obviously, you’ll need to change 1.2.3.4 and 5.6.7.8 to the IP addresses given to you by your ISP.
Next, we need to modify our master named.conf to allow dynamic updates to DNS. Add the following entry to the bottom of your named.conf file.
controls {
inet 127.0.0.1 allow {127.0.0.1; 192.168.9.25; 10.10.7.1; 10.10.7.2; } keys {“rndc-key”;};
};
This tells the DNS server to allow updates from the IP address located between the {}. Notice the first three IP addresses are local IP addresses. The fourth IP address is a slave DNS server, which I have yet to set up. The rndc-key is the default key generated during installation of bind9 and it’s used to authorize the updating of DNS records. If you’re using Ubuntu, then you’ll likely find the key in the file /etc/bind/rndc.key …
asweemer@cincylab-rtr1:/etc/bind$ sudo cat rndc.key
key “rndc-key” {
algorithm hmac-md5;
secret “QZ5jOmcr/OW3nzksR5q0Hw==”;
};
asweemer@cincylab-rtr1:/etc/bind$
Note the file is a text file named rndc.key, and the actual key is called rndc-key located within the text file.
OK, next we need to define our zones in the named.conf.local file. For each domain you’re using (probably just one), you’ll need two entries: one for the domain and one for the reverse lookup of the domain. I have two domains I’ll be updating, so my named.conf.local file looks like this …
asweemer@cincylab-rtr1:/etc/bind$ cat named.conf.local
//
// Do any local configuration here
//include “/etc/bind/rndc.key”;
zone “mydomain.com” {
type master;
file “/etc/bind/zones/mydomain.com.db”;
allow-update { key “rndc-key”; };
allow-transfer {10.10.7/24; };
};zone “7.10.10.in-addr.arpa” {
type master;
file “/etc/bind/zones/rev.7.10.10.in-addr.arpa”;
allow-update { key “rndc-key”; };
allow-transfer {10.10.7/24; };
};zone “dmz.mydomain.com” {
type master;
file “/etc/bind/zones/dmz.mydomain.com.db”;
allow-update { key “rndc-key”; };
allow-transfer {192.168.9/24; };
};zone “9.168.192.in-addr.arpa” {
type master;
file “/etc/bind/zones/rev.9.168.192.in-addr.arpa”;
allow-update { key “rndc-key”; };
allow-transfer {192.168.9/24; };
};
A couple points to note here:
- I created a subdirectory called “zones” under /etc/bind/ where I put all my zone files. This isn’t the default location, and in addition, this isn’t necessary as the zone files can be located anywhere you’d like. But be aware the configuration file above reflects the location of my files.
- Notice the include “/etc/bind/rndc.key” on the first line and the all-update directive within each zone definition? This should be self explanatory at this point.
- The allow-transfer directive within each zone definition explicitly limits zone transfers (copy) to the IP(s) defined. This is an important security feature since, by default, DNS allows transfers to anyone, and the info contained within a DNS zone file can really give hackers visibility into your network.
Now we need to create the zone files we just defined above, which will contain our actual DNS records. Here is the zone file for our dmz.mydomain.com …
asweemer@cincylab-rtr1:/etc/bind/zones$ cat dmz.mydomain.com.db
$TTL 3600 ; 1 hour
dmz.mydomain.com IN SOA master.dmz.mydomain.com. root.master.dmz.mydomain.com. (
2009060514 ; serial
86400 ; refresh (1 day)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
3600 ; minimum (1 hour)
)
NS master.dmz.mydomain.com.
NS slave.dmz.mydomain.com.
A 192.168.9.25
MX 10 mail.dmz.mydomain.com.
MX 20 mail-spool.dmz.mydomain.com.
computer-1 A 192.168.9.247
TXT “317bf41a2c5b70fd9ca4e283d364dcddd5″
computer-2 A 192.168.9.250
TXT “00cf6242f693ebbf1d545159548e44ab81″
computer-3 A 192.168.9.243
TXT “31a0cb7e096a96c63dc998d2db3be6e450″
mail A 192.168.9.25
mail-spool A 192.168.9.26
master A 192.168.9.25
www CNAME master
A couple important things to point out here:
- The entries for computer-1, 2 and 3 are dynamic entries there were generated by the DHCP server. The TXT record that follows these entries is a unique identifier which is also generated by the DHCP server and is used to ensure it won’t overwrite existing DNS records that were generated by another process/server.
- You’ll obviously need to change the domain names and IP addresses to match your environment.
- If you haven’t worked with bind9 before, this file probably looks pretty cryptic to you. If so, I would recommend taking a look at http://www.zytrax.com/books/dns/ch8/soa.html, which gives a pretty good overview of the SOA (defined in the first part of the file). The balance of the file (i.e. the record definitions) is pretty straight forward.
The reverse zone should look like this …
asweemer@cincylab-rtr1:/etc/bind/zones$ more rev.9.168.192.in-addr.arpa
$ORIGIN 9.168.192.IN-ADDR.ARPA.
$TTL 1h;
IN SOA master.dmz.mydomain.com. root.master.dmz.mydomain.com. (
2009060501 ;
1d ;
1d ;
4w ;
1h ;
)
IN NS master.dmz.mydomain.com.
IN NS slave.dmz.mydomain.com.
25 IN PTR master.dmz.mydomain.com.
26 IN PTR slave.dmz.mydomain.com.
I mixed it up just a bit in this file to point out a few different ways to configure a zone file. In this file, notice the following differences:
- The $ORIGIN directive sets the domain name to be appended to any unqualified records. If the $ORIGIN directive doesn’t exist (as it doesn’t in the first config file), then it is implicitly defined by the zone name.
- The time variables can be defined with d (day), w (week), h (hour), etc.
That’s about it for DNS. Once you’ve got your bind9 server configured, restart your bind9 server (sudo /etc/init.d/bind9 restart). And of course, be sure to test your configurations by using the standard DNS tools (e.g. dig, nslookup). If you get errors, pay careful attention to your local syslog file (probably located at /var/log/syslog) as that’s where DNS and DHCP errors typically write their error messages.
OK, next up is configuring our DHCP server. And once again, this post is starting to get way to long, so it looks like I’ll need a fourth and (hopefully) final post to this section.
The E.T.D.F. Series — Setting up the Network and Dedicated Remote Access (Part 2)
Jun 2nd
I got up early to get some work done before driving down to KY to work with a customer on their VDI pilot. As I was preparing for the meeting, I thought to myself, “wow with my studies for the VCDX admin exam, and the recently launch of vSphere, I haven’t done a whole lot of VDI recently.” And then BAM! It hit me like a ton of bricks. I haven’t completed the E.T.D.F series I started almost 6 months ago! If this blog has done anything for me, it has made me painfully aware of my numerous character flaws. <sniffle><tear><sniffle>
Anyway, not that anyone is following along anymore, and purely in the interest of self improvement, I’m determined to finish what I’ve started (both for this series and my VCDX study notes series). So without further delay, here is the second part of the networking section (here is part one). And for your convenience, here again is the Visio diagram of my lab.

Router / Firewall (cincylab-rtr1)
In my environment, the vast majority of all relevant network configurations are on cincylab-rtr1, which is really an old Gateway PC that I had lying around with a single 2.2GHz processor and 1Gig of RAM and a single 100Mbps NIC. I installed Ubuntu server 8.04.1 (kernel 2.6.24-19-server) on it and made it the gateway between my lab and the DMZ (aka, my home network).
The first thing I needed to do was get the basic networking on the server set up. I have three networks in my house …
- An external DMZ, VLAN 192 (aka, my home network)
- An internal “production” network, VLAN 10. I put the word production in bunny ears because nothing is *really* production … it’s all just a lab. But I try to protect this network a little more than the next.
- An internal “lab” network. This is where I can really have fun!
Configuring the Interface(s)
The server only has one NIC and I was too lazy (and cheap) to go buy a new one. But it’s a 1GigE card, which is plenty for my environment. And it’s a snap to configure …
root@cincylab-rtr1:/etc/network# more interfaces
auto lo
iface lo inet loopback
auto vlan10
auto vlan192
auto vlan10:1iface vlan192 inet static
address 192.168.9.25
netmask 255.255.255.0
gateway 192.168.9.1
mtu 1500
vlan_raw_device eth1iface vlan10 inet static
address 10.10.7.1
netmask 255.255.255.0
broadcast 10.10.7.255
network 10.10.7.0
mtu 1500
vlan_raw_device eth1iface vlan10:1 inet static
address 10.0.1.1
netmask 255.255.255.0
broadcast 10.0.1.255
network 10.0.1.0
mtu 1500
vlan_raw_device eth1
root@cincylab-rtr1:/etc/network#
Turn on Routing
Now that the interfaces are configured, we need to turn on routing. In Linux, this can be accomplished a couple different ways. The easies, IMHO, is to simply edit the /etc/sysctl.conf file and set net.ipv4.ip_forward=1. You could also add echo 1 > /proc/sys/net/ipv4/ip_forward to your /etc/rc.local file. Either way should turn on IPv4 routing on your server.
Configure NAT and PAT (Port Address Translation)
Once routing is turned on, we need to set up Network Address translation and Port Address Translation. This needs to be done for two reasons.
- My lab networks need outside access to the Internet and they have private IP addresses.
- My server has a single IP address in the DMZ, which needs to serve as the gateway IP for multiple internal IP’s and TCP/UDP ports. As an example, I want all traffic arriving on 192.168.9.25, TCP port 8080 to be forwarded to the internal IP 10.10.8.51 port 80. And more specifically, here’s what I want available to the outside world …
- 192.168.9.25:8080 –> 10.10.7.51:80
- 192.168.9.25:8181 –> 10.10.7.51:443
- 192.168.9.25:8282 –> 10.10.7.50:80
- 192.168.9.25:8383 –> 10.10.7.50:443
OK, so how do we do this? We need configure iptables. An iptables tutorial is out of scope for this post, but if you’d like to learn more about Linux IP tables, I personally like this one: http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html.
To set up iptables, I’ve created a file called fw_rules in /usr/local/bin and made it executable (chmod +x /usr/local/bin/fw_rules). Here is what the file looks like.
root@cincylab-rtr1:/usr/local/bin# cat fw_rules
#!/bin/bash
iptables -t nat -F
iptables -t filter -Fiptables -t nat -A PREROUTING -p tcp -i vlan192 -d 192.168.9.25 –dport 8080 -j DNAT –to 10.10.7.51:80
iptables -t nat -A PREROUTING -p tcp -i vlan192 -d 192.168.9.25 –dport 8181 -j DNAT –to 10.10.7.51:443
iptables -t nat -A PREROUTING -p tcp -i vlan192 -d 192.168.9.25 –dport 8282 -j DNAT –to 10.10.7.50:80
iptables -t nat -A PREROUTING -p tcp -i vlan192 -d 192.168.9.25 –dport 8383 -j DNAT –to 10.10.7.50:443
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD ACCEPTroot@cincylab-rtr1:/usr/local/bin#
To make these changes persistent across reboots, you’ll need to add /usr/local/bin/fw_rules to your /etc/rc.local file.
Now, for all you linux experts out there looking at this file, you’re probably saying “uh, that’s a pretty insecure firewall you got there!.” And you’d be right
Remember, this is merely an internal firewall/router which is protected by a much more secure, Internet facing, Cisco ASA (thanks again to the local Cisco team!!). It’s also this Cisco that forwards outside connections on specific ports (not 8080, 8181, and 8282, for additional security) to IP 192.168.9.25. And because of this, my goal for this server isn’t to protect, but to separate my lab networks from my home network, and proxy the connections between them.
What’s Next?
We’ve configured our networks, turned on routing and configured NAT / PAT on our server. What next? Three things:
- Because my external IP is dynamic, we need to set up a script that will periodically check to see if our external IP has changed and, if so, update our dynamic DNS service.
- Configure DHCP and DNS.
- Set up external VPN access.
Step three is actually optional because when we’re done, we’ll be able to tunnel via SSL to our desktop. And from our desktop, we’ll have full access to the local LAN. But sometimes full remote access via VPN is nice without being forced to first “hop” to another desktop. So, I’ll include my VPN configuration as well.
But for now, it looks like I’m going to need have a part three of this “setting up the network and dedicated remote access” section, because I need to get on the road down to KY. But if you’re interested, look for part three later today. I’m almost done with it and will try to finish it during my lunch break.
The E.T.D.F. Series — Setting up the Network and Dedicated Remote Access (Part 1)
Mar 17th
Wow! I can’t believe it’s been almost two months since my last post! Sorry for my extended absence. I’ve been super busy with VMware events, customer presentations and meetings … oh yeah, and there was a nice ski trip to Vail too. Time flies when you’re having fun
Over the past few weeks, with the little spare time I had, I actually completed my conversion to a virtual desktop. So now, my corporate VMware desktop is 100% in a VM, always on and "lives" on the virtual infrastructure in my home lab. And with my shiny new AT&T 3G wireless laptop card, I can access it anytime, anywhere (though admittedly, this is a last resort).
You might have guessed by the title, for this post I’ll focus on my network setup. I stress the word “my” because when I first started to write this section almost a month ago, I had a lot of trouble trying to address all possible network configurations (or at least, a good majority of them). Finally I gave up, realizing this was an impossible task. There are just way too many options. So, I’m simply going to document my network. If you have VDI network configuration questions that aren’t answered in this section, email me directly (aaron at sweemer dot com) and I’ll be happy to help out.
I think the best place to start would be showing you a high level diagram of my network (click the graphic to see the full image).
As you’re reviewing the diagram, here are a couple things to keep in mind:
- All IP addresses have been changed and domain names have been removed for security purposes. Hostnames, however, remain unchanged.
- You do not need to have a similar setup. In fact, you can have as little as a single physical server with local storage. You might not be able to get the full benefits that a fully loaded virtual infrastructure can provide (e.g. VMotion, DRS, HA). But if you’re just looking to test out virtual desktops with VMware View, you can certainly go with a slimmed down environment.
- The configuration of the physical servers (cincylab-esx1, 2 and 3) as well as the iSCSI SAN (cincylab-ts1) will be addressed in the next section.
- The ISP router is a fairly unintelligent device which I’ve configured to simply forward all network traffic to cincylab-rtr1. As such, I won’t address the configuration here.
I love Visio diagrams, they make everything look so pretty and shiny! What does this actually look like? Here’s a photo of my lab …
Notice the PC on the right (cincylab-rtr1)? That’s an old Gateway I had lying around, which has a single 2.2GHz processor, 1Gig of RAM and a single 100Mbps NIC. I installed Ubuntu server 8.04.1 (kernel 2.6.24-19-server) on it and made it the gateway between my lab and the DMZ (aka, my home network). It’s on this PC that I route between VLANs, terminate external VPN connections and run my DHCP server. Additionally, it’s where I run scripts that continually scan for changes to my public IP address and when necessary, automatically updates my dynamic DNS provider.
Since this post is getting long, I decided to break this section into two parts. In part two, I’ll walk through the all the configurations of cincylab-rtr1 and cincylab-sw1. And before you say anything … no, it won’t be another two months before I post part two
VMware View Open Client
Feb 3rd
So…that crazy, proprietary company, VMware, today released the first open-source VDI client! (Just a small jab)
It’s actually a very exciting event in terms of the possibilities it opens up. Already out of the gates, VMware has announced in the press release a bunch of different partners that are leveraging this View Open client in their own solutions (ChipPC, Novell, HP, Sun…). http://vmware.com/company/news/releases/view_open_client.html
The new View Open Client includes all the major components needed for someone to take the software, adapt it to their needs and package up a rich, customized solution. This should really assist all the players in the eco-system to reduce their time to market on solutions. I’m hoping this results in some new and innovative ways to deliver virtual desktops!
Another great use case that I hope we soon see more of are commercially supported (by the vendor and VMware), turn-key solution for turning your fat PC into a dumb, highly managed “thin client’. There are some solutions out there today, but I would think that this new View Open Client would allow someone to put together a package to do this easily with out-of-the-box View integration. The great part is, that a solution someone in the eco-system puts together using the View Open Client can be submitted to VMware for formal certification and support!
If you have some good ideas on how to apply this, have at it: http://code.google.com/p/vmware-view-open-client/
The E.T.D.F. Series — Planning and Preparing the Environment
Feb 2nd
This is the first post in my e.t.d.f (eating the dog food) series. I had hoped to get this first one typed up quickly. But instead, my week was consumed with customer meetings and the logistics around rescheduling a big event I am putting on for the Commonwealth of Kentucky. (Thanks to a ton of snow and ice, we had to postpone it a few weeks.) So now that I’ve got a little free time again, let’s get started.
In case you’re just joining us, as a quick recap, this series will document my conversion to a virtual desktop. Meaning, when this series is over, I will no longer be tied to any physical laptop, PC, mobile phone or whatever. My dedicated VMware corporate desktop will live full-time on the virtual infrastructure in my house. I will then connect to my desktop remotely (whether I’m a few rooms away, or a few hundred miles away) via a VMware client or a web interface. Sounds easy, right? Well it really is, though we will have some challenges around multimedia, working offline, and accessing some local devices … all of which will be addressed as we progress.
But for now, first things first. I want to establish some requirements and goals.
- The desktop needs to be always on. When connecting to my desktop, I don’t want to wait for it to power on. I want to simply launch the client and connect.
- I want to be able to securely connect to it anytime, anywhere. This might sound obvious, but my home Internet connection has a dynamic IP address. How do I connect remotely when my IP address changes? And what about security? Will other people be able to access my desktop from the web too?
- My desktop has to be at least as performant as my current local desktop. The only exception I’ll make here is for high end mulitmedia.
- I want my desktop completely maintenance and worry free. To me, that means:
- My data is always backed up.
- My desktop can be destroyed by a hacker or virus (or my own stupidity) and restored to its previous state with little effort and under 30 min.
- Updating and patching my desktop has to be done automatically, or at least, a fairly painless process.
- I want to be able to carry my desktop on a USB stick or LiveCD. (If you don’t know what this means, I’ll be covering this in more detail when we discuss options for connecting to the desktop)
- Finally, I want this to be scalable. Keeping in mind that this series aimed to also serve as a loose guide to a Proof of Concept, I need to be able to add users and deploy desktops quickly and with minimal effort.
If at the end of this series I have met these goals, then I will consider my conversion a success and my desktop will permanently remain virtual.
So now let’s discuss what we’ll need to make this all a reality.
Server Requirements
VMware virtual desktops run on ESX, so ideally you would want at least one server that is currently on the HCL (Hardware Compatability List). If you have a server but can’t find it in the “Systems” section of the HCL, then search for the components of your server in “I/O Devices.” If your components are listed, there’s a good chance that ESX will run just fine.
If you don’t have a server and don’t have a big budget to buy a new one, then have a look at Mike D’s Building a $500 ESXi Host. Or another great resource is VM-Help.com, which maintains the Unofficial ESX Whitebox HCL. Keep in mind that anything not on the official HCL won’t be supported by VMware.
As for me, I have three servers in my lab, all of which are HP ML150’s with 8GB of RAM and 300GB of local storage. Each server is connected to a Buffalo TeraStation iSCSI SAN with close to 1TB of storage.
Network Requirements
At a bare minimum, we’ll need a dedicated Internet connection. Mine is a business grade, cable modem service provided by Cincinnati Bell with 5Mbps down, 1Mbps up, and a single dynamic external IP address. We will also need an internal DHCP server with a range of IP addresses set aside for our desktops. If you’re setting this up as a Proof of Concept for your company, you probably already have a solid Internet connection. So make sure you’ve got DHCP enabled with enough available IPs for the number of desktops you plan to deploy.
VMware Software
If you haven’t already done so, go sign up for the free 60 day evaluation of VMware View and download the software bundle. It will contain everything we’ll need from VMware for this project.
Desktop Operating System
My corporate desktop is Windows XP, so I’ll stick with that. Make sure you’ve got the proper Microsoft licenses secured before deploying desktops.
That’s about it for our planning session. Now for our homework assignment. In the next day or two, please be sure to do the following:
- Identify at least one server upon which VMware ESX can be installed. Two servers would be better, if possible.
- Make sure you’ve got an internal DHCP server set up.
- If you have a separte network team, try to secure a dedicated external IP address.
- Download the 60 day evaluation of VMware View.
- Download the VMware View Manager Administration Guide. It’s close to 200 pages long, so don’t worry about reading it now. And really, following this series will cover most of what’s in the guide anyway. But it’s nice to have handy as we move along.
On a final note, I’ll be making a separate page next to the “About the Author(s)” page at the top, for quicker access. See ya next time
Life Without VDI … Better Said by Rodos
Jan 21st
I got a comment on yesterday’s post from Rodney Haywood, a.k.a. Rodos, a fellow virtualization (or, as he would probably type it, virtualisation) blogger, that said …
Cool. Maybe you were inspired by my post http://rodos.haywood.org/2009/01/life-without-v…
Be great to hear about your progress and journey. It can be done. I miss my VDI!
Now, before I officially started the Eating the dog food series, I was going to type up a post on all the reasons why I want to run a virtual desktop in the first place (other than “practicing what I preach”). But after reading Rodos’ post last night, I realized I could save myself the time by just pointing everyone to his blog. He pretty much sums up everything I was going to say anyway
So check out his post Life without VDI sucks if you want to know why I’m eager to run a virtual desktop.
Rodos, great work and thanks for the comment. And where did you get that sticker?! I want one!!
Eating the Dog Food (my Conversion to a Dedicated Virtual Desktop)
Jan 20th
I’m a big believer in “practice what you preach” and I try to do my best to live by this motto. Now, let me be the first to say that I also believe that by being human, almost by definition, makes me a hypocrite and I am certainly not saying that I’ve never failed at this. All I’m saying is that I try my best.
All day long, as a VMware Systems Engineer, I spend my time evangelizing the wonderful things that virtualization and VMware software can do for companies. I can do this because I’ve been working with VMware software almost since VMware began. And I’ve helped implement virtual infrastructures for many different clients, long before actually being employed at VMware. I even helped build VDI’s (Virtual Desktop Infrastructures) before VMware had a VDI product offering.
VDI is really starting to take off this year and most of my conversations these days are about giving corporate users a virtual desktop. And while I’ve helped build VDI solutions before, am I actually using a virtual desktop myself? No! Well technically I do, given that I run my corporate destkop in VMware Workstation on top of Ubuntu Linux. But this is not the same solution I’m preaching to my customers. A virtual desktop running locally is a very different beast than running a virtual desktop remotely on VI3 via a desktop broker. Normally, I would be able to rationalize this and say “I’m not a corporation that has the virtual infrastructure to run a virtual destktop.” But this is no longer true. I have a dedicated Internet connection and at least three good servers always running in my lab.
So, I’m about to start practicing what I preach and “eating my own dog food.” I’m going to begin a series of blog posts that document my conversion to a dedicated virtual desktop. I hope that this can also serve as inspiration, and possibly even a guide to a proof of concept, for those who are interested in virtual desktops. I’m sure this blog series evolve as I progress, but I envision the upcoming posts will look something like this …
- Planning the environment
- Setting up the network and dedicated remote access
- Getting the virtual infrastructure set up correctly
- Setting up VMware View (the broker)
- Preparing the desktops
- ThinApp’ing my applications
- Troubleshooting, tweaking and optimizing
Again, as I progress, this could all change. But for now, this is the blog series I’ll begin in the next day or two and hope to complete over the next few weeks. I hope you join me. If you plan to follow along and, better yet, get involved, please sign up for a Disqus account. It’s the system I use for commenting and discussions.
By the way, do you know who originally coined the term “eating our own dog food?” VMware’s CEO, Paul Maritz. But he didn’t coin the term while on duty at VMware. From Wikipedia …
In 1988, Microsoft manager Paul Maritz sent Brian Valentine, test manager for Microsoft LAN Manager, an email titled “Eating our own Dogfood” challenging him to increase internal usage of the product; from there, the usage of the term spread through Microsoft, as chronicled in the book Inside Out: Microsoft—In Our Own Words (ISBN 0446527394)
The irony is so thick, you can cut it with a knife!!
How Much Storage Will You Save With View Composer?
Jan 5th
It depends
But to help you better guesstimate how much storage you’ll save with View Composer, let’s take a look at the actual storage savings in my home lab. Keep in mind that VMware View isn’t just something I’m playing around with. There are currenlty 5 other VMware Systems Engineers using my lab on a regular basis. And I use VMware View to give each lab user a dedicated, persistent desktop VM which they connect to remotely via the View Client. And from their dedicated lab desktop, they have full access to the lab environment I’ve built. So, while my home lab environment may be small and by no means a production enviornment, I’m still using VMware View as a “production” application, so to speak. It’s the one application in my lab that needs to be up, and it gets heavily used.
Let’s first look at how much storage my virtual desktop infrastructure would require without the use of View Composer. As I said, each lab user has a dedicated desktop, which has a 12G partition for OS and a 4G partition for user data. Also, each desktop has 1G of memory with zero memory reservation, which transltates into a 1G swap file. That’s a total of 17G per user. Right now there are 5 other remote users, plus I have a desktop for myself. And I have 2 desktops on standby for new users (so they don’t have to wait for a new VM to be built upon first login). So, that brings the total virtual desktops to 8. Therefore the total storage requirement for virtual desktops in my lab without View Composer would be 136G (17G * 8 desktops).
Now let’s look and see how much space is actually being used in my lab. Here’s a cut and paste showing the disk usage of the volume holding the desktop VMs …
[root@cincylab-esx1 cincylab-vol1]# du -sh *
3.1G labuser-01
2.9G labuser-02
3.6G labuser-03
2.6G labuser-04
3.1G labuser-05
1.9G labuser-06
1.5G labuser-07
1.5G labuser-08
2.0G replica-774c678b-e6b5-495a-b8ff-
448K source-lc-8ae5400e-4af3-4a09-8d8
13G parent_desktop
[root@cincylab-esx1 cincylab-vol1]#
The grand total here is 33.2G, which is about a 75% reduction in storage. Not bad. The storage reduction is achieved through two technologies, Linked Clones and Thin Disks.
Linked Clones
In my environment, the virtual disks for the desktops are located in the labuser-0* directories (this is done automatically for me during the deployment process). These virtual disks are not thick, monolithic disks like they used to be in the previous version. Rather, they are delta disks, which only store data differences between the desktop OS and the OS of the parent VM. In the cut and paste above, notice the 13G parent_desktop? That’s my starting point and contains my golden image. That direcotry also contains a snapshot, which I took when I was ready to being deploying desktops. The replica-774c678b-e6b5-495a-b8ff- VM is derived from this snapshot and ultimately serves as the parent VM (for now, this can change over time) of the labuser-0* desktops. Linked Clones have other benefits too, especially around patching and updateing. But that’s a topic for a later post.
Thin Disks
Remember how I said the users need a 17G? (12G for OS, 4G for user data and 1G for swap) But did you notice that the parent_desktop directory is only 13G in size (12G OS plus 1G swap)? From the administration guide “Thin provisioned disks (thin disks) are used by the linked clones to store user data, and are not linked to the Parent VM.” So I didn’t need to include the user partition in the parent VM. The user partition is handled for me when a desktop is deployed and included with each of the user desktops. User data disks are persistent and they are thin, meaning they occupy no more space than the data requires. In my environment, looking at the virtual disks for labuser-03:
[root@cincylab-esx1 labuser-03]# ls -lah
total 3.6G
drwxr-xr-x 1 root root 1.8K Dec 27 09:23 .
drwxr-xr-t 1 root root 3.7K Jan 5 06:10 ..
-rw——- 1 root root 1.0G Dec 27 09:23 labuser-03-a2263868.vswp
-rw——- 1 root root 8.5K Dec 27 09:23 labuser-03.nvram
-rw——- 1 root root 4.0G Jan 5 08:07 labuser-03-vdm-user-disk-D-flat.vmdk
-rw——- 1 root root 443 Dec 27 09:24 labuser-03-vdm-user-disk-D.vmdk
-rw——- 1 root root 75 Dec 27 09:21 labuser-03.vmsd
-rwxr-xr-x 1 root root 3.9K Dec 31 06:58 labuser-03.vmx
-rw——- 1 root root 265 Dec 31 06:58 labuser-03.vmxf
-rw——- 1 root root 2.5G Jan 5 08:07 replica-774c678b-e6b5-495a-b8ff–cl1-delta.vmdk
-rw——- 1 root root 379 Dec 27 09:24 replica-774c678b-e6b5-495a-b8ff–cl1.vmdk
-rw-r–r– 1 root root 62K Dec 27 09:21 vmware-1.log
-rw-r–r– 1 root root 36K Jan 5 06:21 vmware.log
[root@cincylab-esx1 labuser-03]#
Look at the size of labuser-03-vdm-user-disk-D-flat.vmdk, see how the file system “thinks” it’s 4.0G? It’s really not. A closer look at disk usage reaveals:
[root@cincylab-esx1 labuser-03]# du -sh *
1.0G labuser-03-a2263868.vswp
64K labuser-03.nvram
43M labuser-03-vdm-user-disk-D-flat.vmdk
64K labuser-03-vdm-user-disk-D.vmdk
64K labuser-03.vmsd
64K labuser-03.vmx
64K labuser-03.vmxf
2.6G replica-774c678b-e6b5-495a-b8ff–cl1-delta.vmdk
64K replica-774c678b-e6b5-495a-b8ff–cl1.vmdk
64K vmware-1.log
64K vmware.log
[root@cincylab-esx1 labuser-03]#
It’s actually only taking up 43M, not 4G. And a quick look inside the VM confirms it too “thinks” it has 4G:
So that’s my real world example of how much storage I’m saving with View Composer. How much will you save? Again, it depends
There are things that I haven’t discussed in this post (e.g. desktop refresh, desktop recomposition and desktop rebalance), which will also affect storage savings. Also, using ThinApp’d applications that live on a file share (as opposed to putting them in the OS) could have a big positive impact on storage savings. In my lab, with only linked clones and thin disks, I’m getting a 75% reduction. With a little more effort and planning on my part, I’m confident I could achieve 85% or better.
A New “View” of Virtual Desktop Computing
Dec 2nd
Today is a very exciting day for those working in and around desktop computing. VMware has released a major new version of it’s end-to-end virtualized desktop solution, View3 (yes that’s a new name. VDI as a product name has fallen to the way-side). I have had the privilege of working with the product since it’s early beta days and with some customers who had early beta access. I’ve been impressed with the amount of customer feedback that was incorporated into the product between beta cycles. It’s a real testament to VMware’s desktop solutions group’s willingness to listen and to truly mold this into something that customers not only want to use, but are already deploying. SO, congratulations to all those who worked so hard to get this product out the door!
Rather than just reprint the marketing press releases, I thought I would highlight some of the key new features of View3, give a short explanation, and add some initial thoughts. As the (borrowed) graphic below shows, “View3” really is the umbrella name that covers all the components of the total solution. View Manager 3 is the desktop broker that sets up and manages connections between end users and back-end desktop virtual machines. Let’s dig into some of these features.
- Unified Access — View Manager now brokers connections to physical PCs, terminal servers, and blade PCs in addition to virtual desktops hosted on VI3. This allows you to make the View client or web portal a true, one-stop-shop for user computing. For example, I have a customer that is a hospital that has blade pc’s in use for a very specific radiology application. Since users connect to the blade PC’s over RDP, their connections can now be seamlessly be brokered through the same interface as their virtual desktops. There is also an interesting application here for MS Terminal Servers as View now can not only broker connections to Terminal Servers, but also easily add a load balancing mechanism.
Below: A screenshot of the various choices you have for types of desktop connection you can create for brokering:
- Virtual Printing — Provides end users the ability to print to any local or network printer. Virtual Printing includes a universal print driver, compression for print jobs, and auto detection of local printers from the View Client. Printing has always been a thorn in the desktop administrator’s side. The issue is magnified when we are talking about hundreds or thousands of virtual desktops. How do we ensure that the printer driver the user needs for their local printer will be available on the desktop that they land on. Either I have to do that work ahead of time and pin a user to a desktop (not very flexible and a bunch of work), or I have to install all the possible drivers across all the desktops in the pool (scary!). VMware did a great thing here, in my opinion, they partnered with ThinPrint to license the best of breed solution on the market (again my opinion J). The universal printer driver is installed with the View agent on the virtual desktop side and with the View client on the client side so there’s no extra work for the administrator. It’s just there and it works! Oh, and it works VERY well! The universal print driver is smart enough to pick up many of the unique features of the user’s printer, supporting all the bell’s and whistles your user’s require. The last key feature of Virtual Printing is the incredible print job compression it provides. The universal driver does adaptive compression of the print job on the VM side for a much lower impact on the network for print jobs. This is very important for those deploying virtual desktops to remote locations or even home users. That said, ThinPrint still provides some fantastic add-on’s to this technology. It’s worth checking out their website for a full comparison of what they can do, in addition to the technology VMware licensed from them! http://dotprint.thinprint.com/euen/Features/tabid/93/language/en-US/Default.aspx
- Enhanced User Experience — Extends MMR (multi-media redirection) to all Win XP and Win XPe based clients. Provides increased support for critical codecs- MPEG1, MPEG2, MPEG4 part2, WMV 7/8/9, WMA, AC3, MP3. Provides granular policies for USB redirection. What can I say about multimedia over RDP? Well it usually sucks. With MMR, the world becomes a much brighter place for the modern desktop user trying to work over RDP. MMR makes the playback of all the codecs above extremely usable over RDP. I’ve even tested this over a WAN connection with some fairly high latency numbers. The content just took a little bit longer to queue up but then the playback was seamless. A key change here is that MMR is now available to all WinXP and WinXPe fat and thin clients. Before, it was limited to only WinXP devices and Wyse XP/XPe thin clients. In regards to USB redirection, it works great! View3 adds the ability to enable/disable USB redirection at the pool or even desktop level.
- Offline Desktop (Experimental) — Provides the flexibility to intelligently and securely move virtual desktops between the datacenter and local resources. Users can check out their virtual desktops onto physical clients, use the virtual desktop locally, and then check it back in. Offline Desktop is one of those new, game changing type of features everyone has been asking about for years. There always will be a segment of your user population that will need to be able to work in a mobile, disconnected fashion. Offline Desktop solves some problems for this user segment. With View3, the administrator can configure a desktop for a user and then the user can “check-out” their desktop. The desktop is then block-level streamed down to the endpoint and then can be run the encapsulated desktop locally….without a network connection. Obviously only applications that reside within the VM and local data will be accessible. But still, a user could be very productive offline. The beauty is, that the next time the View client is signed into and can connect back to corporate, it will allow a block-level sync of all changes back to the corporate datacenter. And what happens if your user looses their laptop or it is stolen? Not to fear, strong encryption is always applied. The VM can “self-destruct/mothball” itself after x days of not checking into the View Manager (the administrator can configure this), or it can even be remotely disabled if it’s still accessible.
- Fully Internationalized product
- View Composer is a new product fully integrated with View Manager 3. View Composer provides significant benefits to VDI solutions including:
· View Composer uses VMware Linked Clone technology to rapidly create desktop images that share virtual disks with a master image to conserve disk space and streamline management.
· User data and settings are separated from the desktop image, so they can be administered independently.
· All desktops that are linked to a master image can be patched or updated simply by updating the master image, without affecting users’ settings, data.
· This reduces storage needs and costs by up to 70% while simplifying desktop management.
View Composer is what I consider to be one of the most exciting new features of this release (even though it’s really a separate product). The storage cost associated with deploying virtual desktops has been up to now, one of the largest barriers of adoption. Many organizations I deal with loved VDI and what it represented in terms of data security and lowered management costs, but they just couldn’t get over putting all their desktop storage on expensive, SAN-based storage. That said, there have been a large number of customers who have moved forward with VDI because of all it’s great benefits. Many have leveraged features of their storage arrays to do things like thin provisioning, writable snap-shots, or even single instancing to significantly cut the storage costs. View Composer solves this problem for the rest of the world as it allows you to significantly reduce the amount of storage used by employing linked clones. Composer allows you to identify a “gold image” from which you desktop pool will be created. You then tell Composer what LUN’s to store the VM’s on and then the fun begins. Composer creates a replica on each of the LUN’s you provided and then there, the small linked clones are built. The provisioning is extremely fast and as you can imagine, highly space efficient. For a more detailed look at the guts, take a look at Rod Haywood’s excellent examination of the process: http://rodos.haywood.org/2008/12/storage-analysis-of-vmware-view.html
Composer isn’t just a storage savings tool. It’s also a game changer for desktop management. Now that you have all these linked clones for your desktop pool, you have the option to now manage the lifecycle of these desktops from the image. That’s in contrast to how thing normally work where once a desktop is created you have to continually patch it and upgrade it to maintain it (applications, windows updates, virus updates, and security updates). With the linked clones, we can now simply update the image at the top of the tree and re-home all the downstream desktops to the new version of the image. This is called a “Re-Compose” operation Think about the ramifications of that! You could roll out a new application to 1000’s of users with a few clicks, with a high degree of certainty by simply Re-Composing your users to a new version of the master image. Good stuff!! With the addition of the User Data Drive option which employs Windows Profile Folder Redirection technology, you can ensure that your user’s personal settings persist even after refreshing their desktop or even moving them to a completely new version of their desktop. Heck, you can even schedule a refresh of your user’s desktops every x days to ensure that your user’s never experience “Windows Rot” through the “Refresh” function. I could go on and on. I plan to do a follow-up post just on Composer but I hope this get’s your creative juices flowing in terms of the possibilities here!
There was a lot to cover here, but I think I covered most of the salient points. I hope you found it useful! I would encourage you to read more about it, play with it and try it out!
Here are some key links for the product:
Product Landing Page: http://www.vmware.com/products/view/
Release Notes: http://www.vmware.com/support/viewmanager/doc/releasenotes_viewmanager3.html
Documentation Page: http://www.vmware.com/support/pubs/view_pubs.html
Download Trial Link: https://www.vmware.com/tryvmware/?p=view&lp=1



