Trying to use Salt as a Proxmox cloud controller and having issues.

397 views
Skip to first unread message

Andy Bateman

unread,
Mar 31, 2015, 9:09:14 AM3/31/15
to salt-...@googlegroups.com
I want to use salt as a cloud controller for proxmox. I wanted to view storage options before creating a VM from an image. I am able to view images and run a query, but any commands that actually "do" things dont' work.

For instance:
salt64:~ # salt-cloud -p proxmox saltvmtest -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: salt64
[DEBUG   ] Missing configuration file: /etc/salt/cloud.providers
[DEBUG   ] Including configuration from '/etc/salt/cloud.providers.d/proxmox.conf'
[DEBUG   ] Reading configuration from /etc/salt/cloud.providers.d/proxmox.conf
[DEBUG   ] Missing configuration file: /etc/salt/cloud.profiles
[DEBUG   ] Including configuration from '/etc/salt/cloud.profiles.d/proxmox.conf'
[DEBUG   ] Reading configuration from /etc/salt/cloud.profiles.d/proxmox.conf
[DEBUG   ] Configuration file path: /etc/salt/cloud
[INFO    ] salt-cloud starting
[DEBUG   ] 'parallels.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'parallels.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'proxmox.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.destroy' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_images' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.reboot' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'openstack.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] The 'proxmox' cloud driver is unable to be optimized.
[DEBUG   ] 'parallels.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'parallels.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'proxmox.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.destroy' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_images' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.reboot' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'openstack.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] Getting resource: vms.. (filter: None)
[DEBUG   ] Not authenticated yet, doing that now..
[WARNING ] /usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:769: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
[DEBUG   ] Filter not given:
[DEBUG   ] Failed to execute 'proxmox.list_nodes()' while querying for running nodes: 'disk'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 2198, in run_parallel_map_providers_query
    cloud.clouds[data['fun']]()
  File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.py", line 415, in list_nodes
    ret[vm_name]['size'] = str(vm_details['config']['disk'])
KeyError: 'disk'
[DEBUG   ] Generating minion keys for 'saltvmtest'
[DEBUG   ] MasterEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Sending event - data = {'profile': 'proxmox', 'event': 'starting create', '_stamp': '2015-03-31T12:32:31.196244', 'name': 'saltvmtest', 'provider': 'proxmox:proxmox'}
[INFO    ] Creating Cloud VM saltvmtest
[ERROR   ] Error creating saltvmtest on PROXMOX

The following exception was thrown when trying to run the initial deployment: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.py", line 496, in create
    data = create_node(vm_)
  File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/proxmox.py", line 692, in create_node
    raise SaltCloudExecutionFailure
SaltCloudExecutionFailure
Error: There was a profile error: Failed to deploy VM


I tried looking at storage options, since I was seeing "KeyError: 'disk'", but even viewing storage doesn't work.

salt64:~ # salt-cloud -f show_storage proxmox name=blahblahserver
[DEBUG   ] Reading configuration from /etc/salt/cloud
[DEBUG   ] Reading configuration from /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: salt64
[DEBUG   ] Missing configuration file: /etc/salt/cloud.providers
[DEBUG   ] Including configuration from '/etc/salt/cloud.providers.d/proxmox.conf'
[DEBUG   ] Reading configuration from /etc/salt/cloud.providers.d/proxmox.conf
[DEBUG   ] Missing configuration file: /etc/salt/cloud.profiles
[DEBUG   ] Including configuration from '/etc/salt/cloud.profiles.d/proxmox.conf'
[DEBUG   ] Reading configuration from /etc/salt/cloud.profiles.d/proxmox.conf
[DEBUG   ] Configuration file path: /etc/salt/cloud
[INFO    ] salt-cloud starting
[DEBUG   ] 'parallels.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'parallels.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'proxmox.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.destroy' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_sizes' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_images' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'saltify.avail_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.reboot' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'openstack.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
[DEBUG   ] 'rackspace.list_locations' has been marked as not supported. Removing from the list of supported cloud functions
Error: There was an error running the function: The 'proxmox' cloud provider alias, for the 'proxmox' driver, does not define the function 'show_storage'

The error above occurs with various other commands, for instance, "Error: There was an error running the function: The 'proxmox' cloud provider alias, for the 'proxmox' driver, does not define the function 'disk'". 

Is it looking for a "show_storage" or a "disk" command in my cloud profile configuration file?

Here are the contents of my cloud.providers and cloud.profiles .conf files

/etc/salt/cloud.profiles.d/proxmox.conf
proxmox:
    provider: proxmox
    image: /volumes/pool2/ISOs/suse-13.2-x86_64.tar.gz
    technology: kvm
    host: 192.168.4.211
    ip_address: 192.168.4.211
    ssh_username: root
    password: supersecret

/etc/salt/cloud.providers.d/proxmox.conf
proxmox:
  provider: proxmox
  technology: kvm
  # Set up the location of the salt master
  #
#  minion:
#    master: salt64

  # Set the PROXMOX access credentials (see below)
  #
  user: root@pam
  password: supersecret

  # Set the access URL for your PROXMOX provider
  #
  url: 192.168.4.211


Anybody have any ideas?

Colton Myers

unread,
Apr 3, 2015, 5:21:54 PM4/3/15
to salt-...@googlegroups.com
Andy,

I'm not sure what's going on here. The proxmox cloud provider was actually contributed by a community member. Would you mind opening an issue on Github and pinging @syphernl on it? He can probably fix this right up, the KeyError in your output will probably not be difficult to fix.

Thanks!

--
Colton Myers
Platform Engineer, SaltStack
@basepi on Twitter/Github/IRC


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages