VMWarehttp://www.geekzilla.co.uk/Innovation Team's dumping grounden-usTue, 10 Jun 2003 04:00:00 GMTTue, 10 Jun 2003 09:41:01 GMTGeekZilla.co.ukeditor@GeekZilla.co.ukwebmaster@GeekZilla.co.uk Resize VMware virtual disk http://www.geekzilla.co.uk/view2751900E-8E67-4D5A-B97E-238BBEFF602A.htm Resize VMWare virtual disk Here's a handy tip to resize your VMware virtual disk once it's run out of disk space. Open up the run dialogue from the start menu (Start -> Run) or hold down the Windows key and press R. Type cmd and hit enter to open up the Command Prompt. Assuming that your VMware installtion is in the default location type or paste the following, replacing '''CAPACITY''' with the new size of the virtual disk image and '''VMDK''' with the absolute path to the virtual disk you are expanding. "C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x '''CAPACITY''' "'''VMDK'''" The capacity should be entered with the following extensions depending on the new size, Mb or Gb, for example 20Gb will resize the new hard drive to 20 gigabytes. 16/7/2007 http://www.geekzilla.co.uk/view2751900E-8E67-4D5A-B97E-238BBEFF602A.htm Increase your Virtual machine's disk size http://www.geekzilla.co.uk/view18A035DE-06FF-4EA6-BC77-57D431CD50DD.htm Increase your Virtual machine's disk capacity Background The geekzilla team have been using VMWare for over a year now for desktop virtualisation. There are loads of benefits of virtualisation, but the most obvious one for me is increased stability. For years I had a single machine with every tool under the sun installed, and stability was a real issue. Today I have a basic Windows Vista host, with e-mail, office and web browsing capability and VMWare that I use to run specific virtual machines for different tasks. Problem Everything has been great with my development Virtual Machine. The main hard disk was sized to 10Gb, with 2Gb free. But when I needed to install Visual Studio 2005 SP1 and SQL Server 2005 SP2 I ran out of disk space. I tried to increase the size of the disk using VMware's diskmanager but ran into a number of difficulties along the way. Solution Okay first thing to do is to check the VMDK (virtual machine disk) integrity. I chose to run checkdisk within my Virtual Machine. You'll need to reboot and the disk will be checked before the machine starts. Once you're happy with the integrity of your disk its time to expand it. Using '''vmware-vdiskmanager'''. You must power the machine off first in VMWare workstation or VMWare Player. Navigate to your VMWare folder and issue the following command from the command prompt, passing '''-x''' to increase the size followed by the new size (e.g. 20Gb), followed by the path to the vmdk file you want to resize. This will take some time, and once complete the application will give you some sizing messages. Now you need to expand the capacity of the disk to take advantage of its new size. If the disk is the system volume you will need to mount the disk in a second VM and expand it from there. If its not a system volume do it within the virtual machine it belongs to. Once you've mounted the disk in a different VM or booted up the VM it belongs to if its not the system volume, do the following. Go to the command line and start the '''diskpart''' utility. By issuing the following command. Once you've started diskpart, list the drives using the following command: This will show you the disks assigned to your machine. Now the important command This will show you the drives, their volume number, capacity etc. You now need to select the volume you are about to expand, using the following command. Where n is equal to the number of the volume. Once selected, you can now expand it using the extend command. You can optionally specify the amount extend it by. That's it. Once you've extended the disk, it's wise to defrag the drive. If you use the defragment tool in VMWare workstation you will find it much quicker than deframenting the drive from within the machine. Summary Virtualisation is great. Using an external Hard Disk, take regular snapshots of your Virtual Machine as a backup. I was fortunate to have backups prior to VS2005 SP1 and SQL 2005 SP2 trying to install on the disk when there was insufficient capacity. For some reason SQL 2005 became unusable as a result. I hope you have discovered how useful Virtualisation, especially for developers. If you ever run out of disk space on your Virtual machine you can use the technique above to extend the drive's capacity. 5/6/2007 http://www.geekzilla.co.uk/view18A035DE-06FF-4EA6-BC77-57D431CD50DD.htm How to convert a physical computer to Virtual Machine http://www.geekzilla.co.uk/view01ABF367-F416-47D1-BAD8-069D7F9ED8DE.htm How to convert a physical computer to Virtual Machine As per Mark's article http://www.geekzilla.co.uk/ViewContent.aspx?contentID=36 here is another solution that does not use Ghost but good ole NT back up. I had this stored on my machine but unfortunaltey I cannot remember where it came from but here are the steps again. Make a backup of your 'old'(Windows XP) Go to Start->Run and type NTBackup.exe and click OK Choose to run the Wizard and select Backup Files and Settings , click Next> Choose All information on this computer, click Next> If you’re using an external drive you may want to choose Let me choose what to back up instead and drill down to My Computer. If you do this remember to check System State as something to back up! Browse to or type the path to where you want your backup file created: somewhere you can get to from your new machine. I used my external harddrive to store the image on for easy transfer. Type a name for your backup file. I chose something with the date in it just to make it easier to remember It says you need a floppy disk. If you have a floppy drive , then you can use them and it will save you a step later. If you don’t, don’t sweat it. Click Next> Click Finish and find something else to do for the next 5-10 hours or so. At the end, if you don’t have a floppy drive, it will complain about it, but just click ok, all is well. Create the Windows Virtual Machine (These instructions are for VMWare 5.5, if you have another verison they may vary) Open VMWare and choose File->New->Virtual Machine… Choose Typical, click Next> Choose Microsoft Windows and your Version Give your VM a name and location, click Next> Choose Use bridged networking, click Next> Be careful when choosing your disk size. I screwed this up twice. Just go ahead and make it at least as big as the physical drive on your old machine(this is where it helps to have an external drive to store these things on, like my 100GB one). Leave the box to allocate space now unchecked, and it will only take up as much room as it needs. Click Finish Start your new VM. Choose VM->Removable Devices->CD ROM (IDE:0)->Edit… and point it to where ever you have your Windows install disc (I had an ISO file) Choose VM->Settings, click the Options tab and then Shared Folders and set up a shared folder to the path where your backup file can be found. Stop your VM (it will be hung anyway) and restart it to get it to notice the installer cd. If you have the recovery floppy and you pay attention at the very beginning of the install, you can press F2 and have Windows create the install directly from your backup file. I haven’t done this so I can’t guide your steps, but you shouldn’t need to do the next steps if you can do that. Otherwise, follow the Windows install. Make sure that you set up your partitions to match your old machine(this was another place I miscalculated and had to start over with). Choose as many of the defaults as possible when installing Windows. It won’t matter since all the settings will be overwritten when you restore your backup. After you’ve installed Windows, install the VMWare tools (VM->Install VMWare Tools…) on the virtual machine (this needs to be done before you restore). Select defaults in the install wizard and Windows will require a restart after the install. Update: If you created more than one partition during your install, make sure that you format the partitions other than C: before you perform your restore! Go to Start->Run, type compmgmt.msc, click on Disk Managment, right-click your drive and choose Format. Restore your backup onto the new VM After it’s restarted, in the VM, map a drive to the shared folder you set up. It should be under VMWare Shared Folders when you browse for it. The mapped drive path will start with something like \\.host Click Start->Run, type NTBackup.exe and click OK. Follow the wizard steps to restore your backup. There shouldn’t be any “gotchas” there. Find your backup file on the share you mapped to and it will load in the treeview under “File”. Check all the pieces you want to restore, which in my case was everything. Don’t forget to check the System State (probably the last thing in the list) as something you want to restore! Click Finish. You will be prompted about restoring system state; just click OK. Wait for a couple or 3 hours for the restore to finish! 14/7/2006 http://www.geekzilla.co.uk/view01ABF367-F416-47D1-BAD8-069D7F9ED8DE.htm Unsupported resolutions http://www.geekzilla.co.uk/view839E8F8F-8072-4C7C-8C9E-C3F721579AB0.htm Unsupported resolutions To add a resolution such as 1440x900 to your VMWare machine, edit its .vmx file and add the following lines to it. svga.maxHeight = 900 svga.maxWidth = 1440 This helped solve a problem on our widescreen Dell laptops that we use for our development work. 20/6/2006 http://www.geekzilla.co.uk/view839E8F8F-8072-4C7C-8C9E-C3F721579AB0.htm How To Create A Virtual Machine from a Physical Disk http://www.geekzilla.co.uk/viewB0441E92-6DF7-47E6-AF0F-5B2A9229F6E0.htm How To Create A Virtual Machine from a Physical Disk '''We recently had a problem in converting a physical machine to a virtual machine. We have tools which work on the VMWare server products (ala Platespin) but we could not convert the ESXServer image back to a VMWare Workstation image. Despite some beta tools all we got was blue screened.''' '''Hunting for a solution came across a detailed set of steps which use a Ghost image of the physical machine to create a virtual machine.''' '''The steps are reporduced below:''' These instructions assume that a Ghosted image already exists on a bootable CD or DVD. You will also need an existing virtual machine with the same operating system as the image you wish to convert. For example, if you have an image of Windows 2000 Advanced Server, you will need an existing installation of Windows 2000 Advanced Server on VMWare. In addition, this assumes that the image you are converting has been created with an IDE drive. '''Please read and execute these instructions carefully, as each step within depends on successful completion of the previous step!''' '''UPDATE: Please note that you can execute a Ghost 10 image directly under VMWare Workstation 5.5''' ------------------------------------ 1. Obtain a bootable CD or DVD that contains the image you wish to convert. ------------------------------------ 2. Create a new MS-DOS virtual machine of the correct size and boot it from the Ghosted CD or DVD. 2.1. Start VMWare 2.2. Go to the File menu, choose New, then New Virtual Machine and click Next. 2.3. Click Custom, then Next. 2.4. Under Guest Operating System, choose MS-DOS. This is important because VMWare will look at this virtual machine as an IDE drive. Again, attempts to convert a SCSI image did not work in this scenario. I am not sure why. 2.5. Under Virtual Machine Name, choose a name for the virtual machine you will ultimately be using after conversion. 2.6. Next, choose how much memory you wish to allocate to the virtual machine you will ultimately be using after conversion. Note that these numbers can be changed by the individual user based on how much memory they will use keeping in mind how much physical RAM they have. 2.7. Click Next. 2.8. Under Network connection, choose Use bridged networking and click Next. 2.9. Click Create a new virtual disk and click Next. 2.10. Under Specify Disk Capacity, you need to specify, in gigabytes, how large to make the new disk. Note that you need to make the disk size at least as large as the image you are about to restore, and also need at least as much free space as you specify to allocate. 2.11. Click Allocate all disk space now and click Next. A warning message will appear asking if you're sure that's what you want to do. Be sure you have enough free space to create that size of a file. 2.12. Click OK to clear the warning message and allocate the disk space. ------------------------------------ 3. Restore the Ghosted image to your new virtual machine. 3.1. With the virtual machine powered off, place the DVD or CD with the image you want to restore into the DVD drive. 3.2. Boot the virtual machine. 3.3. Follow the instructions onscreen to boot from the CD/DVD ROM drive. 3.4. Follow the instructions to restore the image from CD/DVD onto the virtual hard drive. 3.5. When imaging is complete, shut down the virtual machine and remove the CD/DVD from the drive. ------------------------------------ 4. Configure another virtual machine with the same operating system as the one you just restored from the Ghosted image (assumes you already have another virtual machine with the same OS installed). 4.1. In VMWare, select the virtual machine that has the same operating system as the one you just restored from Ghost. 4.2. Go to the Edit menu and choose Virtual Machine Settings. 4.3. Click the Add button and click Next. 4.4. Choose Hard Disk and click Next. 4.5. Click Use an existing virtual disk and click Next. 4.6. Use the Browse button to navigate to the VMDK file for the image you created. For example My Data\My Virtual Machines\Test\Test.vmdk. 4.7. Click OK. The new virtual hard disk will be added. ------------------------------------ 5. Boot another virtual machine with the same operating system as the one you just restored from the Ghosted image. This will allow you to add the appropriate HAL.DLL file to the virtual machine, thus enabling it to boot in VMWare. 5.1. Boot the virtual machine to which you just added the new virtual hard disk. 5.2. Log into the virtual machine as an administrator. 5.3. On the Windows desktop, right-click My Computer and choose Manage. 5.4. Click Disk Management. You should see a disk in the right window pane for the virtual hard drive you just added. 5.5. Right-click the new hard drive and choose Change drive letter and paths. 5.6. Assign a driver letter to it (e.g., Z: ). 5.7. In the virtual machine you are currently running, navigate to the system drive\WINNT\system32 folder. 5.8. Search for the HAL.DLL file and copy it to the clipboard. 5.9. Navigate to Z:\WINNT\system32. 5.10. Rename the existing HAL.DLL there to HAL.dll.old. 5.11. Paste the HAL.DLL from the currently running virtual machine in the Z:\WINNT\system32 folder. 5.12. Go to the Start menu and choose shut down to turn off the virtual machine. ------------------------------------ 6. Boot the virtual machine to which you just created and copied the appropriate HAL.DLL file. At this point, the virtual machine you created from the Ghosted image should boot correctly with a minimum configuration (i.e., no sound, 640x480 resolution, etc.). From here, you will need to install the VMWare tools in the new operating system. 6.1. In VMWare, select your new virtual machine. 6.2. Go to the Edit menu and choose Virtual Machine Settings. 6.3. Click the Options tab. 6.4. Under Guest Operating System, change it to read the correct OS you restored from the ghosted image (e.g., Windows 2000Advanced Server). This is very important, as the next steps will not work properly if you choose the wrong OS. 6.5. Click OK. 6.6. Click Start this virtual machine. 6.7. Give the virtual machine time to boot and log in as an administrator. 6.8. If you see any plug and play messages at this point telling you to install new hardware, ignore them. 6.9. Once the machine is booted and the new hard ware massages are gone, go to the File menu in VMWare and choose Install VMWare Tools. 6.10. Follow the instructions to complete the installation of the VMWare Tools. This will tell the operating system which virtual hardware drivers to use so it can talk to the host operating system. 6.11. After the installation of the VMWare tools, you will be prompted to restart. It is a good idea to do so at this point. 6.12. Once restarted, you may do any additional configuration and testing of the new virtual machine. '''Thanks to BlueAlliance for their hard work.''' 15/6/2006 http://www.geekzilla.co.uk/viewB0441E92-6DF7-47E6-AF0F-5B2A9229F6E0.htm