Connect local disks in vmware. Standalone Hyper-V Virtual Hard Disk Creation Wizard

Hyper-V allows you to connect virtual hard disks not only immediately when creating a virtual machine, but also at any time later. You can connect later both the main disk, for example, with a previously installed guest OS, and any other virtual HDD– at least empty, at least with data. Virtual hard disks in VHDX and VHD formats that Hyper-V works with are created in the standard management utility Windows disks. But for Hyper-V to work, it is, of course, easier to create them using the hypervisor and immediately connect them to the desired virtual machine in a single process.

Below we will consider the process of connecting another, in addition to the main, virtual hard disk.

1. Using additional virtual hard disks

Another virtual hard disk, in addition to the main one, is connected, for example, if you need to increase the disk space inside the virtual machine. Two separate disk virtual machine will allow you to experiment with software, designed to work with several physical disks - HDD or SSD. The same disk as an additional one can be connected to several virtual machines, in order to provide all of them with access to the data stored on such a disk.

VHDX or VHD file additional disk can also be used as a two-way means of transferring data between a physical computer and virtual machines. Connecting and disconnecting virtual hard disks in Windows on a physical computer is done using commands in the context menu called up on the VHDX and VHD files in System Explorer. These are the “Connect” and “Extract” commands, respectively.

2. Selecting a controller when connecting an additional disk to a virtual machine

To connect the disk, the virtual machine must be turned off.

Select the desired virtual machine in the Hyper-V Manager window and open its parameters window. This can be done either from the context menu or by clicking the “Options” button on the right side of the window.

Connectivity virtual disks appears in the options window when selecting a disk controller. In our case, a generation 2 virtual machine was selected as an example, and these provide for connecting virtual disks only to the SCSI controller. Accordingly, when working with generation 2 virtual machines, in the parameters window, click on the “SCSI controller” equipment item. Next, select the connection object – “Hard disk”. And click “Add”.

Virtual Hyper-V machines Generation 1 works with virtual disks connected to both the SCSI controller and the IDE controller. To the last one in mandatory you need to connect virtual hard disks from which the guest Windows is booted. But additional hard drives can be connected to both the IDE controller and the SCSI controller. In terms of virtual machine performance, choosing a controller does not give anything. But you will still have to resort to choosing a SCSI controller if it becomes necessary to connect more than 4 disks to a generation 1 virtual machine (including the main one with the guest OS installed). You can connect only 2 drives to each of the 2 possible IDE channels. Total – 4. Whereas up to 256 virtual disks are connected to the virtual machine via the SCSI channel. Thus, each of the 4 SCSI controllers provides for connecting 64 disks. But generation 1 virtual machines cannot boot from disks connected to the SCSI controller.

In generation 1 virtual machines, we select a controller - SCSI or IDE - depending on the situation. Then we also select the connection object - “Hard disk”. Click “Add”.

Next steps will be approximately the same.

3. Connecting an existing VHDX and VHD disk to the virtual machine

After clicking the “Add” button, we will see a form for adding a VHDX disk for generation 2 virtual machines and a VHDX or VHD disk for generation 1 machines. Using the browse button in this form, you can add an existing VHD disk X or VHD. After opening it in the Explorer window, click the “Apply” button at the bottom of the options window.

And, in fact, that’s all – you can turn on and test the virtual machine.

4. Create a new VHDX and VHD disk and connect it to the virtual machine

To connect to a virtual machine new hard disk, more steps will be required - such a disk must be created using Hyper-V, then initialized and allocated disk space using guest Windows. Let's look at all this in detail.

In the form for adding VHDX and VHD disks in the virtual machine parameters, to create a new disk, click the “Create” button.

We will see the wizard's welcome window. Click “Next”.

The window for selecting a disk format - VHDX or VHD - will appear only when working with generation 1 virtual machines. Select the disk file format and click “Next”.

The VHDX disk file format for generation 2 virtual machines is provided by default. Therefore, creating a disk begins with choosing its type - fixed, dynamic, differential. For each type in this window there is a little information about their specificity. In our case, we selected dynamic type disk. Click “Next”.

We indicate the storage location of the disk file on the computer and give this disk a name. Click “Next”.

The new disk setup window provides not only for creating an empty disk with unallocated space, but also for creating a new disk and simultaneously copying the structure and data of other disks to it - physical hard drives and SSDs, as well as virtual VHDX and VHD disks. While content is being copied physical disk You cannot exclude individual disk partitions, folders or files. Therefore, this process with large volumes of disks will be painfully long.

