Problem installing win7 on a virtual disk. Create a VHD and boot from the VHD. Installing Windows on a virtual hard disk

Virtualbox is an intuitive virtual machine, that is, a program with which you can run additional operating systems as part of the main one installed on your hard drive or SSD. Windows XP is an old, but time-tested and, in a sense, still relevant, lightweight and familiar operating system. By installing it on a virtual machine, you can solve a variety of problems.

What is it for

First, a little terminology. The operating system you are currently working on and reading this text is called the host. The OS installed and running within the host system is called a guest OS. Installing “ex-pi” on Virtualbox can serve different purposes. Even if your working system is Windows XP, a guest “copy” can also come in handy. Here are some popular uses for this feature:

  • Installing and launching Windows programs in a different environment (Ubuntu, Debian, etc.).
  • Using old applications and games that do not work on new systems (7, 8.1 or 10).
  • Testing potentially dangerous applications (the guest OS is isolated from the host system unless shared folders are created).

Here are at least three reasons why installing Windows XP in a virtual machine is not a fool's errand. In the end, you can simply practice for the sake of self-education. Virtualbox is cross-platform and runs on most operating systems. The only rule for its correct operation is to have a good supply system resources. That is for Windows startup XP as a guest system must have at least 500 MB of unused random access memory and a more or less unloaded processor.

Step-by-step deployment of the guest OS

First of all, you need to download Virtualbox from the official website. Let's assume that your host system is one of the latest Microsoft operating systems, 8 or 10. Installing Virtualbox is no different from installing any other program, except that during the process it may display a message stating that the software has not been tested with this version operating system. Don't pay any attention to him. It may appear up to 3-5 times, just continue with the installation.

The program interface on different operating systems is slightly different, but in general it looks something like this:

You must have a Windows XP CD or disk image in ISO format. But first you need to create the virtual machine itself. For this:

  • Click the “Create” button.
  • In the drop-down menus, select the OS type and version, and also give the machine a custom name (nothing depends on it except the name in the window title).

  • Click the “Forward” button.
  • Now specify the amount of RAM available to the guest system. The default value is enough to run Windows XP itself, but not enough to run programs. If your amount of RAM allows, move the slider to at least 512 MB, and preferably to 1024 (the green zone is the most comfortable value for joint operation of the host and guest systems).

  • Click Forward.
  • Create a virtual HDD for the guest system. Everything is indicated in the screenshots.

Important to note: By selecting a fixed hard drive, you will automatically create a file of the specified size on your real hard drive. The dynamic hard disk will grow in proportion to the Windows XP installed on it (with the installation of new programs and so on).

  • After clicking on the “Create” button, the virtual machine will be ready.

You can look into the settings by clicking on the “Configure” button.

For example, in the Display section of the Screen tab, you can add virtual machine video memory or enable 2D or 3D acceleration to improve video quality or use 3D applications. But usually the default settings are enough to run Windows XP.

Now make sure that the OS disk is in the drive or the disk image is in some folder. Click the “Run” button. The following windows will open:

If you are using a disc in your drive, just click Continue. If the image is in .iso format, then go to the folder icon and select your image and also click the “Continue” button. The installation of the operating system will begin. It is no different from what can be produced using real hardware. For those who have forgotten, here are the highlights.

Next, formatting of the virtual hard drive, copying installation files and reboot, during which you SHOULD NOT press any buttons. This is the only way to guarantee that the actual installation of the OS on Virtualbox will open, and will not start new preparation to installation, as in the screenshots. Ideally, after rebooting, you will see something like this:

Entering the key, computer owner name, time zone and other information varies depending on which Windows XP you have, so this question will not be considered.

There is only one point worth noting. The Virtualbox window may capture the mouse cursor (not always) and it becomes unavailable for other actions. To “return” it, hold down the right Ctrl on the keyboard and click the left mouse button.

After the installation of the system on Virtualbox is completed and you see the desktop, install the guest OS additions for better resolution screen and full operation of the “guest” operating system.

Install and reboot.

Additionally, if you need shared folders between the host and guest, follow these steps:

Select the desired folder. For example, this is a folder called Downloads, located in Documents. Save the result and open a command prompt in the guest system. Enter the command:

