在 vSphere Client 中启用复制和粘贴
默认情况下,客户机操作系统和远程控制台之间的复制和粘贴操作处于停用状态。
要启用它:
- 浏览到 vSphere Client 清单中的虚拟机
- 右键单击虚拟机,然后单击编辑设置。
- 选择高级参数。
- 添加或编辑以下参数。
isolation.tools.copy.disable False
isolation.tools.paste.disable False
isolation.tools.setGUIOptions.enable True
这些选项将覆盖客户机操作系统的 VMware Tools 控制面板中所做的任何设置。
单击“确定”。
(可选)如果对配置参数进行了更改,请重新启动虚拟机。
使用 PowerCLI 批量启用
我想在所有后端虚拟机上启用它,但不在我的其他虚拟机(DMZ 等)上启用它。为此,我使用了以下 PowerCLI 脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| $esxi = "lab01.mdb-lab.com"
$credential = Get-Credential
$tgtVLAN = 'VLAN70','VLAN80','VLAN120'
Connect-VIServer $esxi -Credential $credential
Get-VM |where {
(Get-NetworkAdapter -VM $_ | %{$tgtVLAN -contains $_.NetworkName}) -contains $true} | %{
New-AdvancedSetting $_ -Name isolation.tools.copy.disable -Value false -Confirm:$false -Force:$true
New-AdvancedSetting $_ -Name isolation.tools.paste.disable -Value false -Confirm:$false -Force:$true
}
}
Disconnect-VIServer $esxi -Confirm:$false
|