<%# Copyright 2018 Tristan Robert This file is part of ForemanFogProxmox. ForemanFogProxmox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ForemanFogProxmox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ForemanFogProxmox. If not, see . %> <%= javascript_include_tag 'foreman_fog_proxmox/proxmox_vm_server', "data-turbolinks-track" => true %> <%= stylesheet_link_tag 'foreman_fog_proxmox/accordion' %> <% server = type == 'qemu' %> <% logger.debug("_config.html.erb server_config=#{f.object.inspect}") %> <%= field_set_tag n_("Main option", "Main options", 2), :id => "server_config_options", :class => 'accordion-section', :disabled => !server do %>
<%= textarea_f f, :description, :label => _('Description'), :label_size => "col-md-2" %> <%= text_f f, :boot, :label => _('Boot device order'), :label_size => "col-md-2", :label_help => _('Order your devices, e.g. order=net0;ide2;scsi0. Default empty (any)') %> <%= checkbox_f f, :onboot, :label => _('Start at boot') %> <%= checkbox_f f, :agent, :label => _('Qemu Agent') %> <%= checkbox_f f, :kvm, :label => _('KVM'), :label_help => _('Enable/disable KVM hardware virtualization') %> <%= select_f f, :vga, proxmox_vgas_map, :id, :name, { :include_blank => true }, :label => _('VGA'), :label_size => "col-md-2" %> <%= select_f f, :scsihw, proxmox_scsi_controllers_map, :id, :name, { }, :label => _('SCSI Controller'), :label_size => "col-md-2" %> <%= select_f f, :bios, proxmox_bios_map, :id, :name, { }, :label => _('BIOS'), :label_size => "col-md-2" %>
<% end %> <%= field_set_tag _("CPUs"), :id => "server_config_cpu", :class => 'accordion-section', :disabled => !server do %>
<%= select_f f, :cpu_type, proxmox_cpus_map, :id, :name, { }, :label => _('Type'), :label_size => "col-md-2" %> <%= counter_f f, :sockets, :class => "input-mini", :label => _('Sockets'), :label_size => "col-md-2" %> <%= counter_f f, :cores, :class => "input-mini", :label => _('Cores'), :label_size => "col-md-2" %> <%= counter_f f, :vcpus, :class => "input-mini", :label => _('VCPUs'), :label_size => "col-md-2" %> <%= counter_f f, :cpulimit, :class => "input-mini", :label => _('CPU limit'), :label_size => "col-md-2" %> <%= counter_f f, :cpuunits, :class => "input-mini", :label => _('CPU units'), :label_size => "col-md-2" %> <%= checkbox_f f, :numa, :label => _('Enable NUMA') %> <%= field_set_tag _("CPU Flags"), :id => "server_config_cpu_flags" do %> <% Fog::Proxmox::CpuHelper.flags.each do |flag_key, flag_value| %> <%= select_f f, flag_key, proxmox_cpu_flags_map, :id, :name, { }, :label => _(flag_value) %> <% end %> <% end %>
<% end %> <%= field_set_tag _("Memory"), :id => "server_config_memory", :class => 'accordion-section', :disabled => !server do %>
<%= text_f f, :memory, :class => "input-mini", :label => _('Memory (MB)'), :label_size => "col-md-2" %> <%= text_f f, :balloon, :class => "input-mini", :label => _('Minimum memory (MB)'), :label_size => "col-md-2" %> <%= text_f f, :shares, :class => "input-mini", :label => _('Shares (MB)'), :label_size => "col-md-2" %>
<% end %> <%= field_set_tag _("Operating System"), :id => "server_config_os", :class => 'accordion-section', :disabled => !server do %>
<%= select_f f, :ostype, proxmox_operating_systems_map, :id, :name, { :include_blank => true }, :label => _('OS type'), :label_size => "col-md-2" %>
<% end %> <%= field_set_tag _("Cloud-init"), :id => "server_config_cloud_init", :class => ('hide' unless cloudinit), :disabled => (!cloudinit) do %> <%= text_f f, :ciuser, :label => _('User'), :label_size => "col-md-2" %> <%= text_f f, :cipassword, :label => _('Password'), :label_size => "col-md-2" %> <%= text_f f, :searchdomain, :label => _('DNS domain'), :label_size => "col-md-2" %> <%= text_f f, :nameserver, :label => _('DNS servers'), :label_size => "col-md-2" %> <%= textarea_f f, :sshkeys, :label => _("SSH public key"), :size => "col-md-4" %> <% end %>