Skip to content

Instantly share code, notes, and snippets.

@moebiuseye
Last active April 24, 2017 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moebiuseye/b65bb2a2414ca78f1abb91edfa312fb6 to your computer and use it in GitHub Desktop.
Save moebiuseye/b65bb2a2414ca78f1abb91edfa312fb6 to your computer and use it in GitHub Desktop.
# /etc/salt/cloud.profiles.d/lxc.conf
lxcprofile1:
{host: proxmox.lan, image: 'local:debian-8.0-standard_8.6-1_amd64.tar.gz', ip_address: 172.28.128.5/24,
password: topsecret, provider: proxmox, technology: lxc}
# /etc/salt/cloud.providers.d/proxmox.conf
proxmox:
# Proxmox account information
user: root@pam
password: 5worDPa55
url: 127.0.0.1
driver: proxmox
verify_ssl: Falser
root@proxmox:~# salt-call --versions-report
Salt Version:
Salt: 2016.11.3
Dependency Versions:
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 2.2
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: debian 8.7
machine: x86_64
release: 3.16.0-4-amd64
system: Linux
version: debian 8.7
root@proxmox:~# salt-cloud -l debug -p lxcprofile1 test1
[DEBUG ] Reading configuration from /etc/salt/cloud
[DEBUG ] Missing configuration file: /etc/salt/master
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: proxmox.domain.dom
[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/lxc.conf'
[DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/lxc.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: 'parallels' __virtual__ returned False
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] Could not LazyLoad proxmox.avail_sizes: 'proxmox.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
[DEBUG ] Could not LazyLoad proxmox.optimize_providers: 'proxmox.optimize_providers' is not available.
[DEBUG ] The 'proxmox' cloud driver is unable to be optimized.
[DEBUG ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] Could not LazyLoad proxmox.avail_sizes: 'proxmox.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
[DEBUG ] Getting resource: vms.. (filter: None)
[DEBUG ] Not authenticated yet, doing that now..
[WARNING ] /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:770: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
[DEBUG ] get: https://127.0.0.1:8006/api2/json/cluster/resources (None)
[DEBUG ] Filter not given: {}, returning all resource: nodes
[WARNING ] There's no master defined on the 'test1' VM settings.
[DEBUG ] Generating minion keys for 'test1'
[DEBUG ] LazyLoaded cloud.fire_event
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[INFO ] Creating Cloud VM test1
[DEBUG ] Not authenticated yet, doing that now..
[WARNING ] /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:770: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
[DEBUG ] get: https://127.0.0.1:8006/api2/json/cluster/nextid (None)
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Preparing to generate a node using these parameters: {'password': 'topsecret', 'hostname': 'test1', 'vmid': 100, 'ostemplate': 'local:debian-8.0-standard_8.6-1_amd64.tar.gz', 'net0': 'bridge=vmbr0,ip=172.28.128.5/24/24,name=eth0,type=veth'}
[DEBUG ] post: https://127.0.0.1:8006/api2/json/nodes/proxmox.lan/lxc ({'password': 'topsecret', 'hostname': 'test1', 'vmid': 100, 'ostemplate': 'local:debian-8.0-standard_8.6-1_amd64.tar.gz', 'net0': 'bridge=vmbr0,ip=172.28.128.5/24/24,name=eth0,type=veth'})
[ERROR ] Error creating test1 on PROXMOX
root@proxmox:~# salt-cloud -l debug -p lxcprofile1 test1
[DEBUG ] Reading configuration from /etc/salt/cloud
[DEBUG ] Missing configuration file: /etc/salt/master
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: proxmox.domain.dom
[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/lxc.conf'
[DEBUG ] Reading configuration from /etc/salt/cloud.profiles.d/lxc.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: 'parallels' __virtual__ returned False
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] Could not LazyLoad proxmox.avail_sizes: 'proxmox.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
[DEBUG ] Could not LazyLoad proxmox.optimize_providers: 'proxmox.optimize_providers' is not available.
[DEBUG ] The 'proxmox' cloud driver is unable to be optimized.
[DEBUG ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG ] LazyLoaded parallels.avail_locations
[DEBUG ] Could not LazyLoad proxmox.avail_sizes: 'proxmox.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG ] LazyLoaded rackspace.reboot
[DEBUG ] LazyLoaded openstack.list_locations
[DEBUG ] LazyLoaded rackspace.list_locations
[DEBUG ] Getting resource: vms.. (filter: None)
[DEBUG ] Not authenticated yet, doing that now..
[WARNING ] /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:770: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
[DEBUG ] get: https://127.0.0.1:8006/api2/json/cluster/resources (None)
[DEBUG ] Filter not given: {}, returning all resource: nodes
[WARNING ] There's no master defined on the 'test1' VM settings.
[DEBUG ] Generating minion keys for 'test1'
[DEBUG ] LazyLoaded cloud.fire_event
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[INFO ] Creating Cloud VM test1
[DEBUG ] Not authenticated yet, doing that now..
[WARNING ] /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:770: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
[DEBUG ] get: https://127.0.0.1:8006/api2/json/cluster/nextid (None)
[DEBUG ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
[DEBUG ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
[DEBUG ] Preparing to generate a node using these parameters: {'password': 'topsecret', 'hostname': 'test1', 'vmid': 100, 'ostemplate': 'local:debian-8.0-standard_8.6-1_amd64.tar.gz', 'net0': 'bridge=vmbr0,ip=172.28.128.5/24/24,name=eth0,type=veth'}
[DEBUG ] post: https://127.0.0.1:8006/api2/json/nodes/proxmox.lan/lxc ({'password': 'topsecret', 'hostname': 'test1', 'vmid': 100, 'ostemplate': 'local:debian-8.0-standard_8.6-1_amd64.tar.gz', 'net0': 'bridge=vmbr0,ip=172.28.128.5/24/24,name=eth0,type=veth'})
[ERROR ] Error creating test1 on PROXMOX
The following exception was thrown when trying to run the initial deployment:
596 Server Error: ssl3_get_server_certificate: certificate verify failed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/proxmox.py", line 547, in create
data = create_node(vm_, newid)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/proxmox.py", line 728, in create_node
node = query('post', 'nodes/{0}/{1}'.format(vmhost, vm_['technology']), newnode)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/proxmox.py", line 178, in query
response.raise_for_status()
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 851, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 596 Server Error: ssl3_get_server_certificate: certificate verify failed
Error: There was a profile error: Failed to deploy VM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment