2015-01-16 1 views
3

이것은 다른 게시물을 기반으로합니다. clone vm change network identityVMware VIM IPv6

VM을 빌드 할 때 IPv6 주소를 설정해야합니다. 속성을 찾았지만 값을 설정하지 않습니다. TYPENAME :

$FirstNic.Adapter.IpV6Spec = New-Object VMware.Vim.CustomizationIPSettingsIpV6AddressSpec 
$FirstNic.Adapter.IpV6Spec.Ip = New-Object VMware.Vim.CustomizationFixedIpV6 
$FirstNic.Adapter.IpV6Spec.Ip.IpAddress = "::1" 

The property 'IpAddress' cannot be found on this object. Verify that the property exists and can be set. At line:33 char:4 + $FirstNic.Adapter.IpV6Spec.Ip.IpAddress = "::1" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

는 회원이다 VMware.Vim.CustomizationFixedIpV6

Name MemberType Definition 
----  ---------- ---------- 
Equals  Method  bool Equals(System.Object obj) 
GetHashCode  Method  int GetHashCode() 
GetType  Method  type GetType() 
ToString Method  string ToString() 
DynamicProperty Property VMware.Vim.DynamicProperty[] DynamicProperty {get;set;} 
DynamicType  Property string DynamicType {get;set;} 
IpAddress Property string IpAddress {get;set;} 
SubnetMask Property int SubnetMask {get;set;} 

답변

0

빠른 테스트가 VMware.Vim.CustomizationFixedIpV6에 해당 속성을 설정하면 바로 작동하는 것 같다 있음을 나타냅니다. 그 후 VMware.Vim.CustomizationIPSettingsIpV6AddressSpec 개체에 할당하면 작동하는 것으로 보입니다.

> $ip = New-Object vmware.vim.customizationfixedipv6 
> $ip.IpAddress = "::1" 
> $ipv6spec = new-object vmware.vim.customizationipsettingsipv6addressspec 
> $ipv6spec.ip = $ip 
> $ipv6spec.ip.ipaddress 
::1 
> $ipv6spec.ip.ipaddress = "::2" 
Property 'ipaddress' cannot be found on this object; make sure it exists and is settable 
At line:1 char:1 
+ $ipv6spec.ip.ipaddress = "::2" 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : InvalidOperation: (:) [], RuntimeException 
    + FullyQualifiedErrorId : PropertyAssignmentException 

그러나 VMware.Vim.CustomizationIPSettingsIpV6AddressSpecIp 속성은 그 유형으로 VMware.Vim.CustomizationFixedIpV6을하지 않는 것 같습니다. 대신 VMware.Vim.CustomizationIpV6Generator이 있습니다.

그래서 이것이 유형 지정/상속/기타인지 궁금합니다. 문제.

+0

내가 게시 할 작업의 일부가 있습니다. 그러나 게이트웨이 만 나타납니다. – user873577

+0

$ NIC = 새 객체 VMware.Vim.CustomizationAdapterMapping $ nic.Adapter = 새 객체 VMware.Vim.CustomizationIPSettings $ nic.Adapter.ip = 새 객체 VMware.Vim.CustomizationFixedIp $ nic.Adapter.ip. ipAddress = "192.168.1. $ _" $ nic.Adapter.subnetMask = "255.255.255.0" $ nic.Adapter.Image.Vp. :: $ _ " $ IPv6를 = 새로운 객체 vmware.Vim.CustomizationFixedIpV6 $ ipv6.IpAddress =":: $ _ " $ ipv6.SubnetMask = 29 $ nic.Adapter.ipV6Spec.Ip = $ IPv6를 $ item.Spec.nicSettingMap + = $ nic – user873577

+0

무슨 뜻입니까? 그 코드가 나에게 보여줘야 할 것이 무엇일까요? IPv6 게이트웨이가 IPv6 IpAddress와 같은 이유는 무엇입니까? –