net use x:\\vboxsvr\Downloads

where x is the drive letter and Downloads is the name of the folder created in the previous step. Press Enter. If successful, the following will appear in the “My Computer” section. network drive X, through which files located in the Downloads folder of the host system will be available.

This completes the installation. You can use Windows XP in parallel with your main operating system.

(Visited 24,530 times, 11 visits today)


I showed how to install and configure the program to work with virtual machines– Oracle VirtualBox. Also, you have already learned how to create a virtual hard disk using the same program and all that’s left is to install Windows on our virtual hard disk :)

We begin the process of installing the operating system.

    In the main VirtualBox window, select the previously created virtual machine with the mouse and click the “Run” button:

    The virtual machine will start and the window will immediately prompt you to select the device/image from which the operating system will be installed.

    As I already said, if you have a real installation disk with an operating system (for example, the same Windows XP), then you can insert this disk into the drive and when the window appears as in the image above, you need to leave the “Host drive” selection and just Click the “Continue” button to begin the system installation process.

    In my example, the system is in an image (ISO file) and to install the system from the image, you need to click the button circled in red in the image above.

    In the window that opens, select ISO file with the operating system from your computer and click the “Open” button:

    Then click the “Continue” button in the previous window and the installation process will begin:

    VirtualBox supports mouse pointer integration. This means that when you move the mouse pointer into your virtual machine, it will become available and active already in this real car. And you can also move it back from the virtual machine to the real system.

    At the very first stage of installing Windows XP, you need to press the “Enter” key.
    Remember that in order for your keyboard (any press) and mouse to be active in the virtual machine, you need to move the mouse cursor directly into the window of this virtual machine.

    In the next step, you need to press the “F8” key to accept the license agreement:

    Now it comes to choosing a partition to install the operating system.

    As you remember, at the very beginning we created a virtual hard disk for installing the system, and in my example I left the size of this disk equal to 10 GB.

    You will see the same selected volume at this stage of installation in the “Unallocated area” line. Of course, it is clear that it is not exactly 10 GB (10,000 MB), but a little more - 10,237. This is normal. The additional minimum volume is taken based on system needs.

    If you want your system to be installed to have only one partition (one local drive – C:), then you can simply press the “Enter” key and this entire 10GB area will be allocated for the system, and the installation will continue. As a rule, there is no other option needed for a virtual machine. I will do so.

    After selecting a partition (or an entire unallocated area) to install Windows and pressing the Enter key, a window will appear to select an option for formatting the partition:

    For the next few steps, no action is required.

    Immediately after formatting, the process of copying the files of the installed Windows to the partition will begin:

    Then the installation process of the system will begin and until a certain point, no action of yours will be required:

    After a certain stage of installing the system, you will receive a window where you will be asked to configure the language settings of the system. Just click the “Next” button:

    Immediately after the previous window, a new window will appear, where you need to enter your name (you can specify anything) and the name of the organization (you can also specify anything) in the appropriate fields. These parameters are displayed mainly in documents to see the creator of these documents and, in principle, are not needed anywhere else. After filling out the fields, click the “Next” button:

    The next step is to enter the license key.

    You can enter some of your own keys, if available. And if you use the system, the download link for which I provided at step No. 1 in the chapter about creating a new virtual hard disk, then use the key from the “Installation key.txt” file (it is in the ZIP archive with the system). The same key is entered in the image above.

    Next, you need to specify the name of the computer that will be assigned to the virtual system. I usually put a name that is convenient and understandable to me, for example, “Virtual_1” or “VirtualXP1”. You can specify any name you like (only in Latin). As a rule, this will not even be useful in the future.

    Next, the system installer prompts you to configure the date, time and time zone. As a rule, all this data is taken from the real system and synchronized with it. Just check that everything is correct here and if the date is incorrect, correct it.

    The installation will continue for a while and then the window will appear again. It asks us to set up a network. Leave the selection “Regular settings” and click “Next”. There is no need for us to make any special network settings.

    The next stage is change working group or joining the computer to a domain. We don’t need all this (for our purposes), so we leave everything as it is by default and click “Next”:

    Click the only “OK” button.

    In the next window, “OK” again to accept the image parameters and not wait 30 seconds.

    In the next wizard window that appears Windows settings XP click “Next”:

    In the next step you can turn it on or off automatic update systems. If the system is not updated (and the original assembly is already quite old), then some programs may not start. But it’s better not to turn on anything right away and select “Delay this action”, then check all the programs you need. If they work, then you don't need any update. And as a last resort, the update can always be launched manually from the system.

    We refuse to register with Microsoft by selecting “No, some other time” and click the “Next” button:

    Now you need to enter a name account, under which you will log in to the system. Here whoever likes it. I specify “user” because that’s what I’m used to. There is no point in having multiple users.

    That's all! The last setup window before booting the system, where we simply click the “Finish” button.

    And as a result, you will receive a loaded clean Windows XP operating system (of course, you could install any system based on your own considerations) in the VirtualBox program:

    In this system, you can work and perform absolutely the same actions as if this system were actually installed on your computer. You can create profiles for registering accounts in electronic wallets and axle boxes, test various programs to earn money and so on.

    ATTENTION! After installing this particular Windows systems XP (if you downloaded it using my link), then you will have 30 days to use it. If you want to activate the system and disable trial period, then this whole simple process is described in the file “Instructions.txt”. Follow it to activate the system.

