fog-vcloud-director 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fecb036e9cb11d4dabbf7a934bc67b8768fc6ae5
4
- data.tar.gz: b9481b191e098adc5c9cf1378068284a018464e0
3
+ metadata.gz: 81dd83d944ff89e23d09e6d194d43041f3547042
4
+ data.tar.gz: 01f09f9189ed5c159c84b24cc819d24af0b617cc
5
5
  SHA512:
6
- metadata.gz: 732ff64ea93e1bfac34ed74b5c1b3bcf7c02aa2737a271c71e746b7cde811ff5035ba86e5278e7aef5921678f073beb3e39012eaeea75af0dec546fc4ca80fe7
7
- data.tar.gz: '039caa4d78931f630e316576961792ce4c86af674f68e5f7306a0e25df229b0ec92e524f5e6b239e9ee59594a92fa5194dcb9c9bdbf91bc493af56cf68b0bbda'
6
+ metadata.gz: dcd65ab7305961e0b987a16727dedd2dd21a15b2ff348f2c20ddaf731e40c98ce3cee8d54109dca653bc6a9f32b54e3debfad9e8552dc31de70c9a5a075ab11f
7
+ data.tar.gz: 0f915c7bba4bee362b25dae083eab16c5ddb60be39a9bff8cb3ad73d77fe05aa0d83d273d98ecec4160a815614e618d65cd80c07a4645a44da548ddb9e829fa5
@@ -37,3 +37,86 @@ service.post_reconfigure_vm(
37
37
  **NOTE**: If you omit `:hardware` key from options, then reconfiguration request will be
38
38
  simplified by omitting entire VirtualHardwareSection from payload XML. So please prefer
39
39
  omitting the `:hardware` key over passing `:hardware => {}` in order to reduce network load.
40
+
41
+ ## Network Connection Reconfiguration Example
42
+ This example demonstrates basic NIC connection customization that allows you to modify what
43
+ vApp network is each VM's NIC connected to, among with other NIC options.
44
+
45
+ ```ruby
46
+ service = Fog::Compute::VcloudDirector.new(...)
47
+
48
+ # Obtain nokogiri-parsed XML representation of VM.
49
+ xml = service.get_vapp('vm-8dc9990c-a55a-418e-8e21-5942a20b93ef', :parser => 'xml').body
50
+
51
+ # Update NIC#0.
52
+ options = {
53
+ :networks => [
54
+ {
55
+ :idx => 0, # pick NIC#0 to apply below modifications to
56
+
57
+ :new_idx => 5, # assign new NIC virtual index to 5 (instead 0)
58
+ :name => 'Localhost', # plug NIC to vApp network called 'Localhost'
59
+ :mac => '11:22:33:44:55:66', # set NIC MAC address
60
+ :mode => 'MANUAL', # set NIC IP address allocation mode
61
+ :ip => '1.2.3.4', # set NIC IP address
62
+ :type => 'PCNet32', # set NIC adapter type
63
+ :primary => true, # make this NIC primary
64
+ :needs => true, # mark NIC as 'needs customization'
65
+ :connected => true # mark NIC as connected
66
+ }
67
+ ]
68
+ }
69
+
70
+ # Actually perform customization.
71
+ service.post_reconfigure_vm(
72
+ 'vm-8dc9990c-a55a-418e-8e21-5942a20b93ef',
73
+ xml,
74
+ options
75
+ )
76
+ ```
77
+
78
+ ### Unplugging NIC
79
+ Please use vCloud's reserved network name `'none'` to unplug NIC from all vApp networks.
80
+ NIC will be marked as disconnected automatically:
81
+
82
+ ```ruby
83
+ options = {
84
+ :networks => [
85
+ {
86
+ :idx => 0,
87
+ :name => 'none'
88
+ }
89
+ ]
90
+ }
91
+ ```
92
+
93
+ ### Removing NIC
94
+ Please set `:new_idx => -1` to remove NIC from the VM.
95
+
96
+ ```ruby
97
+ options = {
98
+ :networks => [
99
+ {
100
+ :idx => 0,
101
+ :new_idx => -1
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ ### Adding a New NIC
108
+ Please set `:idx => nil` to add a new NIC and specify its index with `:new_idx` key. You can
109
+ specify any other NIC options as well, of course, like what vApp network to plug the new NIC
110
+ to:
111
+
112
+ ```ruby
113
+ options = {
114
+ :networks => [
115
+ {
116
+ :idx => nil,
117
+ :new_idx => 1,
118
+ :name => 'Localhost'
119
+ }
120
+ ]
121
+ }
122
+ ```
@@ -251,6 +251,19 @@ module Fog
251
251
  return 'bridged' unless mode && mode != 'isolated'
252
252
  mode
253
253
  end
254
+
255
+ def network_section_nic(xml, new_idx:, name: 'none', mac: nil, ip: nil, connected: true, mode: 'DHCP', type: nil, needs: nil)
256
+ attr = { :network => name }
257
+ attr[:needsCustomization] = needs unless needs.nil?
258
+ xml.NetworkConnection(attr) do
259
+ xml.NetworkConnectionIndex(new_idx) if new_idx
260
+ xml.IpAddress(ip) unless ip.nil?
261
+ xml.IsConnected(connected) unless connected.nil?
262
+ xml.MACAddress(mac) if mac
263
+ xml.IpAddressAllocationMode(mode) if mode
264
+ xml.NetworkAdapterType(type) if type
265
+ end
266
+ end
254
267
  end
255
268
  end
256
269
  end
@@ -7,6 +7,9 @@ module Fog
7
7
  class ReconfigureVm
8
8
  extend ComposeCommon
9
9
 
10
+ NETWORK_SECTION_ORDER = ['ovf:Info'] + %w(PrimaryNetworkConnectionIndex NetworkConnection Link)
11
+ NETWORK_CONNECTION_ORDER = %w(NetworkConnectionIndex IpAddress ExternalIpAddress IsConnected MACAddress IpAddressAllocationMode NetworkAdapterType).freeze
12
+
10
13
  class << self
11
14
  # Generates VM reconfiguration XML.
12
15
  #
@@ -17,13 +20,13 @@ module Fog
17
20
  def generate_xml(current, options)
18
21
  current.root['name'] = options[:name] if options[:name]
19
22
  current.at('Description').content = options[:description] if options[:description]
20
- if options[:hardware]
21
- update_virtual_hardware_section(current, options[:hardware])
22
- else
23
- # Remove entire VirtualHardwareSection if no hardware is modified.
24
- # https://pubs.vmware.com/vcd-80/index.jsp#com.vmware.vcloud.api.sp.doc_90/GUID-4759B018-86C2-4C91-8176-3EC73CD7122B.html
25
- current.at('//ovf:VirtualHardwareSection').remove
26
- end
23
+ # Remove entire section when no moification is required to improve performance, see
24
+ # https://pubs.vmware.com/vcd-80/index.jsp#com.vmware.vcloud.api.sp.doc_90/GUID-4759B018-86C2-4C91-8176-3EC73CD7122B.html
25
+ options[:hardware] ? update_virtual_hardware_section(current, options[:hardware]) : current.at('//ovf:VirtualHardwareSection').remove
26
+ options[:networks] ? update_network_connection_section(current, options[:networks]) : current.at('//xmlns:NetworkConnectionSection').remove
27
+ current.at('//ovf:OperatingSystemSection').remove # TODO(miha-plesko): support this type of customization
28
+ current.at('//xmlns:GuestCustomizationSection').remove # TODO(miha-plesko): support this type of customization
29
+
27
30
  current.to_xml
28
31
  end
29
32
 
@@ -36,6 +39,13 @@ module Fog
36
39
  array_wrap(hardware[:disk]).select { |d| d[:capacity_mb] == -1 }.each { |disk| remove_virtual_hardware_section_item_hdd(xml, id: disk[:id]) }
37
40
  end
38
41
 
42
+ # Apply desired NIC connection modifications to the original xml.
43
+ def update_network_connection_section(xml, networks)
44
+ array_wrap(networks).reject { |n| n[:new_idx] == -1 || n[:idx].nil? }.each { |nic| update_network_connection_section_by_index(xml, **nic) }
45
+ array_wrap(networks).select { |n| n[:new_idx] == -1 }.each { |nic| remove_network_connection_section_by_index(xml, :idx => nic[:idx]) }
46
+ array_wrap(networks).select { |n| n[:idx].nil? }.each { |nic| add_network_connection_section(xml, **nic) }
47
+ end
48
+
39
49
  def update_virtual_hardware_section_item_cpu(xml, num_cores: nil, cores_per_socket: nil, reservation: nil, limit: nil, weight: nil)
40
50
  update_virtual_hardware_section_item(xml, :type => 3) do |item|
41
51
  item.at('./rasd:VirtualQuantity').content = num_cores if num_cores
@@ -102,6 +112,75 @@ module Fog
102
112
  item = xml.at("//ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType = '#{type}' and rasd:InstanceID = '#{id}']")
103
113
  item.remove if item
104
114
  end
115
+
116
+ def update_network_connection_section_by_index(xml, idx:, name: nil, mac: nil, ip: nil, connected: nil, mode: nil, type: nil, needs: nil, new_idx: nil, primary: nil)
117
+ conn = xml.at("//xmlns:NetworkConnectionSection/xmlns:NetworkConnection[./xmlns:NetworkConnectionIndex = '#{idx}']")
118
+ conn['network'] = name if name
119
+ conn['needsCustomization'] = needs unless needs.nil?
120
+ leaf_at(conn, 'IpAddress', NETWORK_CONNECTION_ORDER).content = ip unless ip.nil?
121
+ leaf_at(conn, 'IpAddressAllocationMode', NETWORK_CONNECTION_ORDER).content = mode if mode
122
+ leaf_at(conn, 'IsConnected', NETWORK_CONNECTION_ORDER).content = connected unless connected.nil?
123
+ leaf_at(conn, 'MACAddress', NETWORK_CONNECTION_ORDER).content = mac if mac
124
+ leaf_at(conn, 'NetworkAdapterType', NETWORK_CONNECTION_ORDER).content = type if type
125
+ leaf_at(conn, 'NetworkConnectionIndex', NETWORK_CONNECTION_ORDER).content = new_idx if new_idx
126
+
127
+ set_primary_nic(xml, new_idx || idx) if primary
128
+ end
129
+
130
+ def remove_network_connection_section_by_index(xml, idx:)
131
+ conn = xml.at("//xmlns:NetworkConnectionSection/xmlns:NetworkConnection[./xmlns:NetworkConnectionIndex = '#{idx}']")
132
+ conn.remove if conn
133
+ end
134
+
135
+ def add_network_connection_section(xml, primary: nil, **nic)
136
+ nic.delete(:idx)
137
+ network_section = xml.at('//xmlns:NetworkConnectionSection')
138
+ network_section.add_namespace_definition('vcloud', 'http://www.vmware.com/vcloud/v1.5')
139
+ Nokogiri::XML::Builder.with(network_section) do |section|
140
+ network_section_nic(section, **nic)
141
+ end
142
+
143
+ # Move the new item to satisfy vCloud's sorting requirements.
144
+ item = network_section.at('./xmlns:NetworkConnection[last()]').remove
145
+ (previous = find_previous(network_section, 'NetworkConnection', NETWORK_SECTION_ORDER)) ? previous.after(item) : network_section.prepend_child(item)
146
+
147
+ set_primary_nic(xml, nic[:new_idx]) if primary
148
+ end
149
+
150
+ def set_primary_nic(xml, idx)
151
+ leaf_at(xml.at('//xmlns:NetworkConnectionSection'), 'PrimaryNetworkConnectionIndex', NETWORK_SECTION_ORDER).content = idx
152
+ end
153
+
154
+ # Find leaf element if present or create new one. Respect XML ordering when adding new.
155
+ # Arguments:
156
+ # - xml: parent xml whose child element are we updating/adding
157
+ # - leaf_name: child element name (without namespace)
158
+ # - order: list of child names in proper order
159
+ # - ns: leaf element's namespace
160
+ # Returns:
161
+ # - leaf element
162
+ def leaf_at(xml, leaf_name, order, ns: 'xmlns')
163
+ el = xml.at("./#{ns}:#{leaf_name}")
164
+ el || begin
165
+ el = Nokogiri::XML::Node.new(ns == 'xmlns' ? leaf_name : "#{ns}:#{leaf_name}", xml)
166
+ (previous = find_previous(xml, leaf_name, order)) ? previous.after(el) : xml.prepend_child(el)
167
+ el
168
+ end
169
+ end
170
+
171
+ # Finds previous sybling for a leaf_name in accordance with ordered list of child elements.
172
+ # Arguments:
173
+ # - xml: parent xml whose children are we checking
174
+ # - leaf_name: child element name that we want to find preceeding sybling for (without namespace)
175
+ # - order: list of child names in proper order
176
+ # Returns:
177
+ # - previous sybling element if found or nil
178
+ def find_previous(xml, leaf_name, order)
179
+ order.reduce(nil) do |res, curr_name|
180
+ break res if curr_name == leaf_name
181
+ xml.at(curr_name.include?(':') ? "./#{curr_name}" : "./xmlns:#{curr_name}") || res
182
+ end
183
+ end
105
184
  end
106
185
  end
107
186
  end
@@ -61,7 +61,12 @@ module Fog
61
61
  case name
62
62
  when 'OperatingSystemSection'
63
63
  @in_operating_system = true
64
- vm[:cores_per_socket] ||= 1 # VirtualHardwareSection was parsed if we're here and if no value was specified, we default to 1
64
+
65
+ # VirtualHardwareSection was parsed if we're here. Set missing values to defaults since
66
+ # repeatable parsing won't get them.
67
+ vm[:cores_per_socket] ||= 1
68
+ vm[:disks] ||= []
69
+ vm[:network_adapters] ||= []
65
70
  when 'HostResource'
66
71
  @current_host_resource = extract_attributes(attributes)
67
72
  when 'Connection'
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module VcloudDirector
3
- VERSION = "0.2.1".freeze
3
+ VERSION = "0.2.2".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,244 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Vm xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns10="http://www.vmware.com/vcloud/networkservice/common/1.0" xmlns:ns11="http://www.vmware.com/vcloud/networkservice/ipam/1.0" xmlns:ns12="http://www.vmware.com/vcloud/versions" xmlns:ns9="http://www.vmware.com/vcloud/networkservice/1.0" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" needsCustomization="true" nestedHypervisorEnabled="false" deployed="false" status="8" name="Databasy Machiny" id="urn:vcloud:vm:8dc9990c-a55a-418e-8e21-5942a20b93ef" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef" type="application/vnd.vmware.vcloud.vm+xml">
3
+ <Link rel="power:powerOn" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/power/action/powerOn" />
4
+ <Link rel="deploy" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/action/deploy" type="application/vnd.vmware.vcloud.deployVAppParams+xml" />
5
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef" type="application/vnd.vmware.vcloud.vm+xml" />
6
+ <Link rel="remove" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef" />
7
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/metadata" type="application/vnd.vmware.vcloud.metadata+xml" />
8
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/productSections/" type="application/vnd.vmware.vcloud.productSections+xml" />
9
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/metrics/historic" type="application/vnd.vmware.vcloud.metrics.historicUsageSpec+xml" />
10
+ <Link rel="metrics" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/metrics/historic" type="application/vnd.vmware.vcloud.metrics.historicUsageSpec+xml" />
11
+ <Link rel="screen:thumbnail" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/screen" />
12
+ <Link rel="media:insertMedia" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/media/action/insertMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" />
13
+ <Link rel="media:ejectMedia" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/media/action/ejectMedia" type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml" />
14
+ <Link rel="disk:attach" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/disk/action/attach" type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml" />
15
+ <Link rel="disk:detach" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/disk/action/detach" type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml" />
16
+ <Link rel="enable" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/action/enableNestedHypervisor" />
17
+ <Link rel="customizeAtNextPowerOn" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/action/customizeAtNextPowerOn" />
18
+ <Link rel="snapshot:create" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/action/createSnapshot" type="application/vnd.vmware.vcloud.createSnapshotParams+xml" />
19
+ <Link rel="reconfigureVm" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/action/reconfigureVm" name="Databasy Machiny" type="application/vnd.vmware.vcloud.vm+xml" />
20
+ <Link rel="up" href="https://10.12.0.18/api/vApp/vapp-fe8d013d-dd2f-4ac6-9e8a-3a4a18e0a62e" type="application/vnd.vmware.vcloud.vApp+xml" />
21
+ <Description>DB Description</Description>
22
+ <Tasks>
23
+ <Task cancelRequested="false" endTime="2018-05-21T15:31:14.265+02:00" expiryTime="2018-08-19T15:31:12.287+02:00" operation="Updated Virtual Machine Databasy Machiny(8dc9990c-a55a-418e-8e21-5942a20b93ef)" operationName="vappUpdateVm" serviceNamespace="com.vmware.vcloud" startTime="2018-05-21T15:31:12.287+02:00" status="error" name="task" id="urn:vcloud:task:b867159a-f0cd-4aec-8994-d59cc4110b6e" href="https://10.12.0.18/api/task/b867159a-f0cd-4aec-8994-d59cc4110b6e" type="application/vnd.vmware.vcloud.task+xml">
24
+ <Owner href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef" name="Databasy Machiny" type="application/vnd.vmware.vcloud.vm+xml" />
25
+ <Error majorErrorCode="400" message="[ 9c3afab2-07d4-440b-98ae-52824014c259 ] The VCD entity network &quot;RedHat Private network 42 3&quot; does not exist." minorErrorCode="BAD_REQUEST" />
26
+ <User href="https://10.12.0.18/api/admin/user/e0d6e74d-efde-49fe-b19f-ace7e55b68dd" name="redhat" type="application/vnd.vmware.admin.user+xml" />
27
+ <Organization href="https://10.12.0.18/api/org/8f03aa58-b618-4c32-836b-dc6b612ed3a4" name="RedHat" type="application/vnd.vmware.vcloud.org+xml" />
28
+ <Details>[ 9c3afab2-07d4-440b-98ae-52824014c259 ] The VCD entity network "RedHat Private network 42 3" does n...</Details>
29
+ </Task>
30
+ </Tasks>
31
+ <ovf:VirtualHardwareSection xmlns:ns13="http://www.vmware.com/vcloud/v1.5" ovf:transport="" ns13:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" ns13:href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/">
32
+ <ovf:Info>Virtual hardware requirements</ovf:Info>
33
+ <ovf:System>
34
+ <vssd:AutomaticRecoveryAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
35
+ <vssd:AutomaticShutdownAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
36
+ <vssd:AutomaticStartupAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
37
+ <vssd:AutomaticStartupActionDelay xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
38
+ <vssd:AutomaticStartupActionSequenceNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
39
+ <vssd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
40
+ <vssd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
41
+ <vssd:ConfigurationDataRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
42
+ <vssd:ConfigurationFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
43
+ <vssd:ConfigurationID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
44
+ <vssd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
45
+ <vssd:CreationTime xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
46
+ <vssd:Description xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
47
+ <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
48
+ <vssd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
49
+ <vssd:InstanceID>0</vssd:InstanceID>
50
+ <vssd:LogDataRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
51
+ <vssd:RecoveryFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
52
+ <vssd:SnapshotDataRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
53
+ <vssd:SuspendDataRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
54
+ <vssd:SwapFileDataRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
55
+ <vssd:VirtualSystemIdentifier>Databasy Machiny</vssd:VirtualSystemIdentifier>
56
+ <vssd:VirtualSystemType>vmx-13</vssd:VirtualSystemType>
57
+ </ovf:System>
58
+ <ovf:Item>
59
+ <rasd:Address>0</rasd:Address>
60
+ <rasd:AddressOnParent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
61
+ <rasd:AllocationUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
62
+ <rasd:AutomaticAllocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
63
+ <rasd:AutomaticDeallocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
64
+ <rasd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
65
+ <rasd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
66
+ <rasd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
67
+ <rasd:ConsumerVisibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
68
+ <rasd:Description>IDE Controller</rasd:Description>
69
+ <rasd:ElementName>IDE Controller 0</rasd:ElementName>
70
+ <rasd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
71
+ <rasd:InstanceID>1</rasd:InstanceID>
72
+ <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
73
+ <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
74
+ <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
75
+ <rasd:Parent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
76
+ <rasd:PoolID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
77
+ <rasd:Reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
78
+ <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
79
+ <rasd:ResourceType>5</rasd:ResourceType>
80
+ <rasd:VirtualQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
81
+ <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
82
+ <rasd:Weight xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
83
+ </ovf:Item>
84
+ <ovf:Item>
85
+ <rasd:Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
86
+ <rasd:AddressOnParent>0</rasd:AddressOnParent>
87
+ <rasd:AllocationUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
88
+ <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
89
+ <rasd:AutomaticDeallocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
90
+ <rasd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
91
+ <rasd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
92
+ <rasd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
93
+ <rasd:ConsumerVisibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
94
+ <rasd:Description>CD/DVD Drive</rasd:Description>
95
+ <rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
96
+ <rasd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
97
+ <rasd:HostResource />
98
+ <rasd:InstanceID>3000</rasd:InstanceID>
99
+ <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
100
+ <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
101
+ <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
102
+ <rasd:Parent>1</rasd:Parent>
103
+ <rasd:PoolID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
104
+ <rasd:Reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
105
+ <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
106
+ <rasd:ResourceType>15</rasd:ResourceType>
107
+ <rasd:VirtualQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
108
+ <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
109
+ <rasd:Weight xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
110
+ </ovf:Item>
111
+ <ovf:Item>
112
+ <rasd:Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
113
+ <rasd:AddressOnParent>0</rasd:AddressOnParent>
114
+ <rasd:AllocationUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
115
+ <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
116
+ <rasd:AutomaticDeallocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
117
+ <rasd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
118
+ <rasd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
119
+ <rasd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
120
+ <rasd:ConsumerVisibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
121
+ <rasd:Description>Floppy Drive</rasd:Description>
122
+ <rasd:ElementName>Floppy Drive 1</rasd:ElementName>
123
+ <rasd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
124
+ <rasd:HostResource />
125
+ <rasd:InstanceID>8000</rasd:InstanceID>
126
+ <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
127
+ <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
128
+ <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
129
+ <rasd:Parent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
130
+ <rasd:PoolID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
131
+ <rasd:Reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
132
+ <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
133
+ <rasd:ResourceType>14</rasd:ResourceType>
134
+ <rasd:VirtualQuantity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
135
+ <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
136
+ <rasd:Weight xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
137
+ </ovf:Item>
138
+ <ovf:Item ns13:type="application/vnd.vmware.vcloud.rasdItem+xml" ns13:href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/cpu">
139
+ <rasd:Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
140
+ <rasd:AddressOnParent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
141
+ <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
142
+ <rasd:AutomaticAllocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
143
+ <rasd:AutomaticDeallocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
144
+ <rasd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
145
+ <rasd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
146
+ <rasd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
147
+ <rasd:ConsumerVisibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
148
+ <rasd:Description>Number of Virtual CPUs</rasd:Description>
149
+ <rasd:ElementName>2 virtual CPU(s)</rasd:ElementName>
150
+ <rasd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
151
+ <rasd:InstanceID>2</rasd:InstanceID>
152
+ <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
153
+ <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
154
+ <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
155
+ <rasd:Parent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
156
+ <rasd:PoolID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
157
+ <rasd:Reservation>0</rasd:Reservation>
158
+ <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
159
+ <rasd:ResourceType>3</rasd:ResourceType>
160
+ <rasd:VirtualQuantity>2</rasd:VirtualQuantity>
161
+ <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
162
+ <rasd:Weight>0</rasd:Weight>
163
+ <vmw:CoresPerSocket ovf:required="false">1</vmw:CoresPerSocket>
164
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/cpu" type="application/vnd.vmware.vcloud.rasdItem+xml" />
165
+ </ovf:Item>
166
+ <ovf:Item ns13:type="application/vnd.vmware.vcloud.rasdItem+xml" ns13:href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/memory">
167
+ <rasd:Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
168
+ <rasd:AddressOnParent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
169
+ <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
170
+ <rasd:AutomaticAllocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
171
+ <rasd:AutomaticDeallocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
172
+ <rasd:Caption xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
173
+ <rasd:ChangeableType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
174
+ <rasd:ConfigurationName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
175
+ <rasd:ConsumerVisibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
176
+ <rasd:Description>Memory Size</rasd:Description>
177
+ <rasd:ElementName>1024 MB of memory</rasd:ElementName>
178
+ <rasd:Generation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
179
+ <rasd:InstanceID>3</rasd:InstanceID>
180
+ <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
181
+ <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
182
+ <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
183
+ <rasd:Parent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
184
+ <rasd:PoolID xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
185
+ <rasd:Reservation>0</rasd:Reservation>
186
+ <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
187
+ <rasd:ResourceType>4</rasd:ResourceType>
188
+ <rasd:VirtualQuantity>1024</rasd:VirtualQuantity>
189
+ <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
190
+ <rasd:Weight>0</rasd:Weight>
191
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/memory" type="application/vnd.vmware.vcloud.rasdItem+xml" />
192
+ </ovf:Item>
193
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/" type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" />
194
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/cpu" type="application/vnd.vmware.vcloud.rasdItem+xml" />
195
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/cpu" type="application/vnd.vmware.vcloud.rasdItem+xml" />
196
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/memory" type="application/vnd.vmware.vcloud.rasdItem+xml" />
197
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/memory" type="application/vnd.vmware.vcloud.rasdItem+xml" />
198
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/disks" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
199
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/disks" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
200
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/media" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
201
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/networkCards" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
202
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/networkCards" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
203
+ <Link rel="down" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/serialPorts" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
204
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/virtualHardwareSection/serialPorts" type="application/vnd.vmware.vcloud.rasdItemsList+xml" />
205
+ </ovf:VirtualHardwareSection>
206
+ <ovf:OperatingSystemSection xmlns:ns13="http://www.vmware.com/vcloud/v1.5" ovf:id="102" ns13:type="application/vnd.vmware.vcloud.operatingSystemSection+xml" vmw:osType="windows9Server64Guest" ns13:href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/operatingSystemSection/">
207
+ <ovf:Info>Specifies the operating system installed</ovf:Info>
208
+ <ovf:Description>Microsoft Windows Server 2016 (64-bit)</ovf:Description>
209
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/operatingSystemSection/" type="application/vnd.vmware.vcloud.operatingSystemSection+xml" />
210
+ </ovf:OperatingSystemSection>
211
+ <NetworkConnectionSection href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/networkConnectionSection/" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" ovf:required="false">
212
+ <ovf:Info>Specifies the available VM network connections</ovf:Info>
213
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/networkConnectionSection/" type="application/vnd.vmware.vcloud.networkConnectionSection+xml" />
214
+ </NetworkConnectionSection>
215
+ <GuestCustomizationSection href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/guestCustomizationSection/" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" ovf:required="false">
216
+ <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
217
+ <Enabled>false</Enabled>
218
+ <ChangeSid>true</ChangeSid>
219
+ <VirtualMachineId>8dc9990c-a55a-418e-8e21-5942a20b93ef</VirtualMachineId>
220
+ <JoinDomainEnabled>false</JoinDomainEnabled>
221
+ <UseOrgSettings>false</UseOrgSettings>
222
+ <AdminPasswordEnabled>true</AdminPasswordEnabled>
223
+ <AdminPasswordAuto>true</AdminPasswordAuto>
224
+ <AdminAutoLogonEnabled>false</AdminAutoLogonEnabled>
225
+ <AdminAutoLogonCount>0</AdminAutoLogonCount>
226
+ <ResetPasswordRequired>false</ResetPasswordRequired>
227
+ <ComputerName>DatabseVM</ComputerName>
228
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/guestCustomizationSection/" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml" />
229
+ </GuestCustomizationSection>
230
+ <RuntimeInfoSection xmlns:ns13="http://www.vmware.com/vcloud/v1.5" ns13:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml" ns13:href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/runtimeInfoSection">
231
+ <ovf:Info>Specifies Runtime info</ovf:Info>
232
+ </RuntimeInfoSection>
233
+ <SnapshotSection href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/snapshotSection" type="application/vnd.vmware.vcloud.snapshotSection+xml" ovf:required="false">
234
+ <ovf:Info>Snapshot information section</ovf:Info>
235
+ </SnapshotSection>
236
+ <DateCreated>2018-04-16T09:13:25.402+02:00</DateCreated>
237
+ <VAppScopedLocalId>af445e42-234d-41b2-9654-b36ac45ad71c</VAppScopedLocalId>
238
+ <VmCapabilities href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/vmCapabilities/" type="application/vnd.vmware.vcloud.vmCapabilitiesSection+xml">
239
+ <Link rel="edit" href="https://10.12.0.18/api/vApp/vm-8dc9990c-a55a-418e-8e21-5942a20b93ef/vmCapabilities/" type="application/vnd.vmware.vcloud.vmCapabilitiesSection+xml" />
240
+ <MemoryHotAddEnabled>false</MemoryHotAddEnabled>
241
+ <CpuHotAddEnabled>false</CpuHotAddEnabled>
242
+ </VmCapabilities>
243
+ <StorageProfile href="https://10.12.0.18/api/vdcStorageProfile/c87b2a7c-fcab-4f8a-bef3-3ece59366c38" name="*" type="application/vnd.vmware.vcloud.vdcStorageProfile+xml" />
244
+ </Vm>