Hyper-V Usage

最後更新: 2017-02-13

介紹

 

 


Windows Hyper-V Server 2012

 

  • Hyper-V 3.0:Server 2012
  • Hyper-V 2.0:Server 2008 R2
  • Hyper-V 1.0:Server 2008

Software:

Hyper-V Server <= 免費 (比正常Server Core更加精簡的版本)

Feature:

  • Failover Clustering
  • Live Migration
  • Dynamic Memory
  • Hyper-V Replica

Enable Hyper-V

Control Panel -> Programs and Features

Enable Remote Management on Hyper-V Server 2012

To configure computers running Hyper-V Server in different domains

On the computer running Hyper-V Server, add names to the local administrator account for users who want to be able to manage the server remotely.

On the remote computer, add the computer running Hyper-V Server as a trusted host by using the following Windows PowerShell cmdlet: Set-Item WSMan:\localhost\Client\TrustedHosts -Value <RemoteServerName> -Concatenate, where RemoteServerName is the name of the computer running Hyper-V Server that you want to manage.

From the remote computer, connect to the computer running Hyper-V Server by using Server Manager or Hyper-V Manager. Use an account that has local administrative rights. No further configuration is required.

To change the time zone, run "Set-Date"

international settings, run "control intl.cpl"

"Hyper-V Manager"

右手邊有

* "New"
* "Virtual Switch Manager"
* "Hyper-V Setting"

"New"

Generation 1

Generation 2 (at least s2012 | win8)

"Use Dynamic Memory"

"Hyper-V Setting"

"Virtual Hard Desks": C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks

"Virtual Machines": C:\ProgramData\Microsoft\Windows\Hyper-V

"Virtual Switch Manager"

 * "Virtual Switch Manager"

Network

physical nic
* click "Hyper-V Extensible Vitual Switch"
* 無 set ip

vEthernet (host ip here)
* 無 click "Hyper-V Extensible Vitual Switch"
* 有 ip

Network Adapter

Advanced Features:

Right Click "VM"

Connect... => console

在 VM 的 setting 裡

"Inspect" = Virtual Hard Disk Properties (查看 size )

 


Linux Integration Services Version 4.0 for Hyper-V

 

# Download:

https://www.microsoft.com/en-us/download/details.aspx?id=46842

# Install:

Mount the ISO Image file. mount /dev/cdrom/media

Run INSTALL.sh under Linux Integration Services CD's RHEL63 Folder. /media/install.sh

# Verifying

modinfo hv_vmbus

all kernel modules (hv_vmbus, hv_netvsc, hv_storvsc, hv_blkvsc, and hv_utils).

lsmod | grep hv

 

 


Deleting VM(Unregister VM)

 

To do this, make sure there are no snapshots. delete the VM from using the HyperV MMC, it will not delete the VHD file.

(If we delete the VM from the Hyper V manager, the .vmcx files will be deleted. Only VHD(x) file leaves. )

From the Hyper-V Management console, delete the VM.  Or you can use PowerShell.

Deleting a VM performs what you seem to be calling 'unregister'.  

It does not delete the VM's files. It simply makes the VM no longer visible to the Hyper-V Manager.

The export will contain the VM's definition (vmcx and such).

After the export completes, then you can delete the original from Hyper-V manager.

 


Troubleshoot

 

Error 1:

Cluster resource 'Virtual Machine test' of type 'Virtual Machine' in clustered role 'test' failed.
The error code was '0x5aa' ('Insufficient system resources exist to complete the requested service.').

Ans 1:

修改 net work 後, 有 Interface 不見了.

 

 

 

Creative Commons license icon Creative Commons license icon