In the case of copying the contents of physical or virtual hard disks, the created disk adopts their structure and, therefore, does not require initialization and allocation disk space a separate stage. Copying the contents of existing disks is not our case. In our case, we will select the first item and create an empty disk with the default size of 127 GB. Click “Next”.

The created disk will automatically appear among the SCSI or IDE controller devices and will be connected to the virtual machine.

But the new empty disk still needs to be initialized and its space allocated. We will return to consideration of this issue at the very end.

5. Operations with disks connected to a virtual machine

All disks connected to the virtual machine are managed in the settings window. For the selected disk, the following functions are available among SCSI or IDE controllers:

  • "Edit"– function that launches the wizard hard changes disk. This function compresses the disk, increases its space, converts the disk type to another (dynamic or fixed), as well as converts VHDX disk formats to VHD and vice versa;
  • "Check"– opening the hard drive properties window;
  • "Review"– replacing an existing VHDX or VHD disk file with another;
  • "Delete"– removing the disk.

Changes such as changing a hard drive file or deleting it must be applied using the Apply button at the bottom of the options window.

6. Setting the boot from an additional hard drive

If a guest OS is installed on an additional hard drive or one appeared there, for example, during experiments with disk cloning, a virtual machine with such a guest OS can be booted. To do this you need to install extra hard The disk is first in the queue of connected SCSI or IDE controllers.

In the virtual machine parameters, we first switch to the main hard drive, the one that was connected first. We change the position of its controller from 0 to 1.

Then we switch to the additional hard drive, for which we need to set the boot priority. We set the position of its controller from 1 to 0. Click the “Apply” button at the bottom.

That’s it – the virtual machine will boot from the additional disk. To get everything back, you need to go the other way.

7. Separate Hyper-V virtual hard disk creation wizard

Hyper-V includes a separate wizard for creating virtual hard disks in VHDX and VHD formats. With its help, disks can be created without simultaneously connecting to specific virtual machines. The wizard starts when you click New on the right side of the Hyper-V Manager window.

8. Initializing a new hard drive and allocating disk space

Finally, let's return to the final stage of connecting a new hard drive to a virtual machine - its initialization and distribution of disk space. To do this, we need a standard guest Windows disk management tool.

Let's start the virtual machine. In the operating system, open the disk management utility. It is available on Windows 8.1 and 10 systems in the context menu on the Start button.

In Windows 7, you can use the standard Run service. You need to press the Win+R keys, enter the command diskmgmt.msc in the “Run” service field and click “OK”.

Windows does not yet have access to the new hard drive. In the Disk Management utility window, we will see that the second disk, displayed as Disk 1, is not initialized.

As a rule, the process of connecting a new hard drive is automatically accompanied by the initialization window when you launch the Disk Management utility. If this does not happen, call on the new disk context menu and select “Initialize disk”.

In the initialization window, you need to select the disk partition style. For generation 2 virtual machines, this will be the second option - GPT style. And in the case of generation 1 virtual machines, you need to choose the first option - MBR. Click "Ok".

After initialization, we will see that the new hard drive is shown as unallocated space. Based on this space, you can form disk partitions. In our case, we will make do with a single section. On the unallocated disk space, call up the context menu and select “Create a simple volume.”

The new virtual machine hard drive is now partitioned.

It is visible in the system explorer and you can put data on it.

Have a great day!

Users working with hypervisors may sometimes encounter the need to gain access to the virtual machine disk (VM) from the environment of the host system - the main operating system (OS) installed on a physical disk. For example, when you need to copy data to a guest OS, which does not support the installation of add-ons. Or when errors occur in the hypervisor that make impossible to start VM, and the necessary files are hidden inside it.


How to connect a VM disk for display on the host system? Below we will look at how virtual hard disk files used by hypervisors are connected in the Windows host environment. Hyper-V And VMware .

The article will offer options for accessing VM disks:

Allowing you to write data to their files;
not providing for recording, but only offering the ability to read and copy information in case it needs to be retrieved.

To be able to write data to a file virtual disk (i.e., so that files moved from the host system appear in the guest OS) The VM in its hypervisor environment must be turned off. It is turned off, not suspended. Not every hypervisor program reminds you of this subtlety.

1. Connecting VHD and VHDX using Windows

VHD And VHDX– virtual disk file formats used by built-in Windows 8.1 And 10 hypervisor Hyper-V– in the environment of these versions of the host system can be mounted using its own regular funds.

On the disk file, call the context menu and select .

And we look for sections of the new device in the explorer. This option provides both reading and writing of data. To remove a disc VM from the host system, call the context menu on any of its displayed sections and click .

2. Connecting VMDK using VMware Workstation

VMDK And VHD– disc formats VM with whom he works BY VMware- can be connected for display in the host Windows Explorer using program tools VMware Workstation . Its mount facilities provide both reading and writing of data. Open the parameters of the desired VM. On the tab "Equipment" click on the left HDD, click the button on the right "Map". The Connect a Disk Wizard window will appear. Here we select the desired section, focusing on its size. In our case it is system Windows partition. Uncheck the box to open in read-only mode. And we press "OK".

Important nuance: when opening system partitions guest OS installed on virtual GPT -disks, in the wizard window you must select not the partition with the installed OS (section C in the case of guest Windows) , and the one preceding it MSR - section with size usually 16 or 128 MB. Of course, if MSR -section is in the structure EFI -systems. He will not be there in every case.

The mounted partition will open in the host system's Explorer. To disable it, close it open in the conductor (or file manager) . And we go to the same place where we mounted it - to the parameters VM. But now we press the button "Disable".

3. Converting VDI to VHD using VirtualBox

Does not allow you to mount disks using your own means VM to access them from the environment Windows host system. But among her arsenal there is a converter that can convert disks native format VDI V VHD , VMDK and other types. And, for example, VHD-file in the host environment Windows 8.1 or 10 can be opened using regular means OS. Moreover, if necessary, continue working with VM, it can be recreated on the basis of an already converted disk VHD. In the window switch to section "Tools". Click on the disk you want VM, in the context menu select "Copy".

Here's an important point: Count "File name" need to be cleaned up - remove the extension from the name ".vdi". And track below so that the type is set "VHD". Click "Save".

And now - "Copy".

We subsequently open the converted file using Explorer.

We remove it from the host system by extracting it, as shown in clause 1 of the article.

However, if the secondary goal of resuscitation VM is not prosecuted if we are talking only about seizure valuable information from file VDI, it is easier to resort to the following two options for resolving the issue.

Free version can mount to read and write data Various types virtual disks, including hard disks that they work with VMVMDK , VDI , VHD , VHDX. In the program window, click "Quick Mount", specify the path to the disk file VM, open.

We remove it using the delete option in the context menu on the icon of the mounted device.

5. Plugin for Total Commander

Working with Total Commander only for viewing and copying valuable data stored on the disk VM, you don't need to go far. The issue is resolved within this file manager using a plugin for it. The primary mission of this plugin is to provide access to Windows environment to partitions and media with file systems used in Linux. And unsupported by Windows. In addition to the main features, the plugin can mount disks for reading VM formats VMDK , VDI , VHD , VHDX And HDS .

Unpack it inside Total Commander. We answer "Yes" to offer installation. We follow the steps of the installation wizard.

Let's launch Total Commander (basically) on behalf of the administrator. Switch to . Let's go to .

VM. Click "Next".

In the overview we indicate the folder VM. Then we will see all the disks connected to the machine. We can uncheck unnecessary ones if there are several of them. And click "Mount".

Press Ctrl + R to update the contents of the panels Total Commander. And we will see the mounted partitions of the virtual disk.

We copy its contents as usual for Total Commander way - the button below or the F5 key. The plugin does not provide a procedure for unmounting disks. Yes, it is not needed as such: just restart it Total Commander.

So, we have created and launched a virtual computer running a virtual hard disk. But an isolated computer these days already looks somehow archaic, and naturally there is a desire to exchange files both with the base computer and with other computers (both real and, perhaps, virtual). Let's look at how to satisfy this desire. In this section we will describe working with physical disks, and in the next section we will talk about accessing the local network.

18.7.1 Necessary precautions.

Before describing the procedures for connecting a physical disk to virtual computer, we need to talk about some of the dangers that await us here. The documentation posted on the VMware website includes the following warning:

"Physical disk support is an advanced feature of VMware and can only be used by users who are already familiar with the product. To become familiar with the product, you must, at a minimum, create and configure a virtual machine with a virtual disk and install an operating system onto it. As for loading an operating system previously installed on a physical disk into a virtual computer, it may not work for some configurations. hardware and operating system."

This does not mean that connecting real disks to a virtual machine is in principle impossible. You just need to make this connection correctly, taking certain precautions.

The main danger associated with using real disks is simultaneous access to one hard disk partition from multiple operating systems. All operating systems were created with full control over the computer in mind. Since each OS has no knowledge of the other, when two operating systems try to write or read operations on the same partition of a real disk, data loss or even destruction can occur. The fact is that VMware does not (yet) regulate the disk operations of the underlying operating system. Therefore, a real disk partition should not be simultaneously used (mounted) in the OS on the host computer and in the virtual machine.

