I just wanted to post a quick note to all of you that I haven’t given up on the podcasts or anything like that.
I’ve been extraordinarily busy over the last few weeks – and the next few weeks are going to be just as busy. As such, I haven’t had time to record any new podcasts, and I’m not sure when I’ll be able to get another one out.
I think, if I have a free afternoon one of these days, I’ll record something quick and forego the editing that I normally do. It might be pretty rough, but at least I’ll get something out for you to (hopefully) enjoy.
Thanks!
mk
Of course you do. And in this episode of the Virtualization Nation Podcast, I’ll show you how.
But first, a little background.
Earlier today, I posted a description of the new Native VHD integration in Windows 7, Windows Server 2008 R2, and Microsoft Hyper-V Server 2008 R2 on the Windows Virtualization Team blog, along with a link to a nifty little Powershell script called Install-WindowsImage.ps1 which I’ll talk about some other time. The main point of that post was to start getting the word out about Native VHD Boot.
So, what’s so special about this?
Well, put yourself in the shoes of a corporate network administrator (though, when I was a network admin, I didn’t wear shoes all that often). It’s really very common for a company to have a “base” Operating System image that they can apply to a server or workstation. This image is usually tweaked with some software and/or patches installed, or is specially configured in some other way.
If that’s the case, it’s possible that you would need to maintain two (or more) images: one for virtual machines (probably a VHD), and one for physical machines (maybe a WIM or a Ghost file).
With Native VHD Boot, you can finally have one, single base image that works everywhere. Your VHD can be booted in virtual machines, just like it always did, and it can also be used to boot your physical servers.
Ok, let’s get right to the heart of this thing.
To boot from a VHD, you need the following things:
- A physical machine with the Windows 7 boot loader on it.
- A VHD with a SKU of Windows Server 2008 R2, Windows 7 (Enterprise and Ultimate only – sorry), or Microsoft Hyper-V Server 2008 R2.
Now, you’ve got those things ready, right? You’re all set? You’ve read the VHD FAQ? Cool.
Ok. You can find instructions on how to configure your computer on various web pages and videos, but they all seem pretty lengthy.
Want something simple? Something easy to remember?
Of course you do.
You can watch me run through the steps in the video below, or download it here.
For those of you who don’t want to download a video for a “simple” command, here are the Cliff’s Notes:
- Get to an elevated or WinPE command prompt.
- Use your favorite VHD-creation method to install Windows in a VHD.
- Use DiskPart or DiskMgmt.msc to attach your VHD as a drive on your computer, and give it a drive letter (V:\ for example).
- Run BCDBOOT.EXE V:\Windows
- Sit back, relax, and reboot your computer to start booting into your new OS.
Important Notes:
- If you’re booting to a Dynamically Expanding VHD, make sure that you have enough room on your physical disk to hold the VHD as if it were fully expanded to its maximum size. If you don’t have enough space, you’ll get a bugcheck during boot.
- Hibernation is disabled when booted to a VHD.
- You can’t boot to a VHD that lives on a network share or a removable storage device.
Some of you may remember that, a long while ago, I asked what sort of things you'd like to see in a Virtualization-themed podcast. Though it's been over a year since that post, I've still been thinking about starting a podcast and talking with other people on my team about getting one together. The reaction has been positive so far. There are quite a few folks who seem interested in putting something together.
However, we haven't gotten down to planning any of the solid details quite yet, so a regular podcast is still aways off. But there's really no reason why I have to wait for everyone else... and so, I give you the first episode of The Virtualization Nation Podcast. Episode 2.
Wait, what?
Well, since I promised all of you some more WIM2VHD videos, and since I'm nearly gotten the whole process down (I wound up buying Sony's Vegas Movie Studio Platinum, or whatever it's called... and it crashes a lot. Like, really a lot.), I deciced to start releasing them as video podcasts. As such, we're just going to call the first WIM2VHD video I made 'Episode 1', and go from there.
So there you have it: We're not ready to start doing this regularly yet, and the format is likely to change around a lot, and we don't have the whole XML feed thing set up quite yet... but the next episode is ready!
Click here to download the .WMV file.
That’s right, folks. In celebration of the release of the Windows 7/Server 2008 R2 Release Candidate, I’ve updated WIM2VHD with bugfixes and new features!
What’s new? BUGFIXES! All of the bugs (except for one) on the Code Gallery issue tracker have been fixed in this release, as well as bugs that we found during testing, or that were found by other Microsoft employees. The one issue that hasn’t been fixed yet came in too late to be included with our RC release, but it’s being considered for our RTW.
There are some new features, too
- “Single Image Shortcut”
If you specify a .WIM file that only contains one image, that image is automatically selected for you. You don’t even need to use the /SKU switch – we’ll figure it out for you. (The side-effect here is that we’ll select that image even if you specify a different image. For example, if you have a .WIM that only has ULTIMATE in it, and you specify /SKU:SERVERSTANDARDCORE, we’re going to ignore your command and just install Ultimate.)
- /COPYLOCAL switch
Instead of installing the AIK on every computer you want to run WIM2VHD on, you can now install it once and then use the CopyLocal switch to create a folder that contains all of the files you need to run WIM2VHD. To do this, use the following command:
WIM2VHD.WSF /WIM:x:\sources\install.wim /COPYLOCAL:c:\wim2vhd
This will copy WIM2VHD and the required binaries to the folder c:\wim2vhd. Just run WIM2VHD from that folder, and you can move it anywhere.
- /SIGNDISK switch
You can now specify whether or not you want WIM2VHD to leave a signature file (<vhd>:\windows\wim2vhd.txt) on your VHD. By default, the value is TRUE, so the signature file will be created. You can change this by specifying /SIGNDISK:FALSE on your command line.
- /MERGEFOLDER switch
During VHD creation, you can point WIM2VHD to a folder and have its contents (not the folder itself) copied to the root folder of the VHD.
For example, let’s say that you have a folder structure like this:
C:\TestFolder\
\SubFolder1
\SubFolder2
\Something.DOCX
\UNATTEND.XML
If you want this structure copied into the VHD, you would add /MERGEFOLDER:C:\TestFolder to your command line. If you do that, the root folder of your VHD would look something like this:
VHD:\
\…
\Windows
\SubFolder1
\SubFolder2
\Something.DOCX
\UNATTEND.XML
\Program Files
\…
Please note: /MERGEFOLDER is the last thing that happens in the VHD creation process. If you have files in your folder structure that already exist on the VHD, they will be overwritten without warning.
Head on over to the WIM2VHD website to download your copy today. And make sure to get the RC release of the Windows 7 AIK!
So, I know that I've been promising everyone some new videos explaining some of WIM2VHD's features. And I really have been working on them. I have most of them captured, but editing them... is not going so well.
I've been using Windows Movie Maker on Windows Vista to make the first few videos, but the quality turns out to be pretty low, and it's hard to read the text on the screen because the of the bad quality.
So I have a question for you guys. What's a good video editing software package that's free or inexpensive, and can make high-quality WMV files?
The webbernetz are abuzz with news that a new version of Ubuntu has been released today. As such, I figured that I should post instructions on how to get it going under Hyper-V.
Now, I know that these steps are pretty complex, so I'll try to use as much detail as I can when writing them out.
Step 1. Download the ISO for Ubuntu.
Step 2. Create a VM and attach the ISO to it. Use a Legacy Network Adapter if you need network access.
Step 3. Turn the VM on.
Step 4. Follow the on-screen instructions.
That's it. It works right "out of the box", so to speak.
Enjoy!
Every now and then, I like to visit the WIM2VHD website and see how many people have downloaded it. Aside from the ego boost, it’s a nice little figure to pass on to my management so they can see that this project was worth the time that I’ve spent on it. But yeah, it’s mostly the ego boost :)
Last night, I decided to check the download count before I went to bed, and I saw something that made me very, very happy: at around 10:30 PM PDT last night, there were about 1030 downloads.
That’s right – over 1000 downloads in about 45 days. Now, when compared to other projects – like Hyper-V – 1000 downloads in a month and a half is not earth shattering. But Hyper-V had marketing behind it. People knew that Hyper-V was coming – it was demoed at conferences and by news outlets. WIM2VHD was a surprise (and I hope it was a pleasant one).
It’s very humbling to know that something I’ve been working on is useful to you, and is (hopefully) helping you use Windows and virtualization more efficiently.
So, to all of the people out there who have downloaded and used WIM2VHD; to all of the people who have blogged about it; tweeted about it, or told co-workers about it; and to everyone who joined the “Fans of WIM2VHD” group on Facebook:
Thank you!
So, seeing how many people have downloaded WIM2VHD – How are you guys using it? Are you just playing around with it, or has it actually helped you be more productive? I’d love to know, so if you don’t mind sharing your stories and experiences please leave a comment letting me know.
Again, thank you all very, very much.
This is a pretty common question on our internal mailing lists, and I’d imagine that it’s common outside of Microsoft as well, so I thought it would make a nice blog post (since I’m way behind on blogging…).
So, you have a VM that’s joined to a domain and working perfectly. You take a snapshot so you can restore to this magical point of workingness at any time, and life is good.
One day, you need to fire up this VM and test something, so you revert to your snapshot and start the VM. That’s when you’re told that the domain doesn’t trust your (virtual) workstation anymore. What the heck just happened? No changes were made to the snapshot! That’s why it’s called a snapshot! Why did this break?
Well, you’re right. No changes were made to snapshot, and that’s part of the problem.
It’s part of the default Active Directory domain policies for a domain member to change the password for it’s account every now and then. You’ve no doubt had to change the password for your User Account occasionally, so this shouldn’t be a surprise. What may be a surprise is that the same thing happens for Computer Accounts. That’s right – computers have accounts, too.
Every now and then (by default, it’s 30 days, but the value is configurable via domain policy), the workstation will negotiate a new password with the domain. It all happens behind the scenes, so you’d never know it. It just works.
Unless you, you know, have a domain-joined VM with snapshots.
The problem comes about because the workstation – at some point – negotiated a new password with the domain and recorded it for future use. Then the snapshot was applied, and you turned your VM into a time traveler. This VM from the past was brought into the future, and has no knowledge of anything that happened in the interim. So, it thinks that it’s old password is still good. And it tries to use that password. And the domain says “um, no”.
Well that’s stupid. Why does Hyper-V let this happen?
It’s not just Hyper-V. Many years ago, in my previous life as a network admin, this happened all the time to my VMWare images. The same thing will happen in any situation where you convince Windows that the computer account password is something that it’s not (like restoring a snapshot or any other kind of backup).
Fine. What can I do about this?
There are three possibilities that I’m aware of. If anyone has any other suggestions, please feel free to leave them in the comments.
- If you can, change the default domain policy, or get an exception created for your computer account(s).
This is not the best option because it opens up a security hole (small as it may be).
- Log into a local administrator account on the system and leave the domain. Then rejoin it. The computer account will get updated with a new password that your workstation knows. Alternately, you could use NETDOM.EXE to reset the computer account password.
You could even automate this if you need to.
- Sysprep the VM and create an unattend file that will configure it to your liking, and that will automatically join the domain for you. Once the machine is sysprep’d, make a snapshot and restore to that one from now on.
Hope that helps.
Hey everyone,
I’ve been working on putting together a new set of videos for WIM2VHD, but I’ve run into a bit of a problem.
I’m creating a video that goes through and explains the different command line options for WIM2VHD, but the end result, even after editing and re-encoding, is too large for me to upload to any of the video hosting providers that I want to use.
I could try to cut some more space out of the existing video, but it occurred to me that perhaps I should ask all of you what would work better for you.
Should I have one big video that explains all of the options, or should I have a very small video for each of the options?
Please leave a comment and let me know which you’d prefer.
Hi everyone,
I wanted to take a moment to thank everyone for the amazing response to WIM2VHD! We’ve had over 300 downloads since the script went live last week. It’s nice to know that some of you are finding this tool useful.
As you may have noticed, there’s a new release of WIM2VHD up on the Code Gallery. This is a small revision to the original release which fixes an issue that was preventing VHDs from being successfully created on x86 Windows builds. This is the only fix in the new release, so if you’re not experiencing this bug, you don’t need to download the new release.
Secondly, I just noticed that there is an omission from the documentation.
During VHD creation, WIM2VHD will leave a file on the VHD that contains the time and date of creation as well as the version information for the build of WIM2VHD that is running. The file is located at C:\WINDOWS\WIM2VHD.TXT. An example of the file’s contents is provided below:
Generated by WIM2VHD.WSF 6.1.7033.0 on 2/5/2009 at 14:50:5.719
You can delete this file if you want to. It’s just there so that you can see what version of the script created the disk, so in case there are any bugs in a particular version, you can easily determine which VHDs may need to be regenerated. The information is never transmitted anywhere – it stays on the VHD. In fact, WIM2VHD doesn’t ever transmit any information anywhere.
In future releases, there will be a command-line option to turn this off.
Again, thanks to everyone for the great support. The next WIM2VHD video will be up shortly, and there’s a “Fans of WIM2VHD” group on Facebook you can join if you’re interested.
Thanks,
mk
Update: The documentation for the new release has been updated to include this information.
The other day, Ben Armstrong posted the steps for installing Windows PowerShell on Hyper-V Server 2008 R2. How awesome is that? A real, modern, powerful shell on Hyper-V Server!
It should be noted that this also works on Windows Server 2008 R2 Core SKUs, so if you’re running Hyper-V on one of those, you can also use this trick.
So why is this cool?
Well, first of all, if you install PowerShell on a Server Core SKU, you can use a new and more powerful tool for installing and configuring server roles and features.
To do this, you need to load the Server Manager module into your shell with the following command:
Import-Module ServerManager
You can get a list of the new cmdlets that this module provides by running:
Get-Module ServerManager
So, if you’re on a Windows Server SKU, you can install all of your roles or features this way. To install Hyper-V, you would use this command:
Add-WindowsFeature Hyper-V
Ok, that’s cool and all, but it’s not that spectacular. So how about being able to actually interact with Hyper-V from this shell? Even on Server Core or Hyper-V Server 2008 R2?
Check out James O’Neill’s PSHyperV project over on CodePlex. If you download this library, you can interact with Hyper-V directly from your Core console.
The first thing to remember is that you need to dot-source the HyperV.ps1 script so that all of the functions remain in memory, like so:
. .\hyperv.ps1
After you do that, you’ll get a list of all of the new functions and filters that this library provides. Just as an example, you can create and configure a VM with these commands:
$vm = New-VM -name “MyVM”
Set-VMMemory -vm $vm -memory 2GB
Set-VMCPUCount -vm $vm -CPUCount 2
# some other logic to create a hard drive, or attach an existing one.
Start-VM -vm $vm -wait
It was my New Years Resolution that I’d do an average of 2 blog posts per week this year. So far, I haven’t been doing a very good job of that, but I think I have a good excuse. I’ve been very busy with preparing to release a new tool, and now, I can finally announce it.
Fine citizens of the Virtualization Nation: I present to you the Windows® Image to Virtual Hard Disk Converter, or WIM2VHD as I like to call it.
WIM2VHD is a tool that will create a bootable VHD from a specified Windows 7 or 2008 R2 WIM image (like the INSTALL.WIM file that ships on the installation DVDs) without having to run Windows Setup. That means that you can a Windows 7 or Windows Server 2008 R2 virtual machine up and running much, much faster.
You can use these VHDs in Virtual PC, Virtual Server, Hyper-V, and … some other things, too. We’ll talk more about that later.
You can get WIM2VHD here.
(The release candidate has been released, too...)
I’ve done my best at creating some good documentation for WIM2VHD, which is available from the link above. Please make sure that you read the docs. If you have any questions, feel free to start a discussion thread at the WIM2VHD site.
Here’s a video I made introducing WIM2VHD, and showing it in action. More are one the way.
Please be aware, however, that while the underlying process of creating the VHDs is supported by Microsoft, WIM2VHD is not.
Tim Sneath posted this last night, and I wanted to share it with all of you Windows 7 users out there.
Now, I’ve been using Windows 7 throughout the entire development process (since just after Vista RTM), and after reading through this list I actually came across some features that I didn’t know about previously.
I think my favorite features from that list are:
- Who Stole My Browser?
Being able see what plugins might be causing my browser to behave like a pouting three-year-old is fantastic. It’s easy to do over the phone, and – this is the part I like the best – it’s easy to teach.
- Installing from a USB Memory Stick
I just got an HP Mini 1000 netbook, and it runs 7 so amazingly smoothly. I’ve been installing it by using PXE boot from the Microsoft corporate network, but being able to install 7 from a USB key is equally as handy (especially since it would allow me to make customizations to the image before applying it. (You know how much I love the Windows AIK, right? There’s a new one specifically for Windows 7 over here.)
- Command Junkies Only
I admit it. I’m addicted to the command-line. It’s faster for me to type a command than do something in the GUI, especially with Powershell (got v2 CTP3 yet?) Being able to open a command prompt from any arbitrary window is an amazing time-saver.
What are your favorite Windows 7 tricks?
Ever wonder what a Microsoft ship party looks like?
If you take a stroll through Microsoft’s Redmond campus on Google Street View, you’ll get to see one. On the day that Google decided to drive through campus, we were celebrating the RTM of Hyper-V. It was a beautiful summer day, and we were out on the sports fields enjoying it.
View Larger Map
In fact, you can even see me (highlighted in a yellow halo of awesomeness):

Well, it looks like I was too slow in getting my posts written, because a bunch of people have beaten me to the punch.
Ben Armstrong – also known as the Virtual PC Guy – wrote a post about getting Windows 7 working on Hyper-V.
Similarly, Brian Keller posted about getting Windows 7 running under Virtual PC 2007 SP1.
Oh well, I guess I’ll just have to be faster next time.