There is only 1 step left to complete the work. Remember when we set up shared folders and I said that we would also need to install an add-on? This is what we will do now.

Working with shared folders in an installed virtual machine

We are starting to enable the ability to work with Public Folders.

That’s probably all there is to the settings of the virtual machine and the system itself. I set up everything basic.

All that remains is to show you how to shut down the virtual machine. Everything here is elementary and the easiest way is in a running system, just like in a real one, go to “Start” and click “Shut down”. Then wait a little (usually a few seconds) until the system turns off and the VirtualBox window can be closed.

Another way is to click on the button to close the VirtualBox window with the system running and simply click “OK”, leaving the default shutdown option “Save machine state”:

With this I consider the article complete :) I think that for someone such a detailed step by step guide on installing and working with a virtual machine can be useful for various purposes. I use autoclickers for testing (they are written about here - Autoclickers. What are they and why are they needed in the boxes?), for registering accounts in the boxes, and often even for working with multi-accounts in the boxes (fortunately, a productive laptop allows you to do this). It’s more convenient for me to do all this on a virtual machine and not clog up the real operating system (and I use Windows 8) with all sorts of programs.

I will try to answer any questions about the use of virtual machines in the comments, as I did earlier in other articles :) After all, it will never be possible to present everything 100% in an article, otherwise it would turn out to be a whole book, so there will always be some unexamined points.

That's all. Good luck to all! :) See you soon;)

From time to time the need arises to install Windows 7 or Windows 8. Everything would be fine, but there is not always the desire and opportunity to allocate new system a whole section, and then play with the loaders for a long time.

Luckily, Windows 7 and Windows 8 support installation on a virtual hard disk (VHD). By and large, a virtual hard disk is enough large file, which can be connected to the system as another hard drive. Everything that is contained on that disk is stored in that file.

The advantages of this approach are:

  1. The system runs much faster on physical hardware than on a virtual machine. This is one of the main advantages of installing the system on a VHD compared to installing the system on a virtual machine;
  2. VHD will work like physical disk. In other words, you can easily access all the data on your hard drive;
  3. The VHD is stored in a single file and you can "clone" the system by simply copying the VHD file;
  4. You can test new programs, games, etc. without fear for your main system;
  5. You can use new ones Windows versions without deleting the main one. In light of the release of Windows 8, this is especially relevant.

And so, let's get started Windows installation 7 or 8 per virtual hard disk.

Installing Windows on a virtual hard disk

To install Windows we need

  1. Pre-installed Windows 7 or 8. This is assumed to be your main OS.
  2. Bootable DVD or flash drive with Windows 7 or 8 (depending on what you want to install). What it is and where to get it is described in the manuals: and.

There are two ways to create a VHD:

  1. in running Windows;
  2. by using command line during the Windows installation process

Let's consider the first method along with the system installation process.