Therefore, you must make sure that the host OS does not “see” the partition that the virtual desktop OS is running on. The safety of working with real disks is determined by the fulfillment of this requirement. Therefore, before connecting a real disk partition to a virtual machine, unmount it in the base OS.

If you need to exchange data between the base and virtual computers, you can connect the same disk to these computers alternately. To do this, you will first have to mount the partition in the base Linux OS, transfer the necessary data to it, unmount the disk, start VMware and the virtual computer, copy the data to the virtual disk, turn off VMware and give the disk to the base OS again. An alternative to this obviously inconvenient method of transferring data is to use the OS networking capabilities, such as the Samba or NFS protocols, to transfer data from one computer to another. These features will be discussed in the next section, but for now let's learn how to connect a physical disk (or a partition on such a disk) to an already created virtual computer as second hard disk.

18.7.2 Connecting a physical disk to a virtual computer

So, we have a virtual computer running Windows OS (in one of its variants), launched from the C: virtual drive. And let's assume we have a hard drive partition (let it be the /dev/hda2 partition, to be specific), which was formatted in the same OS from Microsoft (in FAT, FAT32 or NTFS, depending on the OS version). Naturally, there is a desire to access this section from a virtual computer. Let's try to connect this partition as drive D: of the virtual computer. But before describing specific connection procedures, let's give some preliminary information.

Disk permissions

The hard drives that you want to access from the virtual computer (and in particular the drives that run operating systems, as will be described in section 18.7.3), must be both readable and writable for users running the VMware system. On most Linux distributions, physical disks (such as /dev/hda, /dev/hdb) belong to the disk group. If this is the case, then you can simply add VMware system users to this group. You can also simply change the owner of the device. Please carefully consider security issues when choosing how to share disks. The simplest and most acceptable way on a personal computer is to give VMware system users access to all physical devices/dev/hd, which must be accessed from virtual machines, and in matters of access control, rely on VMware configuration files.

Physical disk description file

In order for a VMware system to access physical disks, a small file must be created for each of those disks containing some of the data that the virtual machine needs to access the partitions of this disk. In the VMware documentation, such a file is called "Safe Raw Disk", we will call it a physical disk description file. Here is a typical example of such a file for a computer running Windows NT and Linux:

DEVICE /dev/hda

# Partition type: MBR

RDONLY 0 62

# Partition type: HPFS/NTFS

ACCESS 63 8193149

# Partition type: Linux swap

NO_ACCESS 8193150 8466254

As you can see, this file contains information about the disk partitions, the type of file system in each partition (though only in the comment line) and the access rights to the partition. This information can be presented in the form of a table. 18.1.

Table 18.1. Information from the disk description file

If operating system, running on a virtual computer, attempts to perform read or write operations in sectors to which access is prohibited in such a physical disk description file, the VMware system will present the user with a dialog box in which it will require you to confirm the eligibility of this operation or refuse to perform it.

Connecting a physical disk to a virtual computer. With what has just been said in mind, you can begin connecting the physical disk to the virtual computer, for which you need to perform the following steps.

    Add the user under whose name you will run the VMware system to the disk group (this is done by editing the /etc/group file as a superuser).

    Make sure that the physical disk you are connecting is not mounted on the file system base computer.

    To create a physical disk description file, start the VMware system, select the desired configuration (but do not power on the virtual computer), and open the menu Settings| Configuration Editor, then click on the “+” icon to the left of the indication of IDE or SCSI drives.

    Find the line that indicates that the corresponding disk is not installed ("Not installed"), and set the highlight (cursor) to it. Let's say, for example, that you selected the string " P.S. Not Installed" among IDE disks. This means that the virtual machine will consider that this physical disk is connected as a second disk (slave) to the first controller (primary IDE controller). Accordingly, if in the group of SCSI disks there is a line "SCSI 0:1 Not Installed ", then for a virtual computer such a disk will have number 1 on the SCSI controller. If the "Not Installed" line is not found, then 4 IDE disks (or, accordingly, 7 SCSI disks) are already connected to your virtual computer, i.e. e. the limit has been reached. In this case, remove any disk using the button Remove.

    In field Device Type set (select) value Raw Disk.

    In field Name Enter a name for the physical device description file (for example, raw_hda.dsk).

    Click the button Create Raw Disk.

    In the input line that appears, enter the name of the physical disk (not a partition, but a disk, for example, /dev/hda for an IDE disk or /dev/sda for SCSI).

    A new window will appear containing a list of partitions available on this physical disk. For each partition, specify the access rights that the virtual machine will have in this partition. For each section you need to select one of the following options for setting rights:

    No Access - the virtual computer will not be able to read or write to this section. This option is selected only if it is necessary to control attempts at (unauthorized) access to this section.

    Read/Write - the virtual computer will be able to both read and write to this section. This option is selected only for those partitions that contain file systems native to the virtual computer operating system.

    Read-Only - the virtual computer will only be able to read from this section. Choose this option for all other partitions on the disk.

    Click the button Save. In some cases, a window may then appear informing you that two partitions on the disk overlap (have common sectors) and, therefore, must be set to the same access rights. This generally shouldn’t happen (and this situation needs to be corrected somehow), but if such a window does appear, you can set the same rights for both sections and click on the button again Save. The physical disk description file will be written to the directory where the rest of your virtual machine files are stored (something like /home/user1/vmware/nt4 / ).

    Click the button Install in order to attach the selected physical disk to the virtual computer. As with a virtual disk, you can set a physical disk to one of three possible modes operation: “with recording” (“Persistent”), “without recording” (“Nonpersistent”) or “with delayed recording” (“Undoable”).

