Looks like Mark Russinovich and Bryce Cogswell are up to their old tricks again, with an awesome new tool called Disk2VHD.
From the web site:
Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).
Disk2VHD can run on Windows XP SP2 and higher, as well as Windows Server 2003 and higher.
Awesome work, Mark and Bryce!
I’ve seen quite a few posts about this problem lately - both in public, and on internal Microsoft mailing lists - so I thought it might be best to write up a quick blog about it.
This is one of those cool little problems that you can debug with almost no information, so you’ll look like a genius (or a witch, I suppose…) when you come up with the solution.
So, here’s the problem: A user tries to boot up a Win7 or Win2k8R2 VHD (or even sometimes a Win2k8 VHD) in Hyper-V, the VM just sits there at the boot up screen forever, refusing to boot to the desktop.
Now, that may not sound like a lot of information – and it’s not – but that’s almost everything you need to diagnose and fix the issue. There’s one more piece of information that you’ll need, and luckily, you’ll usually get it. Almost every time I’ve seen someone ask a question about this issue, they have included a screenshot of VMConnect showing the VM doing nothing.
You might laugh at that – I mean, it’s not often that a screenshot of “nothing happening” will give you all of the information you need to solve a problem, right? In this case, though, it does.
Here’s a sample screenshot that I took:
It’s too small to see at this size, so I’ll zoom in on the important part – the upper-left corner:
See it yet? If not, channel Dr. House and think about what you’re seeing… Those icons look kind of… unfinished – don’t they?
Good catch. Those are the icons from the beta release of Hyper-V, which means that the parent partition was never upgraded to RTM.
Here are the icons from the RTM and R2 release:
The fix?
Update the parent partition with KB950050, or with SP2. Keep in mind, though, that you’ll need to re-create all of your VM configurations (you can keep the VHDs around – just attach them to the new VM) after you apply the update, and you’ll lose any save-states or snapshots.
I have to admit, I really don’t quite get Twitter.
My first experience with it probably wasn’t the best one.
It was with Twinkle on my iPhone, which – if you don’t know – will not only show you the people you’re following, but will also show you tweets from people who are around you. I live in downtown Seattle – the tweets I was seeing weren’t exactly what I would call… “interesting.” It was like a Seinfeld episode, but with younger people and more swearing - lots of teenagers with lots to say, but with nothing to talk about. :)
But, I’m willing to give this whole Twitter thing a shot, in the context of a work-related experiment. I’m not good at blogging very frequently, as you may have noticed. I usually have something to say, but not something substantial enough to warrant a whole blog post. Maybe Twitter’s “Micro-blogging” concept is the right thing for me to do. We’ll see, I guess.
So, if you’re up for experimenting with me:
(Thanks to Thoburn Design & Illustration for the free Twitter icons!)
I’m between video games right now, so I thought that I’d take a look at what’s available in the Xbox Live Arcade. There was one game that caught my eye, simply because of the name. As you may have guessed from the title of this post, that game is ‘Splosion Man.
Ladies and gentlemen – let me be clear: If you have not yet played this game, stop doing whatever you’re doing and go play the demo. All the way through. I’ll wait.
Done yet? Ok, now buy the game and play the rest of it. Seriously.
This is one of the best games I’ve played in the last 5 years – and I’m completely serious about that. For me, this game is right up there with Portal, with the wonderfully odd plot and the amazingly quirky music.
What a fantastic game!
Back in 2006, I posted an article about how to get Glass running in a VM.
The trick was to use Remote Desktop on a Glass-enabled machine to TS into a VM which is running the same OS. If the build of the OS on your workstation is different than the one in the VM, Glass won’t work.
With the release of the Windows Virtual PC for Windows 7 Release Candidate, this subject has come up again in a post from the RedmondPie.com folks. They noticed that if you enable the Integration Services in a Windows 7 VM, you’ll get Aero Glass!
This may be news, but it’s actually the same ol’ story. The reason that enabling Integration Services gives you Aero Glass is because it uses Remote Desktop technology to show you the video from the Virtual Machine. That also helps to explain why installing Vista (or a build of 7 that is different than the one on the host) doesn’t give you Glass.
Now, you might be asking yourself why – if this is true – do you not get Glass in Hyper-V while using VMConnect? After all, VMConnect uses Remote Desktop technology to show you the VM Video, too.
To explain this, I asked Ben Armstrong what was going on, just to make sure that I understood it correctly (for the record, I didn’t). Ben thought deeply for a second, and knew that the best way to explain this to me was to draw pretty pictures on my whiteboard. I’ve tried to reproduce them below1:
| Windows Virtual PC | Hyper-V |
 | |
In the illustrations above, you can see that the architecture is somewhat similar between Windows Virtual PC and Hyper-V (with respect to video, anyway). In both cases, an application that uses the RDP ActiveX control (MSTSCAX.DLL), like VMWindow.exe or VMConnect.exe, for video remoting hooks into a process which hosts the RDP encoder. If no integration components are installed in the guest OS, video is handled by our emulated S3 video adapter, which gets passed back through to VMWindow or VMConnect.
If integration components are installed and enabled, there’s a different option.
In Hyper-V, the RDP encoder talks to the Video Virtual Device (VDEV), which communicates with the child partition via a communications bus called VMBus, allowing it to talk directly to the synthetic video adapter (SynthVid VSC) that is running in the child partition. SynthVid then sends frame buffers back across VMBus, back to the Video VDEV, where it’s picked up by the RDP encoder, finally making the video show up in VMConnect.
In Windows Virtual PC, the RDP encoder makes a connection to an RDP endpoint inside the guest OS via a communications bus called VPCBus. In this specific scenario, VPCBus is essentially acting as a network transport, allowing an RDP connection to be made from the host OS to the guest OS without the use of a network (which is why this works even if you don’t have a network adapter in your guest OS). Now, you don’t have an RDP connection to the guest all the time – when the guest boots there’s obviously no RDP endpoint to connect to. At that point, you’re using emulated video. As soon as the integration components come online and are successfully enabled, Windows Virtual PC creates a Remote Desktop connection to the guest OS, and seamlessly switches over to using that for video.
And that’s the secret sauce behind getting Glass in Windows Virtual PC and not in Hyper-V: Hyper-V transmits frame buffers which are then rendered into video by the RDP encoder, while Windows Virtual PC actually creates a Remote Desktop connection, which can use all of the pixie dust necessary for Aero remoting to work.
So why doesn’t Hyper-V do this too?
That’s a topic for another blog post.
1Please note that these images are not necessarily technically accurate – their only purpose is to help demonstrate concepts relevant to the conversation.
:: Yawn :: No big news here. Microsoft just released the Hyper-V Integration Component drivers for Linux. As Open Source. Under the GPL v2.
Yup. Just another standard, run of the mill… wait, what?
No, seriously. It’s true. This is the first time that Microsoft has contributed code to the Linux kernel.
Check out the post on the Virtualization blog over here, or go straight to the press release here.
Please keep in mind, though, that the only Linux distributions that we *support* are SLES 10 SP2, SLES 11, RHEL 5.2 and RHEL 5.3. That doesn’t mean that these drivers only work on those platforms, just that you can only get support for them if you’re running those distributions.
(And yes – I’m working on another podcast. I’ve been very, very busy lately so I don’t have a lot of spare time to work with. Stay tuned.)
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.