Robert's profileRob KeiserPhotosBlogListsMore ![]() | Help |
|
Rob KeiserNotes from the basement November 29 Fun with VHDsLooking around I found that VHD support is quite extensive inside Win7 but I didn’t realize how much. I also found a few commands that you can run at the cmd prompt to help with VHDs. CreatingFirst thing I found was that creating a VHD was very easy. You can use the Computer Management console to create a VHD using the GUI. Simply right click on Disk Management and the Create VHD menu item should be there. Clicking on it starts the dialog windows that will help you create a fixed or dynamic VHD. For those of you who yearn for the days of DOS, you can also use a command at the cmd prompt. Go to an administrative command prompt and enter Diskpart. Diskpart is not just for VHD’s so be careful, you could do some damage to the partitions on your hard drive. Once you’ve started Diskpart, you can create a VHD by issuing the Create command – Create vdisk file=”drive:vhdame.VHD” maximum=max size of vhd type=expandable|fixed This will create a VHD on the drive you specify with the name you specify – in the example above, I’ve created a VHD called blog.vhd on the D: drive. The maximum tells the system the maximum size of the drive in MB and the type lets you create an expandable or fixed size VHD. Using the Diskpart command you can automate creation of VHDs if you need to. The VHD will be uninitialized and unattached. AttachingAttaching a VHD lets you use it like a normal hard drive on your system. You can again right on Disk management inside Computer Management and select Attach VHD. You can enter the location and name of the VHD you want to attach or browse for it. If the VHD has been initialized and formatted it will be assigned a drive letter. Otherwise you will have to initialize the VHD and format it. You can use the Diskpart command to attach a virtual disk. You first have to use the Select command to select the VHD then you can attach the vdisk Select vdisk file=drive:vhdname.VHD Once the VHD is attached it will show up in Computer Management. But there’s more…Attaching and creating VHD’s was what I was expecting, but I didn’t realize you could install an OS to a VHD without using Windows Virtual PC. You can even install a 64bit OS to a VHD. The trick is to use the Diskpart command when installing the OS. lets say you want to create a bootable VHD – one that you could use to boot your physical machine. We’ll assume you have Windows 7 installed on your computer first. Now put in the DVD of the OS that you want to put on your VHD and boot from the DVD. When windows gets to the first screen you can drop to a command prompt (using Shift-F10) and use the Diskpart commands to create and attach a VHD. Once you’ve done this you can exit the command prompt and continue with the installation. When it gets to the part where you are asked to choose where to install the OS you will see an entry for your VHD. Select it (you will get a message saying it can’t install but ignore it) and continue with the installation. Once the OS is installed you will have a multi-boot system. The first entry in your multi-boot menu will be the OS on the VHD. If you want to change the menu or add a preexisting VHD to your boot menu you can use the BCDEdit command..yes another command prompt command. BCDEdit lets you modify what shows in your boot menu and also allows you to rearrange things if you want. If you have a VHD that is bootable, you can use the BCDEdit command to install it into your boot menu. Unlike Diskpart, BCDedit is a run and done type command (like DIR). Running BCDedit by itself will present you with a list of your current boot menu and the type and location of the OSs you have on your system. The easiest way to add a new entry you in your boot menu is to copy an existing entry. When you copy an entry BCDEdit will create a new entry with a GUID. You use the assigned GUID to modify the new entry to point it to your VHD. Use the Set option to point the OSDEVICE to your VHD. The command would look something like: You can get help with BCDEdit by passing in /? as the first parameter. There is another way to work with your boot menu. You can use the MSCONFIG command. This will not give you all the options that BCDEdit will but you can select a default OS from this menu. One thing I’ve learned is that you should not go into MSCONFIG when you have booted into the VHD. Every time I used MSCONFIG when booted into the VHD the system had problems booting back into my main OS. August 09 Windows Virtual PCAfter making sure my Windows 7 install was working properly I decided to install the RC of Windows Virtual PC. This will allow me to use XP mode if I need it and also let me work with some of my existing virtual machines that I had setup with Virtual PC 2007. You will have to uninstall Virtual PC 2007 to install the RC, you will also have to uninstall the Windows Virtual PC beta if you had previously installed it. As has been talked about plenty in the press you will also have to have a CPU that supports virtualization. This would be Intel-VT or AMD-V support. Everything went well with the install. Then I installed the XP mode piece (which is primarily a virtual machine of XP). Again everything worked well. Now it was time to try one of my existing Virtual Machines and the first problem arose. One of my VMs had a VHD that was split into multiple files with the first two being about 14Gb and the last one being very small. When I tried to use this VHD WVPC could not find the VHD file. This seemed odd since I could see it fine and I could even copy it. When I copied it WVPC could see the file, but when it tried to use it there was a disk error – somewhat to be expected since the name had been changed on the copy. So I figured I’d rename the copy back to the original name and guess what, WVPC could not see the file anymore. At this point I tried another VHD that was much smaller. This seemed to work fine so I guessed that the split file was causing the problem. VHD’s are split very simply, so I used the tried and true Copy command to combine the files together. This solved the problem and I was able to start up the VM and work with it…problem solved. Now that it worked, I tried to rename the file back to the original name – for some reason WVPC was still having a problem with the old name. So I renamed it back to the copied name and left it. If it ain’t broke don’t fix it. August 07 Windows 7 RTMOn August 6th the RTM version of Windows 7 was made available to MSDN subscribers. So naturally I had to download it as soon as I could. I decided to try an upgrade on my Dell Studio 17. My Dell was running Vista Ultimate x64 and I figured it would make sense to simply upgrade to Windows 7 Ultimate x64. This machine has 4Gb of memory and plenty of free disk space so I didn’t think it would take that long to upgrade. Well, it took about 4.5 hours to finish the complete upgrade…a little longer than I expected. But I figure I’ll only have to do this once so no big deal. I was pleased when everything that had been working still worked. I know I have expected everything to be fine, but this is an upgrade so anything was possible. The only thing that had real problems was Trend Micro Internet Security’s firewall. Odd things:
One thing that pleasantly surprised me was the AT&T wireless card. it worked without any changes. The other thing I noticed was that the fingerprint reader seems to work better (maybe my hands are cleaner…). There are still plenty of things I need to check, but so far it is working flawlessly. July 28 jQuery, Ajax, Bing, Oh MyWe had a good turnout for the hands on lab this month. Bill Wolff started the evening by getting everyone to sign up for a Bing API id. You can get one here http://www.bing.com/developers/createapp.aspx. He then went on to build a simple web search page using the Bing web service and lots of CSS code. He has the source on his blog. I followed by going a little lower tech. I wanted to show some jQuery code that would allow you to connect to Bing using Ajax. I started with a simple HTML page that used the URL method to search Bing and have a callback routine run – all in JavaScript. I then modified the code substituting jQuery calls for the straight JavaScript. The final step was to convert all the JavaScript into code that would rely on the jQuery library and show that it could be done with less code than straight JavaScript. I also added some extras to the final output just to show how it could be done. The files can be found on my SkyDrive or by clicking here. You will need to signup for a Bing API id to make them work. You will also need the jQuery library to make the second and third files work. You can get the jQuery library from http://jquery.com These examples are to show jQuery and Ajax, so they aren’t pretty from an end users perspective – but you can do that on your own so play with them and see what you can come up with. And if you have questions about what we’ve shown or have ideas of what you would like to see in the future please leave a comment. July 03 jQuery PresentationsAt the latest Philly.Net Hands On Lab we tried to create an example using the ListView and an RSS feed. The ListView example was taken from the demo that Joe Stagner did here. Unfortunately his site was not working for the demo so we switched it to my blog. If you want to see the final ASPX page you can get to it here. Remember you can find more jQuery information at jQuery.com. At the previous regular meeting of Philly.Net Technorati Tags: jQuery I also gave a short intro presentation about jQuery. If you would like to have the presentation you can download it from here. I hope these presentations helped you get started. Let me know what else you’d like to know about jQuery by leaving a comment. Thanks. |
|
|||
|
|