After completing all these steps you can boot the OS in the virtual computer and you should see in your system new disk.

If you later need to disconnect a physical disk from the virtual computer for some reason (for example, in order to mount it on the host computer's file system), open the Configuration Editor ( Settings | Configuration Editor) and click on screen button Remove on the tab corresponding to this disk. On the same tab there is a button Edit Raw Disk..., with which you can adjust access rights to disk partitions determined by the physical disk file. You will have to turn to this option in cases where, say, you replaced a physical disk in your computer or modified its partitioning.

18.7.3 Booting the OS from a physical disk

Since it is possible to connect physical disks to a virtual computer, the question naturally arises: “Is it possible to boot the operating system of a virtual computer from a physical disk?” This question is especially relevant in the case when, before installing the VMware system, both one of the Windows operating systems and the Linux OS (in which you run the virtual computer) were already installed on different partitions on your computer. And the answer to this question is positive. The VMware system can even use boot loaders that were previously installed on the computer. The boot loader will run inside VMware and allow the user to select the operating system to run on the virtual computer. You can reinstall, for example, Windows 98 on a physical disk, and then run it in a virtual machine.

VMware currently (in version 2) only supports booting from real disks for IDE devices(while the file simulating the virtual disk can be located on either an IDE or a SCSI disk) (Note 26). . However, using an OS installed on a physical disk comes with some peculiarities that must be taken into account when setting up both OSes (even apart from the dangers that we already discussed in section 18.7.1). The first of these features is the need to create a separate hardware profile for Windows.

OS Microsoft(including Windows 95, Windows 98, Windows NT 4.0) use the concept of a "hardware profile". Each profile defines a certain set of devices known to the system. If two or more profiles are specified, the user is prompted to select one of them during the boot process.

Windows 95, Windows 98, and Windows 2000 use Plug and Play to check that actual devices match the specified hardware profile during the boot process. A mismatch causes the mechanism to detect devices and install drivers to start again. Although this process completes successfully in most cases, it will significantly slow down your download.

Windows NT does not support Plug and Play and uses a hardware profile to initialize devices. A discrepancy between the actual dialing and what is specified in the profile causes an error message to be displayed and the device to be disconnected (more precisely, not connected).

And since the configuration of the virtual computer is different from the configuration physical computer, then to launch one of the operating systems Windows family You need to create a separate hardware profile inside the virtual machine to simplify the boot process. Therefore, the process of creating and configuring a virtual machine that uses an operating system installed on one of the physical disk partitions has some differences from the process of creating a virtual machine that works with virtual disks.

    First, install the operating system that you want to run on the virtual computer on the physical IDE disk of the real computer (of course, this is not necessary if the OS has already been installed previously).

    Before starting the VMware system, boot this OS (meaning one of the Windows OS family) to real computer and create two hardware profiles. To do this, open Control Panel, enter the menu System and switch to the tab Equipment profile. There is already at least one profile there, which is called “Current (Original configuration)”. Click the button Copy and name the new profile, for example, "Virtual Machine".

    For Windows NT/2000 only: Disable some devices in the newly created profile. To do this, open a window Devices V Control panels, select the device you want to disconnect and press the soft key Stop. You need to disable the audio card, MIDI, joystick, Ethernet card and other network, as well as USB devices(you only need to disable them in a newly created profile, don’t miss it). If you have installed and intend to run Windows 95 or Windows 98 in a virtual computer, then you do not need to disconnect the devices. They will be disabled automatically at the OS boot stage.

    Reboot your computer and start Linux.

    Make sure that the physical disk partition that is allocated for use by the virtual desktop operating system is not mounted on Linux. Delete or comment out the corresponding line in the /etc/fstab file, and in this session, unmount the partition from the command line.

    Set access rights sections of hard disk. How to do this was discussed in section 18.7.2. The simplest and most acceptable way is to include VMware system users in the disk group, thereby giving access to all physical devices /dev/hd that contain operating systems or the bootloader, and rely on VMware configuration files for access control issues. This provides the boot loader with access to the files needed to start operating systems (for example, LILO requires read access to the /boot directory in Linux section to run operating systems other than Linux, which may be located on other partitions or other drives).

    Configure the virtual machine for the newly installed operating system (using Configuration Wizard or Configuration editor). When performing the configuration procedure for real disks, consider the following points:

    When selecting the virtual disk type, select the "Existing Partition" option.

    For the disk partition in which the corresponding operating system is located, set the “read/write” option (to do this, click on the on-screen button Partitions... in the Configuration Editor window corresponding to the desired hard drive). It is recommended that the Master boot record (MBR) and other partitions on the disk(s) be given read only permission, since, for example, the LILO boot loader must be able to read the file from the /boot directory in order to boot the operating system. Linux partition.

Note

Let us remind you once again that if you allow a virtual machine to write to a partition that is simultaneously mounted on the Linux file system, there may be unintended consequences ( cm. section 18.7.1). Therefore, before allowing a virtual machine to write to a partition, make sure that the partition is not mounted in Linux on the host machine.

    Launch VMware and check the created configuration. To do this you can give the command vmware , Where is the full path to configuration file, created by the Configuration Wizard (the names of such files end in .cfg). You can also just give the command vmware and open the configuration file through the menu File | Open. After that open the menu Settings | Configuration Editor and make sure that at least one physical disk ("Raw Disk") is specified in the IDE disk configuration and the name of the raw disk description file is entered for it. The names of these files are usually of the form .hda.dsk, .hdb.dsk, etc. You can check other configuration options, especially those for which you have accepted default values, for example you can change the amount of memory allocated to the virtual machine.

    Power on the virtual machine (button Power On). The VMware system starts Phoenix BIOS, after which the master boot record is read boot disk(master boot record - MBR). If you have configured your system using multiple IDE drives, VMware BIOS will try to boot the OS from these disks in the following sequence:

    • Secondary Master

    If you have multiple SCSI drives, VMware BIOS boots in order of SCSI device numbers.

    If your system is configured with both SCSI and IDE drives, VMware BIOS first tries to boot the OS from SCSI devices, then from IDE disks. Devices are polled in the same sequence as mentioned above.

    The order in which disks are accessed during the boot process can be changed through the menu Boot in the Phoenix BIOS of the virtual machine. To do this, after turning on the VMware power, press the key to get to the BIOS menu.

    If you have multiple operating systems installed (multiple boot), then select the desired OS in the same way as you did before installing the VMware system (from the menu offered at boot).

    During the OS boot process, a configuration selection menu should appear (unless, of course, you have created a separate hardware profile for the virtual computer):

    Enter the number corresponding to the virtual computer configuration (in the situation shown in Figure 18.6, this will be 2) and press the key . As you continue to boot into the OS, you will experience some error messages and additional delays in the boot process, but this is normal.

Rice. 18.6. Selecting a hardware profile for a virtual computer

    For Windows 2000 only: After you start Windows 2000 (as an OS on a virtual computer) you will see a dialog box New equipment found (Found New Hardware), in which it is proposed to install new driver for video controller. There is no need to do this. Click the button Cancel(Cancel) to close the dialog box and refuse the proposed restart of the computer. Windows 2000 will automatically detect and install the driver for network card AMD PCnet PCI Ethernet. After this, you must install the VMware Tools for Windows package (on the virtual computer). After the SVGA driver from VMware, Inc. is installed. (included with VMware Tools for Windows), reboot Windows 2000 in the virtual machine. After rebooting, you can change the screen resolution of the virtual machine ( Screen Properties | Options).

    If you want to use a sound card while running Windows 2000 on a virtual computer, read the instructions for connecting it on the VMware website.

    For Windows 95/98 only: you will see a dialog box New hardware discovered. Windows will prompt you to search for drivers for it. For most devices, drivers are already installed during system installation, however, in some cases you may need an installation CDROM disk. Windows will ask you to reboot several times while installing new drivers.

    In some Windows cases may not recognize CD-ROM drive when prompted to search for drivers. In this case, it is recommended to try to specify the directory C:\windows\system as the path to the driver \ or refuse to install the driver for this specific device. Connecting such devices can be done later.

    When Windows installs virtual devices and drivers for them, you need to remove non-working devices from the system that correspond to real hardware. To do this, use the tab System | Devices V Control panels. Select the non-working device and click the button Delete. Just keep in mind that you must first select the hardware profile that matches the virtual computer so as not to remove devices that work when the OS starts from the physical disk.

    For Windows NT only: After the OS boot completes, review the boot log to identify any devices that did not connect. You can disable them in the "Virtual Desktop" profile using the device manager ( Control Panel | Devices).

    Make sure that all virtual devices are working correctly, especially network adapters. Remember that the hardware composition of a virtual computer differs significantly from the set of devices actually available on your physical computer.

    For Windows 95/98 only: If any virtual device missing, use the option Control Panel | Add new equipment.

    Install VMware Tools (if you haven't already done so). The VMware tools package will run in both hardware configurations, but will have some effect on operation only in the “Virtual Computer” configuration.

Notes

1. The next time you boot Windows on a real computer using a hardware profile that matches the actual hardware configuration, some virtual devices may appear in the device list. You can remove or disable them using the same method described above for disabling real devices from the hardware profile corresponding to the virtual computer.

2. If, when configuring a virtual computer, you set the real disk to “undoable” mode, then when you reboot the OS, you will either have to agree that all disk operations performed inside the virtual machine will be saved on the disk, or refuse to save changes.. More about disk operating modes see in section 18.4.

V. Kostromin (kos at rus-linux dot net) - 18.7. Connecting physical disks to a virtual computer

is not just a functional hypervisor that allows you to test virtual operating systems inside the main system installed on the computer, it is a program with a flexible approach to setting up virtual machine hardware. Thus, the VMware Workstation hypervisor works, in particular, with the virtual disk format own production- these are files like ".vmdk". Virtual disks VMDK They use physical disk space very sparingly, and on a real computer, a virtual machine can actually take up about half as much space as the disk space available to the guest operating system. But even with these significant savings, VMware Workstation users can initially create virtual machines with minimum volume hard drive. Indeed, in the future, if necessary, this volume can be increased in the hypervisor settings. Likewise, unused virtual space can be compressed.

1. An alternative to expanding virtual machine disk space

If there is not enough initially specified hard disk space, you can connect an additional virtual hard disk to the virtual machine as an alternative to expanding the existing disk space. This can be either an existing disk or a newly created one. Moreover, it can also be like a VMDK format virtual disk VMware programs Workstation and a universal virtual disk (file with extension ".vhd").

Be it a VMDK-format virtual disk, be it a universal VHD disk, additionally created for one virtual machine hard disks can then be connected to other machines, moved to other computer devices. Virtual disks VHD and VMDK can be connected not only to virtual VMware machines Workstation, but also to machines. If you connect a VHD disk inside the main operating system, it will appear as a separate partition, and all its contents will be accessible from the system explorer or file manager.

How to connect to existing car VMware Workstation additional virtual hard disk? How can I then remove it if it is no longer needed? We will consider these questions below.

2. Creating and connecting an additional disk

To attach an additional virtual hard disk to a virtual machine, it must be turned off (if it is in a suspended state). In the information window about it, click the button to change settings.

In the first tab "Equipment" move to section "HDD". And click the button below "Add". To use it you will need administrator rights.

The Add New Hardware Wizard will launch, where the hard drive will be visible in the first position. Without changing anything, press "Further".

We leave the preset SCSI parameter. Click "Further".

In the disk selection window, we can use the second item to specify the path to an existing virtual disk - a VMDK or VHD file, or we can create a new disk. In our case, we will create a new virtual disk, so we will leave the preset first item. Click "Further".

Set the size of the virtual disk and select the option to save it in one file. It's more convenient option for further movement or connection of the VMDK disk and the only one possible for the VHD disk. Click "Further".

Let's get to the window for specifying the name and path of the virtual disk. VMware Workstation stamps its own by default technical names files created devices, however, if long-term work is planned with the virtual disk in the future, it is better to call it more convenient name. A memorable name when removing an additional disk will also prevent it from being confused with the main disk, and thereby not disrupt the operation of the virtual machine. To create a virtual disk own format VMDK VMware Workstation is configured automatically, so at the end of the name of the created disk we will see the default file extension ".vmdk". Using the browse button, you can change the preset location folder, which is the storage folder of the configured virtual machine. Disk being created does not have to be in the same folder as the virtual machine itself. The virtual disk file can be located anywhere, even on removable media.

If you need a universal VHD disk, its expansion ".vhd" must be added manually after the name. Having decided on the type and storage location of the virtual disk, click "Ready".

That's it - the virtual hard disk has been created and can be seen in the list of virtual machine equipment near the main disk. Click "OK" to exit VMware Workstation settings.

3. Initialization of an additional disk by the guest operating system

Let's start the virtual machine.

The connected disk, of course, will not yet be visible in the explorer window or file manager of the guest operating system. Like a new physical hard drive, the operating system sees a newly created virtual disk as unallocated space, space without a partition structure. Let's fix this and initialize the connected disk using the example of guest Windows 8.1 using its standard tools. In a running guest Windows system call disk management utility. In Windows 8.1 and 10, it is available in the context menu on the button "Start".

On Windows 7 and above earlier versions systems you can run this utility in a universal way using the command "Run". Press the keys Win+R, enter the command « diskmgmt.msc", click "OK».

The standard Windows disk management utility will automatically see the new hard drive and offer to initialize it. It is unlikely that in the case of a virtual disk there will be a need for the advantages of style GPT partitions, therefore, in the initialization start window that appears, we leave the MBR boot record set by default. Click "OK".

Next, let’s return to the utility window and see a new hard drive with unallocated space appear there. Call up the context menu on this unallocated space and click "Create Simple Volume".

The Create Volume (Disk Partition) Wizard will start. Click "Further".

We leave the entire volume of the virtual disk untouched if there is no need to divide it into two (or more) partitions. If you need several disk partitions, you must first specify the size of the first partition, and then repeat the entire volume creation procedure with the remaining unallocated space. In our case, we will create a single section. Click " Further».

In the next window we can only change the volume label. Click "Further".

That's it - click "Ready".

The newly initialized disk will be formatted.

It will then automatically open in a Windows Explorer window.

4. Disabling an additional drive

To disconnect an additional disk from a virtual machine, it must be in the off state, as when connected. In the virtual machine information window, click the change settings button.

Click on the hard drive to be removed in the tab "Equipment". The main thing is not to confuse it with the main virtual hard drive, on which the guest operating system is installed. If the path to the physical location of the virtual hard disk file is forgotten, you can see it in the first column on the right. Click the button at the bottom of the window "Delete".

Click "OK" to close the settings window.

That's it - the disk is disconnected from the virtual machine. But he, or rather, his working file, naturally, did not disappear anywhere from the physical computer. If the virtual disk is no longer needed, you can find it in the storage folder and delete the VMDK or VHD file itself.

Did this article help you?

When using the system VirtualBox virtualization Virtual disks are most often used. They allow you to flexibly allocate disk space and allocate much more disk space than you actually have. However, using a physical disk in VirtualBox has at least one clear advantage - speed. In addition, from a real disk, if desired, the operating system can be run both in a virtual machine and on real hardware.

The very first thing you need to do is create a partition on your hard drive, or connect another hard drive with which the virtual machine will work.

After this, you need to create a special virtual disk that will work with the physical disk.

Creating a virtual disk pointing to a physical one

Here is an example for a real physical disk that will be used as a virtual machine disk.

On Linux this is done with the command:

VBoxManage internalcommands createrawvmdk -filename drive.vmdk -rawdisk /dev/sdb

You may need superuser privileges to run this command. This way we will get a drive.vmdk file that will point to the /dev/sdb drive connected to the physical machine.

On Windows this will look slightly different. The physical disk is indicated slightly differently there, but the meaning will be absolutely identical:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename C:\VMs\testvm\drive.vmdk -rawdisk \\.\PHYSICALDRIVE1

Connecting a disk to a virtual machine

Select the virtual machine, press Ctrl+S (or the Settings button), select “Storage” -> “Controller: SATA”, press left button from those below.

Select “Add Hard Disk" and in the dialog that appears, select the previously created hard drive:

And click “Open”. You may need to enable it first current user to a group that has read and write access to this device (the group can be called, for example, “disk”). Now we need to change the access mode. Open the menu “File” -> “Virtual Media Manager”. Select our disk and click the “Modify” button

Select the access mode “Writethrough”

After that, click “OK”, then “Close”. As bootable media In the virtual machine settings you can select the hard drive.

After this, you can start the virtual machine and install the operating system.

If you are using logical drive on which the operating system is already installed, the boot will most likely fail because the partition table will not be found during boot.