…No, I am not talking about the world-famous subway system in London, but rather like to pick up the topic by Dr. Philip Chase on the Physician’s view of an EMR. Dr. Chase describes how a recent visit to his physician revealed that the esteemed healthcare provider spent a lot of time typing Dr. Chase’s answers into an EMR application. The physician’s attention was divided between the patient and the computer system and the entire encounter had the appearance that the EMR itself interfered with the doctor – patient relationship; hence the “gap” between data acquisition and data entry.
Since there’s a lot of talk on EMR’s these days (one recent blog post describes the HITECH Anxiety), I figured it be a good time to reiterate some of the common sense EMR thoughts and best practices.
• Doctors don’t want to be IT admins. Correct. I don’t think they have to. Purely Internet-based EMR vendors use this tagline to entice providers to move all of their patient data to a hosting provider, but many physicians are more comfortable with on-premise solutions. Roughly 50% of office visits are delivered by 1-2 doctor practices. Like many other small business in all kinds of verticals, physicians can rely on other (often small) businesses in the IT / Computing world to setup a local system and support a locally running EMR. It’s “my computer guy” who takes care of installing, maintaining, patching, and backing up the systems in any small business, regardless of the industry. Action: Think about hosted vs. on-premise systems and pick the ones that you are most comfortable with.
• Usability is key. You don’t want your patients to stop seeing you, because the visits have become impersonal. Don’t focus more than 5-10% of your patient time looking at a computer screen. This will require discipline and some practice. Pick EMR software that lets you work from selection lists and templates rather than free text. Practice some typing (if that’s new to you) and have a vendor demonstrate the speed of documentation and order entry to you.
• Devices play a big role. Bigger than you think. Vendors bombard you with different options. Everything from regular office PCs, laptops, tablet PCs (including the Apple iPad), to computers on wheels (COWs) are options. Depending on your practice setup, one or more of these may fit. Here are some thoughts: Don’t set up your devices statically (that would require you to turn your back on the patient on occasion). If you go for wheeled devices, make sure they are not clumsy or blocking your space and movement in the practice. Ensure that wireless networks reach all your exam rooms and provide good signal strength. Consider a tablet device as you can carry it around. Be mindful of the device often occupying at least one of your hands that you won’t have avalailable to examine or treat the patient. Some devices with smaller form factors are said to fit in a lab coat. Try it before you buy! Consider the devices battery life and screen size. Action: Try the different devices in conjunction with the short list of EMRs you’re considering. Some vendors have specific user interfaces for mobile devices or iPads that improve usability when using a multi-touch interface.
• Multi-user environments pose special challenges. If you have more than 1 clinical user or running a group practice, consider the fact that physicians will physically move away from a device and into the hallway or next exam room. Unless you choose portable devices, consider fast log off and log on modalities and session roaming. The latter can be achieved through application and desktop virtualization, where your application executes centrally and the “terminals” in the exam rooms and hallways just provide interactive access to the application.
• Offsite usage. Nothing is more annoying than not having access to a system when you need it. Ensure that your system has secure offsite access built in. In most web-based EMRs , you should be covered. More elaborate systems may require app or desktop virtualization where the apps and data stay securely tucked away in the data center (or data closet, depending on your size) and allow your users to connect securely over the Internet to the user interfaces of the apps. Action: Discuss those options with your “computer guy” and your EMR vendor.
I plan on sharing more specific virtualization best practices with you in the upcoming weeks and months. Please let me know if there are specific topics you would like to hear about.
Florian
Twitter: @florianbecker
Ask the Architect – Everything Healthcare
Tech Target Blog – Virtualization Pulse
Computerworld posted an article titled E-Health and Web 2.0: The Doctor will tweet you now. The title made me cringe, to be honest. If any medical provider would communicate with a patient via facebook or twitter on patient related topics, we’d have an avalange of lawsuits on our hands. Thankfully, it is not that bad as the article cited above describes electronic communications between doctors and patients accurately. However, the slightly misleading title still leads me to believe that some clarification on web and social media is in place.
- Ever heard of email? It’s this killer app that spread from scientists to the rest of the world in the mid-to-late nineties. It’s not inherently secure, but there are systems that allow for secure communication and it is slowly being discovered by the healthcare world to allow patients and providers communicate with one another. Instant messaging also falls into this category and so is text messaging (txt is really a special form of telephony and we have been using that killer app for at least 50 years to communicate with our doctor). Sophisticated EMR vendors have implemented such capabilities into their systems. There are many, but Epic’s MyChart module comes to mind – for an idea on how it works, check out the various Group Health Seattle Ads: I actually only found a recent one here. Group Health Seattle implemented MyChart and secure patient to doctor communication in 2002/2003 – long before YouTube became mainstream, so I can’t find the original ads, which also shows you that this is nothing new. The key here is that patients and providers don’t use the “traditional” email systems that are often available for free by various providers on the Internet, but implement a system directly into the Electronic Medical Records app, which has the added benefit that the communication becomes part of the patient’s record.
- Twitter and facebook are still relatively new, and are certainly not intended for any kind of point to point communication, but rather for dissemination to larger groups or “Communities of followers”. Businesses (Joe’s Pizza as much as a doctor’s office, larger group practice, or large hospital) leverage twitter, facebook, MySpace, etc. to update their customers about things they deem important. Announcing new products or services, sending links of interest, or providing patient education on general topics are all things that lend themselves greatly to twitter and facebook. By the way, the same information can be effectively distributed via email lists, but twitter and facebook allow for customer controlled opt-in and opt-out. Both sides win – customers don’t get annoying unsolicited emails and business don’t have to manage email lists. Again, evem the direct message feature in twitter does not lend itself to securely communicate with patients, hence my introductory cringing at the beginning of this blog.
- Speaking of blogs….Blogs are also labeled “social media”. The idea is really nothing new. In the old days (by that, I mean the very old days in the mid 90s), we had to teach ourselves HTML, stand up a web site, and voila – we could get our thoughts and comments out on the web. In my mind, blogs are the great equalizer as they are very easy to use and provide the technical means to publish articles and opinions to the web (some are rants – actually, this blog could be described as a mild rant) . Blogs often allow for others to comment on the original article and that way get a nice discussion going. In healthcare, blogs play an important role as patients can discuss their own conditions with others (often anonymously by using screen names instead of their real names). This also allows for the sharing of information and the establishment of a support network. It’s the 2009 version of Fight Club without the hugging. Twitter and blogs often go together as bloggers leverage twitter to announce a new post to their community of followers. Healthcare providers can provide pro-active patient education via blog sites and use twitter to let their patients know that something noteworthy has been published.
So – none of these concepts are new or revolutionary in my mind. These are old technologies that either make the administration easier (blogs) or allow more user control when it comes to information blasts (twitter, facebook), or facilitate point to point communication (email, IM,txt). It goes without saying that both patients and providers must carefully consider their privacy (and the associated regulations) when using either of these media forms.
Thoughts? Comments? Please post them here.
Follow me on twitter: @florianbecker
Today I had the pleasure to meet and have lunch with Astronaut Steve Swanson along with a few Professors and students at FAU where he is an Alum. Steve was a great inspiration for the students and told some great Apollo 13 type stories as well as his thoughts on innovation in the Space program. I also got speak to Steve 1:1 about Astronauts using Virtual Desktops ( from Citrix XenDesktop ) in space and asked if he got to try it out. It turns out his last mission was March ’09 before the first NASA trial in Dec ’09, however he was well aware of this project from his colleagues who were involved and got to use it. Steve does not have a planned next mission at this point but he is looking forward to trying it out himself and I am looking forward to his feedback. Aside from the mission tasks what would they would be using it for, the answer ? Surf the Net ! ![]()
Turns out I saw the launch of the Shuttle he was flying last March..
Andy Winiarski and I are going to be at Synergy 2010 next month to deliver a talk on Windows 7 and how it ties into desktop virtualization. I am there from Product Marketing to provide some color on XenDesktop. Andy will be bringing a consultant’s perspective and will give us some straight talk about real world issues connected with managing both an OS migration and a new desktop infrastructure. We thought we should let you know what we are planning to talk about and encourage you to join us in San Francisco.
We can easily make the assumption that Windows 7 will be on at least some of your desktops within the next 2 years. Given that Windows XP survived so long as a common OS platform in most enterprises, and taking into account user pull for the new OS, analysts are expecting a rapid ramp up which will put stress on IT and its suppliers. Windows 7 was launched almost one-third of the way into the 4th quarter of 2009, yet Microsoft still sold over 60 million licenses.
The first Windows 7 desktop to hit the network will immediately kick off a corporate wide effort to ready users, support teams, and applications for the inevitable upgrade. With this in mind, there are concerns that come up whenever we consider a large technology migration that could affect the way that your company does business. The speed of migration and the availability of staff and budget to attend to it are major concerns. Even if you wanted to make the change in the short term, is it even feasible to expect such a rapid rollout? Data security continues to be a key issue. Bitlocker will help but data is still exposed sitting on potentially 1000s of endpoints both inside and outside of the office. Temporary productivity hits can be severe during OS upgrade – despite best planning, a key resource could be left high and dry due to DoA hardware failures or unforeseen app incompatibilities.
We think that it is an opportune time to consider alternatives to the normal refresh approach to try to avoid these potential migration issues. With large budgets to commit to, perhaps it really is time to renovate your desktop infrastructure. The desktop infrastructure of previous decades is no longer current. Old methods are starting to show their age. Tools that worked well 10 years ago are starting to break and it’s hard to find someone to fix them. And there are new desktop virtualization technologies that are more efficient and cost effective than the old approach to desktops. This is a chance to make an investment in your desktop delivery infrastructure, bringing it completely up to date, rather than keeping your desktop management and delivery methodologies firmly planted in the 1980′s.
We could go on and on concerning Win7 migration and virtual desktops and that’s exactly what we plan to do at our breakout session at Synergy 2010. Make sure that you mark this session on your calendar. You get two opportunities to attend. If you’re really keen, come to both sessions!
SYN330 – Move to Windows 7 the easy way with desktop virtualization
May 12, 03:30 PM
May 14, 01:00 PM
Click here to register today!
Ever use the XenDesktop Setup Wizard (XDSW) to create virtual machines on Hyper-V only to find that your attached virtual hard disk (VHD) was not copied over? This happens because the XDSW removes all attached disk drives before creating the new virtual machine when interfacing with Hyper-V. This behavior surprises XenServer users who are used to the XDSW cloning the VHDs that are included in the XenServer template.
The reason XDSW behaves this way is because it does not support System Center Virtual Machine Manager (SCVMM) templates at this time. Instead the wizard uses a “sample” virtual machine as a template. Since the machine is not a template, but rather a working guest, the tool chooses to remove any existing disks to avoid future issues.
Today’s script will help you remedy that situation by automating the copy and attachment of any VHD, to a set of virtual machines. This script is particularly useful when you plan to use the “Cache on device’s hard disk” option of Provisioning Server (PVS) with a standard-mode (read-only) vDisk.
Before executing the script, you will need to copy the VHD to the SCVMM library. If you are not sure how to accomplish that task, see step two of my blog Three Steps to a PXE-Free XenDesktop and place the VHD in the VHDs folder instead of in the ISOs folder.
The script should be run from the SCVMM server that manages the virtual machines that need the VHD. I also recommend running it from the PowerShell prompt within the SCVMM Admin Console, so the VMM PowerShell libraries are automatically loaded for you.
Usage: .\ copyvhd.ps1 UNC_VHD_Path Host_Storage_Location VM_Match_Criteria Prepend Append
Where:
- UNC_VHD_Path = The UNC File path to the SCVMM library that holds the VHD. The VHD must already exist in the SCVMM library and the script will copy the VHD from the library to the Hyper-V host.
- Host_Storage_Location = The path where the VHD will be copied to on the Hyper-V host. This path must be local (cannot be a UNC path) to the host.
- VM_Match_Criteria = Provides name matching criteria for selecting which VMs will be affected by the script. For example, providing a name match of “HVDesktop” will match any VM with “HVDesktop” in the name, including “HVDesktop1″ or “AHVDesktop”. To match a single VM, provide the full VM name as the match criteria.
- Prepend = Any text that should be added to the beginning of the VHD filename that will be used for the disk. The base name of the VHD will be the VM’s name. This text is optional; use a pair of double-quotes to pass a null string as the parameter.
- Append = Any text that should be added to the end of the VHD filename that will be used for the disk. The base name of the VHD will be the VM’s name. This text is optional; use a pair of double-quotes to pass a null string as the parameter.
Example: .\copyvhd.ps1 “\\SCVMM\MSSCVMMLibrary\VHDs\writecachebase.vhd” “E:\VMs” “HVDesktop1000″ “wc-” “”
The example above matches the VM with a name of HVDesktop1000 (assuming no other VMs contain those characters) and copies the writecachebase.vhd file from the SCVMM library to the E:\VMs folder on the Hyper-V host with a filename of wc-HVDesktop1000.vhd. The script then adds a disk drive at IDE Bus 0 Lun 0 to HVDesktop1000 VM settings and sets it to E:\VMs\wc-HVDesktop1000.vhd.
# Purpose: Copy and Attach VHD to a VM # Last Modified: 28 April 2010 # Author: Chris Gilbert & Paul Wilson (no implied or expressed warranties) # Usage: copyvhd.ps1 [UNC_Path_to_VHD] [Host_Storage_Location][VM_Name_Match_Criteria] # [Prepend_filename_text] [Append_filename_text] # Check to verify the arguments necessary for the script to run are provided. if ($args -eq $null -or $args.Count -lt 3) { write-output "Usage: copyvhd UNC_VHD_Path VM_Storage_Location VMNameMatches prepend_text append_text" write-output "Example: .\copyvhd.ps1 ""\\SCVMM\MSSCVMMLibrary\VHDs\writecachebase.vhd"" ""e:\vms XDesktop"" """" """" " exit 1 } # Assign command-line arguments to variables for later use $VdiskPath = $args[0] $ClusterStoragePath = $args[1] $VMNameMatches = $args[2] $PrependString = $args[3] $AppendString = $args[4] # Grab a handle to the local computer for the VMM Server interface $VMMServer = Get-VMMServer -Computername "localhost" # Grab a handle to the VHD specified on the command-line and exit if not found $BaseVdisk = Get-VirtualHardDisk -VMMServer $VMMServer | where { $_.Location -eq "$VdiskPath" } if ($BaseVdisk -eq $null) { write-output "Unable to find vdisk: $VdiskPath" exit 1 } # Get all the VMs that match the name criteria supplied $VMs = Get-VM | where { $_.Name -match "$VMNameMatches" } if ($VMs -eq $null) { write-output "No VMs match the pattern: $VMNameMatches" exit 1 } else { $matchedString = "{0} vms match the pattern: {1}" -f $VMs.Count, $VMNameMatches write-output $matchedString } # The loop below does the following for each VM matched # 1. Looks for Virtual Disk Drives already attached # 2. Generates a filename to be used for the new VHD # 3. Attempts to copy the template VHD from the library and attach # it at IDE Bus 0, LUN 0 # 4. Outputs either a "Success" or "Disk Already Attached" message foreach ($vm in $VMS) { $current_disks = get-VirtualDiskDrive -VM $VM if ($current_disks -eq $null -or $current_disks.count -eq 0) { $filename = "{0}{1}{2}.vhd" -f "$PrependString", $VM.name, "$AppendString" $cloningMessage = "Attaching {0} to VM {1}" -f $filename, $VM.Name write-output $cloningMessage $newvhd = New-VirtualDiskDrive -VM $VM -VirtualHardDisk $BaseVdisk -Path "$ClusterStoragePath\$VM" -Filename "$filename" -IDE -Bus 0 -LUN 0 } else { $diskattachedmessage = "{0} {1}" -f $VM.Name, "has disk already attached" write-output $diskattachedmessage } }
If you found this information useful and would like to be notified of future blog posts, please follow me on Twitter @pwilson98 or visit my XenDesktop on Microsoft website.
You heard about desktop virtualization and VDI; your organization got excited and maybe is considering it now for its own IT. Now you are confronted with all your organizations requirements – business as well as technical. The logical question is, where to start and how to design a XenDesktop architecture that meets these requirements.
Typically, you start researching for information that reflects your situation or maybe even try to reach out to friends and your business network for customer references. Once you found a starting point, I am sure more questions will come up such as:
- Do I only need VDI? Or should I consider different desktop deliveries from the FlexCast options?
- How should I integrate and deliver my apps? Installed? Streamed? Or hosted?
- How do I ensure performance? What do I need to consider for scaling the environment?
- How can I preserve the user settings and make the transition as smooth as possible?
- Do I need to deliver the virtual desktops to remote users?
- How did others implement XenDesktop?
- …
I could go on with the questions, but I want to keep it short since I would like to see these questions being raised at the Hands-on Learning Lab Workshop “SYN418W – Designing a XenDesktop architecture” during Synergy. Why? This workshop will provide exactly this platform for discussion. I mentioned hands-on, but it is more a “hands-off” workshop, where you will have the opportunity to work with peers on a given fictitious customer scenario having the same questions or even the answers to your questions. The workshop will be guided by our most experienced architects, who already worked on several customer projects designing and implementing XenDesktop.
I am looking forward to see you there and hope to answer all your questions!
Tarkan
Senior Architect, Worldwide Technical Readiness
Follow me on twitter: @TarkanK
Under the much debated HITECH legislation in the American Recovery and Reinvestment Act of 2009, HIPAA covered entities and their business associates must notify patients and in some cases the secretary of Health and Human Services of privacy breaches pertaining to identifiable patient records. I have written previously about the distinction between privacy and security breaches, and I am going to focus on the security breach aspect today.
In the language, the secretary of HHS is required to specify technologies and methodologies that would render protected health information unusable, unreadable, or indecipherable to unauthorized individuals. If covered entities and their business associates apply such technologies and methodologies, they will not be required to provide notice of the breach as otherwise required by the act.
HHS specified that the “unusable, unreadable, indecipherable” test has been met if the breached data has been encrypted and the security of the key has not been compromised. HHS also specifies that the encryption must also comply with the HIPAA security rule’s provisions. To make things easier on us, HHS actually gives two examples of encryption that meets the standard:
- For data at rest, encryption consistent with NIST Publication 800-111
- For data in transit, encryption complying with Federal Information Processing Standard (FIPS) 140-2
One way of securing data in a NIST 800-111 consistent way is the use of disk encryption. Microsoft’s BitLocker is available with certain editions of Windows 7, Windows Server 2008, and Windows Vista and is also FIPS 140-2 validated, so is McAffee’s SafeBoot and there are many others available as well. It may be cumbersome for healthcare CIOs to have all their applications tested in a disk encrypted environment on the endpoints and the transition may take some time.
FIPS 140-2 includes several layers of security and HITECH/HIPAA does not seem to specify which one the government would deem appropriate to grant the reporting exception. I am certainly thinking about this topic from a virtualization perspective, where the data would never leave the datacenter. Applications or entire desktops would execute securely inside the datacenter and be accessed by end users over a high performance delivery protocol that provides a great user experience. This is already done widely for clinical apps in the healthcare space and providing FIPS 140-2 compliant remote access is a problem that has been solved. However, I am wondering what would need to happen inside the datacenter? I have my thoughts on this topic but I am curious to hear from you.
What do you anticipate the internal or external auditing procedures to be?
- Remote access only?
- FIPS 140-2 for all server to server communication inside the datacenter?
- FIPS 140-2 even for server to storage communication for medical apps?
Please comment directly on these pages.
Florian
Twitter: @florianbecker
Ask the Architect: Everything Healthcare
Tech Target Blog: Virtualization Pulse
A long time ago, in a blog far, far away, I asked a simple question “What virtual desktop design topics are you interested in?” Thankfully, I got a few comments from Steven Hunt, Faisal Iqbal, and Tyrone Thomas so I won’t be forced to deliver a standard, glossy marketing presentation.
Instead, those of you attending the “Designing an enterprise-class XenDesktop solution“, which will be presented by myself and Doug Demskis, will get to experience a low gloss, high value session. Doug and I have gathered mountains of feedback from our Citrix consultants and tried to condense it into 90 minutes, which in itself is no small feat because we all know how much consultants like to talk.
A few of the items we plan to cover are
- Why change XenServer’s Dom0 RAM allocation
- Recommended specs for a VMware configuration
- Sizing guidelines for Hyper-V
- What types of disks to use
- How to calculate your IOPS requirements
- Recommendations on how to manage your desktop images
- Estimating the size of your write cache
- How to determine your Provisioning services recommended specs
This is only a portion of what you will learn in the Synergy session. Doug and I have been digging deep into the inner workings to provide you with the best practices for your XenDesktop environment. Hope to see you there.
Daniel
Lead Architect – Worldwide Consulting Solutions
Follow Me on twitter: @djfeller
My Blog: Virtualize My Desktop
Questions, then email Ask The Architect
Facebook Fan Page: Ask The Architect
I ran into an interesting situation last week while working with Tony Sanchez from our Global Microsoft Team. He was setting up XenDesktop 4 on Hyper-V 2008 R2. However, the lab he was at used a Windows Deployment Server (WDS) for image management and it relies extensively on PXE. Rather than modify the WDS to support the Provisioning Services PXE boot file, we decided the best solution was to make a boot ISO that will load the OS directly from the Provisioning Services host and then boot the guests from that ISO.
Background
Since not all my readers are familiar with using the Boot Device Manager, I will set the stage. When configuring a virtual machine to boot off of a CD-ROM image for PVS, you need to do three things:
- Add a Legacy network card on the host since the Synthetic network adapter is not created until the Operating System loads.
- Configure the BIOS boot order so that CD-ROM is first in the list.
- Assign a bootable ISO image to the CD-ROM/DVD drive.
| Take Note The PXE boot option is required in order for the NIC Option ROM to stay resident in memory during the pre-boot process. This way, UNDI will be available to the boot device to properly initialize the NIC. Otherwise, the “API not found” message would be displayed by the boot device. |
In deployments of XenDesktop where you have more than about 15 machines, the XenDesktop Setup Wizard (XDSW) is normally used to create and link the XenDesktops with Hyper-V. Unfortunately, the XDSW does not support all the possible VM configuration options when duplicating the source virtual machine. One of the properties that is not transferred to the new virtual machine is the ISO in the DVD drive. Normally, this behavior is the preferred because Hyper-V needs a special configuration to support sharing an ISO across multiple guests simultaneously (See this Technet article), which if not configured correctly can cause startup issues.
If you do not want to configure ISO sharing, you can use the VMM server and VMM library to copy the boot ISO to each virtual machine’s folder. If the ISO was large, I would say spend time setting up the sharing configuration; however, in this case the file itself is only 300K and copying it will eliminate the possibility of file sharing/locking issues.
Now you understand some of the challenges, I can tell you the three steps to a PXE-free Hyper-V deployment.:
- Create a PVS Boot ISO using the Boot Device Manager
- Import that PVS Boot ISO into the VMM Library
- Execute a PowerShell script
Step 1: Create a PVS Boot ISO
The Provisioning Services Boot Device Manager is a three-dialog wizard that lets you pre-configure the boot environment just like a PXE server would, except you can then write that to a drive or CD-ROM media. The Boot Device Manager is found on the Start menu of any provisioning server at All Programs >> Citrix >> Provisioning Services >> Provisioning Services Boot Device Manager.
I do not want to spend a lot of time discussing the various options or provide a tutorial on this utility; however, I will provide a few pointers. First, be sure to enable the “Citrix PVS Two-Stage Boot Service” and set it to start automatically on any servers you will use as the targets for the ISO image. Second, if you are using Windows 7, be sure to enable the PAE Mode on the second page of the wizard, like this:

