Configuring Windows guest customization specification
This is a recommended way to configure the Windows guest customization specification. You can provide the attributes with metadata options.
About this task
Note:
To configure the Windows guest
customization specification, complete the following steps.- If you do not provide the network device attributes with metadata options, then the nova-compute service gets the network device attributes from the Neutron service. If both the metadata and Neutron service provide the network information, the metadata has higher priority to be used during the boot process.
Procedure
- Configure IBM® Cloud
Manager with OpenStack to use VMware nodes.
For instructions, see Deploying an all-in-one node with n VMware compute services.
- Install VMware tools on
the virtual machine and then convert it to a template on vCenter.
For instructions, see Installing and Configuring VMware Tools.
- Get the template by using the VMware discovery
service. Here is an example of the template.
[root@icm ~]# nova image-show win2008_yang_vmwaretools +---------------------------------+-------------------------------------------------------------------------------------+ | Property | Value | +---------------------------------+-------------------------------------------------------------------------------------+ | OS-EXT-IMG-SIZE:size | 32212254720 | | created | 2015-04-09T07:52:15Z | | id | 3f8b3e95-e259-4630-be43-685855f2530c | | metadata hw_vif_model | VirtualE1000 | | metadata size | 32212254720 | | metadata template_guestfullname | Microsoft Windows Server 2008 R2 (64-bit) | | metadata template_instanceuuid | 50322ee5-1f64-ee64-ef83-85791bc63a9d | | metadata template_name | win2008_yang_vmwaretools | | metadata template_uuid | 42327351-93d3-6152-be49-a755ac6e5583 | | metadata vCenter_ip | 10.9.1.42 | | metadata vmware_adaptertype | lsiLogicsas | | metadata vmware_disktype | preallocated | | metadata vmware_ostype | windows7Server64Guest | | metadata vmware_path | http://10.9.1.42/datastore-1/win2008_yang_vmwaretools/win2008_yang_vmwaretools.vmtx | | metadata vmware_template | True | | minDisk | 0 | | minRam | 0 | | name | win2008_yang_vmwaretools | | progress | 100 | | status | ACTIVE | | updated | 2015-04-09T07:52:16Z | +---------------------------------+-------------------------------------------------------------------------------------+ [root@icm ~]# - Create the net and subnet in OpenStack.
Note: DHCP is disabled.For example:
neutron net-create br-int neutron subnet-create --disable-dhcp br-int 10.9.2.0/24 neutron subnet-create --disable-dhcp --dns-nameserver 10.9.7.11 --dns-nameserver 10.9.7.12 br-int 10.9.7.0/24 # neutron subnet-show 53a64fa6-2155-476c-96e6-a362aa9b7886 +-------------------+--------------------------------------------+ | Field | Value | +-------------------+--------------------------------------------+ | allocation_pools | {"start": "10.9.2.2", "end": "10.9.2.254"} | | cidr | 10.9.2.0/24 | | dns_nameservers | | | enable_dhcp | False | | gateway_ip | 10.9.2.1 | | host_routes | | | id | 53a64fa6-2155-476c-96e6-a362aa9b7886 | | ip_version | 4 | | ipv6_address_mode | | | ipv6_ra_mode | | | name | | | network_id | 69a9931e-628e-4e91-ac5c-33259d7e0231 | | tenant_id | 39f2f357038f47dbb63f84af56ef8213 | +-------------------+--------------------------------------------+ [root@icm ~]# neutron subnet-show e505d6aa-19d6-4b95-82d1-d6c26bd938df +-------------------+--------------------------------------------+ | Field | Value | +-------------------+--------------------------------------------+ | allocation_pools | {"start": "10.9.3.2", "end": "10.9.3.254"} | | cidr | 10.9.3.0/24 | | dns_nameservers | | | enable_dhcp | False | | gateway_ip | 10.9.3.1 | | host_routes | | | id | e505d6aa-19d6-4b95-82d1-d6c26bd938df | | ip_version | 4 | | ipv6_address_mode | | | ipv6_ra_mode | | | name | | | network_id | fc3d5271-8477-4e47-8443-27e89c979e3e | | tenant_id | 39f2f357038f47dbb63f84af56ef8213 | +-------------------+--------------------------------------------+ [root@icm ~]# - Start the instance with [--metadata key=value]
When you start the instance, you can provide the following metadata key.
windows.timezone windows.workgroup windows.domain.name windows.domain.user windows.domain.password windows.computername windows.organization windows.productkey windows.username change.sid windows.admin.password dns.suffix networkdevice.%s.dns1 networkdevice.%s.dns2 networkdevice.%s.ipaddress networkdevice.%s.netmask networkdevice.%s.gateway1 networkdevice.%s.gateway2 networkdevice.%s.primaryWINS networkdevice.%s.secondaryWINSFor the windows.workgroup that the virtual machine should join, if this value is supplied, then the windows.domain* options are ignored.
- Review an example for starting an instance. Starting an instance without the network device information by using metadata options:
nova --flavor 3 --image 99504080-e08d-4cd2-a1b8-84725c1863d9 --meta administrator.password=passw1rd --nic net-id=adc40cf9-528c-4a9e-b450-1fb90e384b01,v4-fixed-ip=10.9.7.113 yang113-w12-createImageStarting an instance with the network device information by using metadata options:nova boot --flavor 3 --image 99504080-e08d-4cd2-a1b8-84725c1863d9 --meta change.sid=true --meta windows.workgroup=WORKGROUP --meta windows.computername=computerN --meta windows.organization=ibm.com --meta windows.username=ibm --meta windows.timezone=90 --meta dns.suffix=ibm.com --meta windows.admin.password=passw1rd --meta networkdevice.adapter1.dns1=10.9.6.12 --meta networkdevice.adapter1.dns2=10.9.6.13 --meta networkdevice.adapter1.ipaddress=10.9.6.111 --meta networkdevice.adapter1.netmask=255.255.255.0 --meta networkdevice.adapter1.gateway1=10.9.6.1 --meta networkdevice.adapter1.gateway2=10.9.6.2 --meta networkdevice.adapter1.primaryWINS=10.9.6.200 --meta networkdevice.adapter1.secondaryWINS=10.9.6.201 --meta networkdevice.adapter2.dns1=10.9.7.22 --meta networkdevice.adapter2.dns2=10.9.7.23 --meta networkdevice.adapter2.ipaddress=10.9.7.211 --meta networkdevice.adapter2.netmask=255.255.255.0 --meta networkdevice.adapter2.gateway1=10.9.7.1 --meta networkdevice.adapter2.gateway2=10.9.7.2 --meta networkdevice.adapter2.primaryWINS=10.9.7.200 --meta networkdevice.adapter2.secondaryWINS=10.9.7.201 --nic net-id=46fd34b3-19c4-402b-b502-8e554f842960,v4-fixed-ip=10.9.6.111 --nic net-id=adc40cf9-528c-4a9e-b450-1fb90e384b01,v4-fixed-ip=10.9.7.211 yang111-211-w12Note:- %s stands for the network device name. For example, adapter1, adapter2.
- If you plan to provide the network information by using metadata, then dns, ipaddress, netmask, and gateway must be specified together. Otherwise, add dns-nameserver, when you create the subnet. Then, the dns, ipaddress, netmask, and gateway are supplied by Neutron.
- The default value of change.sid is true, when change.sid is not specified.
- For more information about time zones, see Index numbers for TimeZone (http://unattended.sourceforge.net/timezones.php).
- The windows.computername attribute must follow the host name rules. If a value for windows.computername is not provided, the compute name (host name of the VirtualMachine) by default uses the instance name. In this case, the instance name also must comply with the host name rules. Check the computername rules on the Microsoft website: https://support.microsoft.com/en-us/kb/909264.