Install windows 7 on a virtual drive. How to create and use a virtual disk in Windows. How to work with Microsoft Hyper-V and Oracle VirtualBox guest machines on the same machine
Hello admin! My computer has one hard drive divided into two volumes. On the first partition (C:) Windows 8.1 is installed, and on the second partition (D:) I want to install Windows 10, but not just like that, but on virtual disk vhd. Please explain how to do this quickly and easily? I read on the Internet that a simple hard drive can accommodate a dozen virtual disks and it is really possible to install an operating system on each of them!
How to install Windows 10 on a virtual drive using the program WinNTSetup
Hello friends!
First, I’ll tell you what a VHD virtual hard disk is and why our reader wants to install Windows 10 on it.
Secondly, I will introduce another hero of today's article, this is a utility WinNTSetup, which can create virtual VHDs and install operating systems on them.
Virtual Hard Disk (VHD) is a file format that has an identical hard drive structure. In simple terms, the operating system perceives virtual diskVHD is like a regular hard drive, but the disk VHD has several advantages, the most important of which allows several operating systems to simultaneously reside on the same partition of a conventional hard disk!
For example, we have a hard disk installed in our computer, in order to install five operating systems on this hard drive, it must first be divided into five partitions, but this is not at all necessary when using virtual disks. We will simply take and create five virtual disks on any partition of the hard disk VHD and install on them different Windows. We can do all this without leaving operating system!
I propose to move from theory to practice and create a virtual VHD disk using the utility WinNTSetup, then the same utility will install Windows 10 directly to our virtual hard disk, everything is quick and easy.
- Note: If you like to solve various computer puzzles, then WinNTSetup will come in handy more than once, I suggest that you read the descriptions of the work of the program.
- Another article for you on this topic.
Preparation for work
See Disk Management of my computer.
The hard drive is divided into three sections.
one . Hidden partition System Reserved (Reserved by the system, 350 MB) containing files Windows boot 8.1.
2. Drive (C:) with installed Windows 8.1 (on the desktop is ISO Windows image 10).
3 . The new volume (E:) is a file dump. On it, we will create a virtual VHD disk, on which Windows 10 will be installed.
Note: Before work, be sure to createbackup boot storage (BCD), in case you decide to delete it after using Windows 10, because after uninstalling the system, the choice of operating systems ( Windows 8.1 or Windows 10) will remain on boot.
Editboot storage (BCD) and removing the unnecessary entry is very simple, but it's even easier to deploy a backup. In the details of this issue, be sure to read it.
Windows 10 ISO image
Before starting the WinNTSetup program, we find the ISO image with Windows 10 on the disk (C :) and copy all the distribution files to some folder or click on the ISO image double click left mouse by connecting it to a virtual drive (if you are working in Windows 8.1).
I have a Win 10 image right on my desktop.
Windows 10 ISO image connected to virtual drive (D:)
It's WinNTSetup's turn
Download WinNTSetup you can on my Yandex.Disk at the linkhttps://yadi.sk/d/xLGkpAOzhXCPcor on the official website
http://www.winntsetup.com/?page_id=5
Unzip and run the executable file of the program WinNTSetup_x64.exe (if you are running a 64-bit version of Windows).
In the main WinNTSetup window, specify the install.wim file located in the D:\sources folder Windows distribution 10.
Click Select.
Select the file with the left mouse install.wim and click Open.
Windows bootloader 10 is automatically selected by the program - Z: (the first partition, System Reserved, is 350 MB, hidden and has no letter).
We create a VHD file on which Windows 10 will be installed. Click the VHD button.
If we create a dynamically expandable the size of the VHD virtual disk, then after installing Windows its size will be small (several megabytes), but during operation it can grow to gigantic sizes and when data is deleted from it, the size will not decrease, this is a little inconvenient. It is worth choosing this type in case you do not plan to work in a system installed on a VHD disk for a long time, but just want to experiment.
If you create a fixed size of the VHD virtual disk and select its size of 50 GB, then a virtual disk of exactly this size of 50 GB will be created; hard drive. I will choose this option.
I specify the size of the created VHD file and click on the View button.
In the explorer window that appears, I specify the location of the created virtual disk on the partition (E :), I also give it Windows name 10.vhd and click Save.
Hello readers of the ComService company blog (Naberezhnye Chelny).
Igor Shastitko
First of all this post is for those who would like to try Windows work 7 on my own computer, but for some reason it does not risk doing this - I don’t want, for example, to repartition partitions on the hard drive, there are doubts about further performance or compatibility with an already installed OS. But thanks to some new Windows features 7 is not a problem. Now you can install a new Windows 7 OS next to an existing one without affecting its basic functionality, disk partitioning or file structure in any way. In addition, you can safely install several independent copies of Windows 7 on the same partition and successfully switch between them.
All this is now implemented very, very simply - files. VHDs known as virtual disks, Windows 7/ Windows Server 2008 R2 is now treated as separate partitions and supports booting OS installed inside those files. But, I want to note, this case has nothing to do with virtualization - the system inside the VHD boots in the same way as if its files were just on a “normal”, familiar to us, disk partition like C: or D:. That is, we create a file. VHD of the right size on an existing one file system of this or that disk, during the installation of Windows 7 or Windows Server 2008 R2, we mount this VHD file as a separate partition of the disk, install the OS into it ... That's it ... We can repeat the procedure M, no, better N times, until the space runs out on " parent" partition and install as many OS as you like. At the same time, both the OS installed on the "parent" partition and the OS in others. VHD will remain untouched.
The prospects, as you understand, are colossal, both for ensuring accelerated deployment, and for ensuring fault tolerance and dynamic load distribution using the same virtualization. Now any virtual machine in need of increased hardware resources can be transferred to a "physical" state by simply redirecting the physical host loader to a file. VHD of this virtual machine, and vice versa - any OS running on a physical host can be immediately turned into a virtual one. The prospects are tempting... Up to the imminent implementation of "Rise of the Machines" and "The Matrix"... 🙂
Well, now - to the point ... Theory without practice is empty ... Let's say you have a modest PC or laptop at hand, on the hard disk of which there is only one C: partition, and it has 50GB of free space. You want to install Windows 7 beta here, but at the same time keep the same Windows installed on the disk Vista.
So, Windows installation 7 or Windows Server 2008 R2 on VHD. It's simple:
- Download the desired image of Windows 7
- We write the "downloaded" image. ISO to disc or (very useful for netbooks)
- We boot our PC from the received disk / USB
- We confirm the installation, select the language and edition, agree with the license and all that ... We are not afraid, everything will be fine with your current system ...
- We reach the step of the installation wizard, where we are asked to select or create the disk partition on which Windows 7 will be installed.
And now attention! We follow the instructions ... Trick!
Press the key combination Shift + F10, the wizard starts the command CMD line. EXE. In the CMD window. EXE, launch the Diskpart program. We wait a bit and get the DISKPART> prompt
The next step is to create the file itself. VHD, the future disk for installing a new instance of Windows 7, selecting and mounting this file as a “real” disk from the point of view of the installation wizard.
At the DISKPART> prompt, enter the command
Create vdisk file="C:Win7.vhd" type=FIXED maximum=30720
This command creates a file. VHD on drive C: with the name Win7.vhd (drive, location folder and file name depend only on your system and imagination), the maximum size of the future virtual disk is defined as 30GB, with the type. A VHD is defined as "fixed size", i.e. the file will initially occupy 30GB on the "parent" file system. This will provide better performance and less chance of crashes, because if you specify the type as "dynamically expandable" (type=EXPANDABLE), then, firstly, it will require additional disk operations as the actual size of the .VHD increases, and secondly, if “suddenly” the space on the parent partition runs out before such a file reaches its maximum size, then no one is responsible for the consequences for the OS using this file 🙂 On the other hand, 30GB of disk space is more than enough to install the system, especially since the user's files can be stored on the file system of a "physical" drive, which will also be accessible by the OS installed on it. vhd. And here the dynamic type allows you to save disk space. The choice, as they say, is yours. For a more complete acquaintance with the parameters of create vdisk, I recommend that you get acquainted by running the command in the DISKPART> line
After successful execution of the create command (the process can take a long time when creating a fixed file with a large maximum size value), we execute the following commands:
DISKPART> select vdisk file="C:Win7.vhd"
- the choice of created. VHD for further operations within the diskpart utility
– mount selected. VHD disk as a new disk in the system
After the successful completion of all operations with the Exit command, we exit the diskpart utility, and once again the Exit command is already at the CMD prompt. EXE to close the command line.
We returned to the installation wizard window with the choice of a disk for installing Windows 7. In it, click the Refresh button located under the list of disks. We see our new disk, select it, click Next.
Everything, the process of installing Windows 7 on. The VHD disk we just created is gone... This will not only install a new OS, but also change the bootloader on the "physical" system partition to successfully start from. vhd. By the way, when installing Windows 7/Windows Server 2008 R2 on a "bare" machine, the installation wizard automatically creates on disk system partition in 200MB, on which the bootloader is placed, and a separate partition is created for the system itself.
And one more, far from idle, question. How to boot from an already existing VHD file in which Windows 7 is installed, for example, transferred from another PC. Everything is very simple - you need to change the bootmgr / bcdedit. exe on the system partition with versions taken from the already installed Windows 7. Note that this type of bootloader and the ease of replacing it is only supported for Windows Vista / Windows Server 2008, and with Windows XP you will have to tinker (dig in the direction of bootsect). Next, having received a bootloader from Windows 7 on the “physical” OS, we launch the “new” bcdedit, whose device and osdevice parameters now support values like vhd = C: Win7migrated. vhd. In general, it will look something like this: bcdedit / set (boot_record_GUID) device vhd=C:Win7migrated. vhd (for more details read the docs in networks). After such experiments, we reboot the system and see the bootloader menu, supplemented by a new item and transferring control to the transferred .VHD file
The other day I wanted to install and test the Windows 8 Release Preview without damaging the existing one without any extra steps, such as changing the partition structure on the disk. Previously, I was unable to install Windows 8 RP on VirtualBox, and had to look for an alternative. As it turned out, the output is extremely simple, Windows 8 supports installation on a VHD virtual disk. Support for this technology has been built in since Windows 7 and Windows Server 2008. I think it's unnecessary to delve into theory, a VHD virtual disk is a file that is created in an already existing file system of one of the current partitions. More in simple terms the current OS will treat the VHD file as a separate drive with its own partitions.
Installation:
All that is needed to install Windows on a virtual disk is, of course:
1. an image written to a disc or, best of all, to usb flash drive(speeds up the installation process).
Next, we reboot the computer with the prepared image and run the Windows 8 Setup Wizard.
2. In the Windows 8 Setup Wizard, we reach the option to select the installation mode and select a custom installation. In the next step, you will be prompted to select the drive where you want to install Windows 8.
3. At this step, press the key combination SHIFT + F10 and you will see a window command mode, in which we will create a VHD file for installation.
4. This is an important step, because the drive letters in the Windows 8 setup wizard will not be the letters you are used to. Commands DIR C: , DIR D: etc. will help you find the letter of the required partition for the future VHD disk - be guided by the free disk space that the DIR command displays.
5. Run the DISKPART utility. Run the command CREATE VDISK FILE=”D:\w8.vhd” type=FIXED maximum=40000 (where D: is the letter of your free disk determined in step 4)
6. Run the command SELECT VDISK FILE=”D:\w8.vhd”
7. ATTACH VDISK – the created virtual disk is mounted.
8. Exit command mode with the EXIT command
9. In the disk selection window of the Windows 8 Setup Wizard, click the Refresh button at the bottom left.
10. Select the new disk that appears as the installation disk and click "Next"
11. The wizard will continue installing Windows 8 to a virtual disk without affecting the structure of existing disks and data.
Conclusions:
By installing Windows 8 on a VHD virtual disk, the most important thing is that we didn’t damage anything, and we can use two (or more OSes at the same time). The only disadvantage of installing the OS using this method is, you guessed it, the declining performance of disk operations. But there are more advantages than disadvantages:
1. The possibility of peaceful coexistence of several Windows operating systems on one disk, or even installing several instances of Windows 8 - for testing, development.
2. Windows 8 installed in this mode on a virtual partition will see it as a regular C drive.
Tags: Windows 8, installation, vhd, virtual, disk,
4. Windows installation 7 to a virtual disk to a VHD file.
By installing the system on a virtual disk, in one VHD file, you get the following advantages compared to a conventional system:
You can make a copy of the operating system by simply copying the VHD file
You can test beta versions of programs without worrying about the system
You will be able to study the system, experiment with the registry, without fear of spoiling it.
1) Insert the installation Windows disk 7 into the drive, boot from it
2) Get to the step of the installation wizard, where you are asked to select or create the disk partition on which Windows 7 will be installed.
3) Press the key combination " Shift+F10".
This keyboard shortcut will give you access to command line. Type Diskpart in it and press Enter.
The command line will look like this: DISKPART>. This indicates that the DiskPart interpreter is running.
3) Enter the following command in DISKPART:
create vdisk file="E:\VHD\win7.vhd" type=expandable maximum=30000
It means - to create a win7.vhd file of extensible type, limit the maximum size to 30 Gigabytes. Replace E: with the name of the drive where you want to store the generated file.
4) Mount the VHD file so that it is available to the installer:
select vdisk file="E:\win7.vhd" attach vdisk
5) After the successful completion of all operations, type the command exit to exit the utility diskpart, and once again the command exit- already in the CMD.EXE prompt to close the command line.
6) You will find yourself in the window again Select partition to install.
7) Press the button Refresh, located under the list of disks and you will see your new disk
8) Since there are no sections on it yet, it will be written Unallocated disk space...
9) Select it and click Disk setup
10) Click on the " Create", specify the size of the section to be created and click the " Apply".
11) Once again make sure that you have selected the virtual disk you created and click Next, ignoring the warning: Unable to install Windows to disk...
The process of installing Windows 7 on a VHD partition will continue as if it were a normal logical partition. hard section disk. This will not only install a new OS, but also replace the bootloader on the "physical" system partition for a successful start from VHD. When installing Windows 7 on a "clean" system, the installation wizard will automatically create a 100MB system partition on the disk, on which the bootloader is placed, and will create a separate partition for the system itself.