Third, be sure to select Citrix ISO Recorder as the boot device (shown below) before burning the ISO image, lest you accidentally wipe out your local hard disk. For a complete guide on using the Boot Disk Manager, see this Citrix Support Article CTX121331.

Step 2: Import the ISO into the SCVMM Library
Take the ISO you created in Step 1 and save it to the folder where the SCVMM library stores are located. I created a new folder called ISOs at the same level as VHDs and placed the ISO in that folder. Next start the SCVMM Administrative Console and go to the Library tab. Select the MSSCVMMLibrary node and click Refresh on the context-menu to add the ISOs to the library as shown here:

Step 3: Execute the PowerShell Script
Next, you can copy the contents of the PowerShell script below and save it to a file called AttachISO.PS1. I realize that I am not yet a PowerShell guru, so I am aware that several optimizations and error checks could be made to this script. Feel free to modify it for your own use. My goal was provide a working example to help with this issue. The PowerShell script below does the following:
- Sets the boot order to CD, PXE (Legacy NIC), IDE, Floppy
- Copies the ISO image from the library to the VM’s folder
- Creates a DVD drive object at the IDE bus 1:0 if no DVD drive is found
- Removes any existing ISO and sets the ISO image to the one specified on the command-line
- For larger environments, it lets you know how many VMs it has left to process
# Purpose: Attach ISO image from VMM Server Library to Guest Virtual Machine # Date Written: 12 April 2010 # Author: Paul Wilson (no implied or expressed warranties) # Usage: AttachISO [UNC Path to ISO in Library] [VM Name to Match Criteria] # Check for the two required arguments and offer command-line assistance if not found if ($args -eq $null -or $args.Count -lt 2) { write-output "Usage: AttachISO.ps1 UNC_fileName_ISO_File VMNameMatches" write-output "Example: .\AttachISO.ps1 ""\\SCVMM\MSSCVMMLibrary\ISOs\pvbt.iso"" ""Desktop"" " exit 1 } # Grab the arguments and store them for later use $ISOPath = $args[0] $VMNameMatches = $args[1] # Get the name of the SCVMM server we are running this on. # The VMM server could be passed as a parameter as well. $VMMServer = Get-VMMServer -Computername "localhost" # Get the ISO image reference object using the ISO path provided earlier. # Using the full path guarantees the right object is found. $ISOImage = Get-ISO -VMMServer $VMMServer | where { $_.SharePath -eq "$ISOPath" } if ($ISOImage -eq $null) { write-output "Unable to find ISO: $ISOPath" exit 1 } # Get the collection of VMs that match the name parameters supplied and output that information $VMs = Get-VM | where { $_.Name -match "$VMNameMatches" } if ($VMs -eq $null) { write-output "No VMs match the pattern: $VMNameMatches" exit 1 } else { $LeftToGo = $VMs.Count if ($LeftToGo -eq $null) { $matchString = "Only one VM matched the pattern: {0}" -f $VMNameMatches $LeftToGo = 1 } else { $matchString = "{0} VMs match the pattern: {1}" -f $VMs.Count, $VMNameMatches } write-output $matchString } # This loop goes through each VM found and does the following: # 1. Sets the boot order to CD, PXE Nic, IDE, Floppy. # 2. Gets the DVD/CD drive object. # 3. The script will copy the ISO image from the library to the VM's folder. # The copy is part of the Set-VirtualDVDDrive and New-VirtualDVDDrive cmdlets. # 4. Creates the DVD drive object if none found and sets it to the ISO. # 5. Removes any existing ISO and sets the ISO image to the one specified. # 6. Outputs the number of VMs remaining to process. Added for large deployments. foreach ($VM in $VMS) { $LeftToGo = $LeftToGo - 1 Set-VM -VM $VM -BootOrder CD,PXEBoot,IDEHardDrive,Floppy $current_dvd = get-VirtualDVDDrive -VM $VM if ($current_dvd -eq $null -or $current_dvd.count -eq 0) { $newDVD = New-VirtualDVDDrive -VM $VM -Bus 1 -LUN 0 -ISO $ISOImage $DVDResultMessage = "Created DVD Drive on {0}. {1} VMs left to go." -f $VM.Name, $LeftToGo } else { if ($current_dvd.Connection -ne "None") { set-VirtualDVDDrive -VirtualDVDDrive $current_dvd -noMedia set-VirtualDVDDrive -VirtualDVDDrive $current_dvd -ISO $ISOImage $DVDResultMessage = "Replaced existing media in DVD Drive on {0}. {1} VMs left to go." -f $VM.Name, $LeftToGo } else { set-VirtualDVDDrive -VirtualDVDDrive $current_dvd -ISO $ISOImage $DVDResultMessage = "Successfully attached ISO to the DVD Drive of {0}. {1} VMs left to go." -f $VM.Name, $LeftToGo } } write-output $DVDResultMessage }
Feel free to add a comment below if you have questions or optimizations that others could benefit from. If you found this information useful and would like to be notified of future blog posts, please follow me on Twitter @pwilson98 or visit my XenDesktop on Microsoft website.
Fill in the blank if you will. There are many people who are super excited about the upcoming release of the latest tablet PCs (iPad, Slate, etc). I recently received a comment from someone on Facebook related to a previous blog saying that the iPad Will Not Replace Your Desktop. The comment basically said
Does the iPad and like devices need to be fully functional to be successful? How many people have more than one mobile device like a laptop and a netbook?”
That is an interesting question. But I’m starting to wonder if we need a laptop and an iPad? Do we need a laptop and a netbook? Depending on what you do, the iPad or the netbook could potentially replace your laptop. As I see it, most users have a smartphone and a main work computer, for many that is a laptop because they require a larger form factor device while not in their office. But what if we did the following:
• Main computer: Thin client
• Mobile computer: iPad/Netbook
• Ultra-mobile computer: Smartphone
If we have Citrix Receiver on all of these devices, we access the same applications/data/environment.
Think about all of the problems we hear about with laptops: stolen, dropped, lost, expensive, etc. If we went down the virtual desktop route, stolen, broken or lost laptops would not be a problem because your data would be in the data center with your virtual desktop. So why use a laptop?
Is it possible that tablets and netbooks could mean that those of us with laptops can toss them away? If the tablets/netbooks provides us with a connection to a virtual desktop from anywhere, why would we need the laptop functionality?
Of course this won’t work for everyone. Some people will need a laptop. But what we will see in the coming months/years is a much more diverse end point environment. We know this is coming, so it is good idea to start planning how you will integrate all of these endpoints into your infrastructure while still trying to keep the environments secure.
Daniel
Lead Architect – Worldwide Consulting Solutions
Follow Me on twitter: @djfeller
Blog for Next-Gen Desktop: Ask The Architect
Questions, then email Ask The Architect
Facebook Fan Page: Ask The Architect