1. Creating a VHD file in a Windows environment and installing the system on it

Click on the item Computer on the menu Start right click mouse, then select the item Control. If everything is done correctly, you should see something like this:

Choose Disk management on the left, then in the menu Action choose Create a virtual hard disk. The following dialog box will appear on the screen:

Specify the name and location of the VHD file, as well as the maximum size. It's best to choose Dynamic expansion since in this case the VHD file will take up exactly as much space as the information on the virtual hard disk contains. IN in this example I created a virtual hard disk file with a size of 25 GB and the name win7.vhd on drive D:\.

That's it, the file is created. Now we insert boot disk or a USB flash drive with Windows and reboot the system.

Let's start the Windows installation:

In order for us to be able to install Windows on a virtual hard disk, we need to connect (mount) it. To do this, click Shift and F10 to call Command line:

We need to enter the following commands:

Discpart

attach vdisk

In quotes we indicate the path to your VHD file that you created earlier. Next we close Command line and continue with the installation.

When choosing an installation disk, ignore the warning:

Let's now consider creating a VHD disk during the Windows installation process.

2. Create a VHD during Windows installation

We boot from a flash drive or DVD with Windows and start the installation. How to do this is described in the articles linked above. When the installation begins, a window similar to this should appear:

Now we need to somehow create a virtual hard disk so that we can install the system on it. To do this, click Shift and F10, and then enter:

Discpart
create vdisk file="D:\win7.vhd" type=expandable maximum=30000

Using this command we will create a virtual hard disk file wind7.vhd in the root folder of the section D:\ with maximum size 30 000 megabyte or approximately 30 GB.

The virtual hard disk file was created, but Windows Installer knows nothing about it. In order for the created virtual hard disk to appear in the list of partitions, you need to “mount” it. To do this, enter the command:

Select vdisk file="D:\win7.vhd"
attach vdisk

After this, we continue the installation as usual. When you get to selecting the partition to install, select the hard drive you created. If after entering the commands the virtual hard disk does not appear, then click on the button Update.

Upon completion of the installation, you will be able to choose during boot which system to boot: the main OS or Windows, which is installed on the virtual hard disk.

Let's look at how you can rename the name of the new system in the boot list so that it can be easily distinguished from installed system.

Editing the Windows Boot Loader

To edit the bootloader it is convenient to use a standard utility bcdedit.exe. Run Command Prompt as Administrator. To do this, find it in the Start menu, right-click and select the appropriate item in the menu.

If you have a booted system that is installed on VHD, enter:

Bcdedit /set (current) /d "Windows 7 VHD"

Here "Windows 7 VHD" is the desired name in the boot list for the system on the virtual hard disk, and (current) is the identifier of the boot loader for which the name is changing. The entire list of identifiers can be viewed by running bcdedit without parameters.

For me it looks like this:

Most likely you will have an ID default, if not, then notice the default in your code. This is done like this:


bcdedit /set (default) description "Windows 7 VHD"
bcdedit /default (current)

Here the system (default) is given the name "Windows 7 VHD". Specify that the current OS should be loaded by default. I was running Windows 7 from the "main" physical media.

How to remove Windows already installed on VHD

This can be done in many ways, but we will use the most primitive and easiest in my opinion.

To do this, we need to go to the "System Configuration" window; to do this, select "Control Panel" in Start, then find "Administration" and "System Configuration" in the window that appears, find the "Download" tab. The entire path is shown in the picture below:

And thus you should have a window like this:

And so you can see that there are controls here like "Delete" and "Use as default." So you can with bcdedit rename the new system, and assign the right system the main one in this window.

That's all for me. Thank you for your attention!

Don't judge strictly, this is my first article. I'm waiting for your suggestions and comments!

You can install the Windows operating system on a virtual hard disk (VHD) to use as a second operating system on your computer. In this case, the user will be able to select the required Windows operating system at startup, without using a virtual machine.

The virtual hard disk file itself will be located on local disk your computer. In Explorer, it appears as a regular file with a “.vhd” extension. You can install Windows on a virtual hard disk and fully operate the system. In this case, the main operating system will not be affected by installing another version of the operating system on your computer.

