Closed akshya-github closed 6 years ago
@akshya-github, thanks for reporting. Is it possible for you to post the output of salt-cloud -l debug -p vmware-Win2K8 vmware-Win2K8
?
@jfindlay, Sure...Please find the attachment. err.txt
I am getting desired output for these commands:
salt-cloud --query salt-cloud --list-locations my-vsphere-config
This means I am able to connect "vSphere ESXi" Server.
@akshya-github, thanks for the extra information. Ping @nmadhok.
@akshya-github Change your driver to vmware
instead of vsphere
in your provider configuration. The vsphere
driver is no longer supported and will be removed in Salt Carbon release. Looking at your logs:
[WARNING ] /usr/lib/python2.7/site-packages/salt/cloud/clouds/vsphere.py:143: DeprecationWarning: The vsphere driver is deprecated in favor of the vmware driver and will be removed in Salt Carbon. Please convert your vsphere provider configs to use the vmware driver.
The traceback confirms that it's trying to use the vsphere
driver which uses a deprecated and unsupported library (pysphere) instead of using the vmware
driver:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/vsphere.py", line 311, in create
template = conn.get_vm_by_name(vm_['image'])
File "/usr/lib/python2.7/site-packages/pysphere/vi_server.py", line 323, in get_vm_by_name
FaultTypes.OBJECT_NOT_FOUND)
Here's documentation on how to use the vmware
cloud driver:
https://docs.saltstack.com/en/latest/topics/cloud/vmware.html
https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.vmware.html
@nmadhok, I have changed driver to 'vmware', Now I am not able to connect vSphere server.
Provider file looks like:
my-vsphere-config: driver: vmware user: 'root' password: 'Admin@123' url: 'https://192.168.8.28:443/sdk' esxi_host_user: 'root' esxi_host_password: 'Admin@123' esxi_host_ssl_thumbprint: '1E:3D:48:38:C1:FC:1D:9D:2C:B8:A7:08:A7:84:12:F8:59:B4:29:32'
Provider is: VMware vSphere 5 Hypervisor
I have tried with different urls like:
url: 'https://192.168.8.28:443/' https://192.168.8.28:9443/admin-app https://192.168.8.28:9443/vsphere-client
@akshya-github The document I listed before clearly lists an example for how providers config file should look like:
vcenter01:
driver: vmware
user: 'DOMAIN\user'
password: 'verybadpass'
url: 'vcenter01.domain.com'
protocol: 'https'
port: 443
In your case it should be the following (protocol https and port 443 are the defaults):
my-vmware-config:
driver: vmware
user: 'root'
password: 'Admin@123'
url: '192.168.8.28'
Thanks Bro,
A little error is still there: [ERROR ] There was a profile error: argument of type 'NoneType' is not iterable
can you please help me..!!
Error:
Error creating Test2: (vmodl.fault.NotSupported) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'The operation is not supported on the object.',
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) []
}
Need to look at the debug log. Looks like you are trying to do a clone operation on an ESXi which is only supported through a vCenter.
Yes....OK !! Can I create vm without cloning, using iso image. Basically, I am trying to create vm using salt-cloud on vmware vSphere 5.
What should be the profile options? When I remove clonefrom option, It throws an error: [ERROR ] The required 'clonefrom' configuration setting is missing from the 'my-vm' profile, which is configured under the 'my-vsphere-config' alias. Error: There was a profile error: Failed to deploy VM
@nmadhok, Below are the log:
[root@localhost cloud.profiles.d]# salt-cloud -p vmware-Win2K12 test18 -l debug [DEBUG ] Reading configuration from /etc/salt/cloud [DEBUG ] Reading configuration from /etc/salt/master [DEBUG ] Using cached minion ID from /etc/salt/minion_id: 192.168.9.139 [DEBUG ] Key 'file_ignore_glob' with value None has an invalid type of NoneType, a list is required for this value [DEBUG ] Missing configuration file: /etc/salt/cloud.providers [DEBUG ] Including configuration from '/etc/salt/cloud.providers.d/vsphere.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.providers.d/vsphere.conf [DEBUG ] Missing configuration file: /etc/salt/cloud.profiles [DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/mynewvm.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/mynewvm.conf [DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/new.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/new.conf [DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/vsphere.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/vsphere.conf [DEBUG ] Including configuration from '/etc/salt/cloud.profiles.d/vsphere_BKP.conf' [DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/vsphere_BKP.conf [DEBUG ] Configuration file path: /etc/salt/cloud [WARNING ] Insecure logging configuration detected! Sensitive data may be logged. [INFO ] salt-cloud starting [DEBUG ] Could not LazyLoad parallels.avail_sizes [DEBUG ] LazyLoaded parallels.avail_locations [DEBUG ] LazyLoaded proxmox.avail_sizes [DEBUG ] Could not LazyLoad saltify.destroy [DEBUG ] Could not LazyLoad saltify.avail_sizes [DEBUG ] Could not LazyLoad saltify.avail_images [DEBUG ] Could not LazyLoad saltify.avail_locations [DEBUG ] LazyLoaded rackspace.reboot [DEBUG ] LazyLoaded openstack.list_locations [DEBUG ] LazyLoaded rackspace.list_locations [DEBUG ] Could not LazyLoad vmware.optimize_providers [DEBUG ] The 'vmware' cloud driver is unable to be optimized. [DEBUG ] Could not LazyLoad parallels.avail_sizes [DEBUG ] LazyLoaded parallels.avail_locations [DEBUG ] LazyLoaded proxmox.avail_sizes [DEBUG ] Could not LazyLoad saltify.destroy [DEBUG ] Could not LazyLoad saltify.avail_sizes [DEBUG ] Could not LazyLoad saltify.avail_images [DEBUG ] Could not LazyLoad saltify.avail_locations [DEBUG ] LazyLoaded rackspace.reboot [DEBUG ] LazyLoaded openstack.list_locations [DEBUG ] LazyLoaded rackspace.list_locations [DEBUG ] Generating minion keys for 'test18' [ERROR ] The required 'clonefrom' configuration setting is missing from the 'vmware-Win2K12' profile, which is configured under the 'my-vsphere-config' alias. Error: There was a profile error: Failed to deploy VM
@akshya-github The ability to create VM's from scratch was recently added to Salt develop branch. I don't see that it was back ported to 2015.8 branch. You can either test it by installing Salt from latest develop branch or you can wait for the next Salt release.
Thanks @nmadhok !!.. I am able to create VM using clonefrom option in VMWARE VCenter, but VM is not getting IP specified in Profile and getiing apipa address. How i can resolve this?
I am cloning from sysprep Windows server 2012r2. This is the network setting in profile:
network: Network adapter 1: name: VM Network switch_type: standard ip: 192.168.139.23 gateway: 192.168.139.1 subnet_mask: 255.255.255.0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Description of Issue/Question
using this command to create VM:
here: vmware-Win2K8 is profile name.
Setup
Want to create VM on: VMWARE vSphere ESXi 5.5.
In Provider configuration:
Profile configuration:-
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report