You are configuring a virtual machine (VM) that is running on a Windows Server 2008 R2
host server. The primary virtual disk is connected to IDE Controller 0. You need to add a
virtual disk to the VM without shutting down the VM. What should you do?
A.
Add the virtual disk to IDE Controller 0.
B.
Add the virtual disk to IDE Controller 1.
C.
Add the virtual disk to an existing SCSI controller.
D.
Add a virtual network adapter to the VM. Attach an iSCSI disk to the VM through the
virtual network adapter.
Explanation:
A similar scenario can occur when a virtual machine is running out of disk space and you
want to add another virtual hard disk without shutting down the virtual machine. You can
attach a virtual hard disk to a virtual machine without shutting down that virtual machine only
if you attach it to the SCSI controller of the virtual machine. To attach a virtual hard disk to
an IDE controller, you must first shut down the virtual machine. Scenario prerequisites
To test this scenario, you will need the following:
Complete all steps in the main section of this guide. After you complete all the steps, you will
have a virtualization server and two virtual machines:Base Virtual Machine(used for creating
new virtual machines) and Imported Virtual Machine.
Imported Virtual Machine is running, Windows Server2008R2 is configured, and the
computer name for the virtual machine is VirtualMachine1.
Scenario steps
The following procedure explains how to create and attach a virtual hard disk to the
virtualization server, copy files to the virtual hard disk, and then attach the disk to a virtual
machine without shutting it down.
To create and connect a virtual hard disk without shutting down the virtual machine On the
virtualization server, create and attach a new virtual hard disk as follows:
Open Server Manager. ClickStart, point toAdministrative Tools, and then clickServer
Manager.
In Server Manager, in the console tree, underStorage, clickDisk Management.
After the disks on the virtualization server are listed in Disk Management, in the console tree,
rightclickDisk Management, and then clickCreate VHD. TheCreate and Attach Virtual Hard
Disk dialog box appears.
Type or browse to the location on the virtualization server where you want to create the
virtual hard disk, and type a name for it.
Type a size for the virtual hard disk. SelectMBfor megabytes,GBfor gigabytes, orTBfor
terabytes.
Select the format of the virtual hard disk: dynamically expanding or fixed size.
To create the virtual hard disk and attach it to the virtualization server, clickOK. After a few
moments, the new virtual hard disk is listed in Disk Management with the other disks that are
available on the virtualization server, and its state is listed asNot Initialized.
To initialize the virtual hard disk, right-click the virtual hard disk, and then clickInitialize Disk.
TheInitialize Disk dialog box appears.
On theInitialize Diskdialog box, clickOK. After a few moments, the new virtual hard disk is
initialized and listed asOnline.
To create a simple volume on the virtual hard disk, right-click the virtual hard disk, and then
clickNew Simple Volume. TheNew Simple Volume Wizardopens.
Follow the steps in theNew Simple Volume Wizardto create the simple volume, assign it a
drive letter, and perform a quick format. After a few moments, the volume in the virtual hard
disk is listed asHealthy, and a drive letter is assigned to it. The virtual hard disk is now
available on the virtualization server, and can be accessed to read and write information.
Optionally, copy files to the virtual hard disk so that they can be made available to the virtual
machine. Detach the virtual hard disk from the virtualization server, as follows:
In Disk Management, right-click the virtual hard disk, and then clickDetach VHD. TheDetach
Virtual Hard Disk dialog box appears.
To detach the virtual hard disk, ensure that theDelete the virtual hard disk file after removing
the diskcheck box is not selected, and then clickOK. After a few moments, the virtual hard
disk is no longer listed in Disk Management.Attach the virtual hard disk to the SCSI controller of theImported Virtual Machinevirtual
machine, as follows:
On the virtualization server, open Hyper-V Manager. ClickStart, point toAdministrative Tools,
and then click Hyper-V Manager.
In Hyper-V Manager, underVirtual Machines, right-clickImported Virtual Machine, and then
clickSettings.
TheSettings for Imported Virtual Machinedialog box appears.
In the left navigation pane, clickSCSI Controller.
InSCSI Controller, clickHard Drive, and then clickAdd. A hard drive is added to the SCSI
controller and is automatically selected in the left navigation pane.
In theHard Driveproperties, clickVirtual hard disk (.vhd) file, and then clickBrowse.
Browse to the location on the virtualization server where you created the virtual hard disk,
and then clickOpen.
To attach the virtual hard disk to the virtual machine, clickOK. The virtual hard disk is now
available on the virtual machine, and can be accessed to read and write information.
Optionally, you can detach a virtual hard disk from the virtual machine and attach it again to
the virtualization server, without turning off the virtual machine, as follows:
In Hyper-V Manager, underVirtual Machines, right-clickImported Virtual Machine, and then
clickSettings. TheSettings for Imported Virtual Machinedialog box appears.
In the left navigation pane, underSCSI Controller, click the virtual hard disk that you want to
detach from the virtual machine.
In theHard Driveproperties, clickRemove.
To detach the virtual hard disk from the virtual machine, clickOK. The virtual disk is no longer
attached to the virtual machine and can now be attached to the virtualization server.
On the virtualization server, open Server Manager. ClickStart, point toAdministrative Tools,
and then click Server Manager.
In Server Manager, in the console tree, underStorage, clickDisk Management.
After the disks on the virtualization server are listed in Disk Management, in the console tree,
rightclickDisk Management, and then clickAttach VHD. TheAttach Virtual Hard Diskdialog
box appears.
Type or browse to the location on the virtualization server where you created the virtual hard
disk, and then clickOK. After a few moments, the virtual hard disk is listed in Disk
Management with the other disks that are available on the virtualization server, and its state
is listed asOnline. The virtual hard disk is now available on the virtualization server, and can
be accessed to read and write information.