The user will have access to all disk space of this computer, there will be no problems with the speed of the system when starting from a VHD disk. Install and use like this the Windows way It will only be possible from the computer's hard drive. If you install Windows on an external hard drive, this method will not work.

All work on installing Windows will take place in two stages:

  • creating a virtual hard disk (VHD)
  • installing Windows on a virtual hard disk

You can read a detailed article about creating a virtual hard disk for subsequent installation of Windows on it. After creating the virtual VHD disk, you can proceed directly to installing the operating system on the virtual hard disk.

Installing Windows on a VHD disk

First, you will need to remember and also write down on a piece of paper the size of the hard disk partition on which the virtual hard disk was previously installed. This will be needed to determine the drive letter during the installation of the system on the VHD. On my computer this is drive “D”, 367 GB in size.

After this, you will need to insert it into the drive of your computer DVD disc with the operating system image, or insert a bootable USB flash drive with Windows into the appropriate USB connector. Bootable USB flash drive can be created on a USB drive using special programs, which you can read about on my website in the “Programs” section.

Next, you will need to restart your computer. Immediately after the first image appears on the monitor screen, enter the BIOS menu. There you will need to set the boot priority from DVD-ROM drive or USB storage, depending on the media from which you will install the system image.

After the inscription appears on English language, prompting you to press any keyboard button, press any key on your computer keyboard. Please note that later, when installing Windows, the computer will reboot several times. Therefore, when this message appears again, you should not press a key on the keyboard.

In the first “Windows Installation” window that opens, click on the “Next” button, and in the next window on the “Install” button. Next, accept the terms of the license agreement, and then click on the “Next” button.

In the next window, select the installation type: “Custom: Windows installation only (advanced users).”

After that, in the “Install Windows” window, you will need to answer the question: “Where do you want to install Windows?” Here you will need to select a virtual hard disk to install the system, but it will not appear in this window.

You can find out the VHD drive letter using the command line interpreter. To launch the command line interpreter, you will need to press the keyboard shortcut “Shift” + “F10”. After this, the Windows command line will open on the monitor screen.

First, using the command line, you will need to find out the letter of the logical drive on which you previously created the virtual hard disk. Drive letters may differ from those letter designations disks that we see in Explorer.

To launch the utility, write the word “diskpart” (without quotes) on the command line, and then press the “Enter” key.

After this, all drives on your computer will be displayed on the command line. Each disk is assigned a specific name (letter of the alphabet). The drive names may differ from the letters they are designated by in Explorer.

On my computer, the logical partition "D" on my computer's hard drive was assigned the letter "F". On your computer, it may be a completely different letter. The correct choice of drive letter can also be determined by the size of the disk on which the VHD disk was created. For this purpose, we remembered and wrote down on paper the size of the disk where the virtual hard disk was installed.

On my computer I created a virtual disk called "win10.vhd". Therefore, this name will need to be entered into the appropriate command (you enter the name of the virtual hard disk that you assigned to your VHD disk).

Next, you will need to enter two commands in sequence. Don't forget that you must have the drive letter of your computer. For me it is the letter “F”, you may have a different letter. "F" is the drive letter and "win10.vhd" is the name of the virtual hard disk file on my computer.

First, enter the command to select the virtual hard disk:

Select vdisk file="F:\win10.vhd"

Unfortunately, I was not able to take a screenshot of the monitor with all the commands in the command line interpreter (nothing was visible there). The commands will look like this image.

Then click on the "Enter" button. Under the command, an entry will appear stating that the virtual disk was successfully selected using the DiskPart program.

Attach vdisk

After this, click on the “Enter” button. You will see a note indicating that the virtual disk was successfully attached using DiskPart.

IN new line Type "exit" (without quotes) to exit the command line utility.

Then in the Windows Setup window, click on the Update button. You will see that an additional disk has appeared in this window, which has the size of the previously created virtual hard disk (in my case, 32 GB).

Now you will need to select this disk, and then click on the “Next” button.

In some cases, an entry may appear in this window stating that it is impossible to install Windows on this disk partition. When I installed Windows 8.1, this message appeared, but when I installed Windows 10, there was no such message. Ignore this message, click on the “Next” button to start the process of installing the operating system on your computer.

During the system installation process, there will be several reboots. The next time the system reboots, do not press a keyboard key on the black screen that opens; the system will boot itself to continue the installation.

After starting the computer, a screen will open asking you to select an operating system to boot on the computer. After 30 seconds, the system that was selected as the default boot will be loaded.

Working in Windows from a VHD virtual disk

The system installed on a virtual hard disk is a full-fledged operating system. For example, Windows window 10, which was installed on a VHD disk, as the third operating system on my computer.

When you work in Windows from a virtual hard disk, you will have access to other drives on your computer. In this image, you can see that in Explorer the virtual hard disk is displayed (here it is labeled “C”), and the rest of the logical sections of hard drive of my computer (here they have different letters than on the main system).

How to change the system boot queue

You can choose the default queue for booting a specific operating system. To do this, you will need to enter the system configuration.

In the "Search" field, enter the expression: "msconfig" (without quotes). Then launch this application.

After this, the “System Configuration” window will open. Next, open the “Download” tab. Here you will see the operating systems installed on your computer, and among them the system that boots by default.

Select another operating system that you want to boot by default, then click on the “Set as Default” buttons, and then on “Apply” and “OK”.

For the changes to take effect, you will need to restart the computer. Now with a new booting Windows on your computer, if you do not select any system on the boot selection screen, the default Windows operating system will load after 30 seconds.

Conclusions of the article

You can install another Windows operating system on your computer by choosing to install the system on a virtual hard disk (VHD) created on your computer.

Good for everyone new Windows 7 (at least even because it's not Vista, just kidding), and one of its new features is the ability to mount VHD (Virtual Mount Disk) files. The beauty is that all experiments take place with a regular virtual disk file on your hard drive, so you don’t have to create new section or format an existing one, as well as use dual boot. For the operating system, the VHD file looks like the most common partition from which you can boot the OS.

Let's see how you can install and boot Windows 7 from a VHD file. There is no need to create new partitions for this, since the files will be located in the VHD file, but with support hardware your computer, therefore Aero will work at full capacity.

First of all, make sure that your hard drive has free place under the file, especially if virtual image as a VHD file was created as a dynamically sized image.

We need two files: a new download manager bootmgr, which supports booting from VHD, and bcedit.exe, which allows you to edit boot entries. program bootmgr can be taken from installation disk Windows 7, and the file bcedit.exe from an installed Windows 7 system (for example, get it from the same VHD image). For the lazy, just download the bootmgr and bcedit files .

We need to overwrite the file c:\bootmgr. In turn, the file c:\windows\system32\bcdedit.exe You don’t have to rewrite it, but run it from another location. In any case, it is better to save the old versions of the files, out of harm's way.

Now open the console ( Start>Run>CMD in XP or Start>CMD in Vista) and create a new entry:

bcdedit /copy (current) /d "Windows 7"

As a result, we get the GUID new entry. Now you need to specify the address with the VHD file to download:

bcdedit /set (GUID) device vhd=\vhd\win7b.vhd

bcdedit /set (GUID) osdevice vhd=\vhd\win7b.vhd

If you want Win 7 to be the last OS in the list when you boot your computer, run the following command:

bcdedit /displayorder (GUID) /addlast

As a result, the entry with the required GUID is moved to the end of the list.

And this is how you can change the name of the operating system when loading:

bcdedit /set (GUID) description "Winda 7 v VHD"

To force the definition Windows disk via HAL use this command:

bcdedit /set detecthal on

Normal, reboot. After loading, Win 7 will begin installing drivers, another reboot and away we go, Windows 7 with Aero!

As a result of our in-depth manipulations, a 16 GB virtual disk and a second 200 MB virtual disk partition are created containing system files. The size of 16 GB was obtained because the VHD image was automatically converted into an image with a fixed size and immediately occupied the entire area allocated for it.

The resulting VHD file, by the way, can be loaded without problems in the Virtual PC virtual machine.

How to remove Windows 7 installed in VHD

If you have already messed around with installing in VHD and decided to get rid of it, you can do it as follows. In fact, we just need to remove from boot menu mention of Windows.