added autostart for vm into virt
diff --git a/salt/control/virt.sls b/salt/control/virt.sls
index da93038..3ea43b0 100644
--- a/salt/control/virt.sls
+++ b/salt/control/virt.sls
@@ -67,6 +67,17 @@
# - path: /srv/salt-images/{{ node_name }}.{{ cluster.domain }}/system.qcow2
# - id_: {{ node_name }}.{{ cluster.domain }}
# - unless: virsh list | grep {{ node_name }}.{{ cluster.domain }}
+
+{%- if node.get("autostart", True) %}
+
+salt_virt_autostart_{{ cluster_name }}_{{ node_name }}:
+ module.run:
+ - name: virt.set_autostart
+ - vm_: {{ node_name }}.{{ cluster.domain }}
+ - state: true
+ - unless: virsh list --autostart | grep {{ node_name }}.{{ cluster.domain }}
+
+{%- endif %}
{%- endif %}
diff --git a/salt/map.jinja b/salt/map.jinja
index b0f03da..155243e 100644
--- a/salt/map.jinja
+++ b/salt/map.jinja
@@ -142,7 +142,10 @@
virt_pkgs:
- libvirt-dev
- pkg-config
+{% if grains.oscodename == 'trusty' %}
- libguestfs-tools
+{% endif %}
+
RedHat:
virt_pkgs:
- libvirt-dev