Skip to content

Commit

Permalink
Fixes telcat#37
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Vitali committed Sep 11, 2017
1 parent 322280b commit 8eafb5f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GIT
PATH
remote: .
specs:
vagrant-proxmox (0.0.11)
vagrant-proxmox (0.0.12)
activesupport (~> 4.0.0)
rest-client (~> 2.0)
retryable (~> 1.3.3)
Expand Down Expand Up @@ -70,7 +70,6 @@ GEM
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
hashdiff (0.3.6)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
Expand Down Expand Up @@ -112,8 +111,7 @@ GEM
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rest-client (2.1.0.rc1)
http-accept (>= 1.7.0, < 2.0)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Vagrant.configure('2') do |config|
proxmox.qemu_os = :l26
proxmox.qemu_disk_size = '30G'
proxmox.qemu_storage = 'local'
proxmox.qemu_format = 'raw'
proxmox.qemu_iso_file = '/home/user/system.iso'
proxmox.vm_name_prefix = 'vagrant_test_'
proxmox.qemu_cores = 1
Expand Down Expand Up @@ -137,6 +138,7 @@ Finally run `vagrant up --provider=proxmox` to create and start the new OpenVZ c
* `qemu_nic_model` which model of network interface card to use, default 'e1000'
* `qemu_bridge` connect automatically to this bridge, default 'vmbr0'
* `selected_node` If specified, only this specific node is used to create machines
* `qemu_format` If specified, sets the image format (default: qcow2)

## Build the plugin

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-proxmox/action/create_vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_params_qemu(config, env, vm_id)
name: env[:machine].config.vm.hostname || env[:machine].name.to_s,
ostype: config.qemu_os,
ide2: "#{config.qemu_iso},media=cdrom",
sata0: "#{config.qemu_storage}:#{config.qemu_disk_size},format=qcow2",
sata0: "#{config.qemu_storage}:#{config.qemu_disk_size},format=#{config.qemu_format}",
sockets: config.qemu_sockets,
cores: config.qemu_cores,
memory: config.vm_memory,
Expand Down
7 changes: 7 additions & 0 deletions lib/vagrant-proxmox/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ class Config < Vagrant.plugin('2', :config)
# @return [String]
attr_accessor :qemu_bridge

# The qemu format, e.g. 'qcow2'
# defaults to 'qcow2'
#
# @return [String]
attr_accessor :qemu_format

def initialize
@endpoint = UNSET_VALUE
@selected_node = UNSET_VALUE
Expand Down Expand Up @@ -181,6 +187,7 @@ def initialize
@qemu_storage = 'raid'
@qemu_nic_model = 'e1000'
@qemu_bridge = 'vmbr0'
@qemu_format = 'qcow2'
end

# This is the hook that is called to finalize the object before it is put into use.
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-proxmox/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module VagrantPlugins
module Proxmox

VERSION = '0.0.11'
VERSION = '0.0.12'

end
end

0 comments on commit 8eafb5f

Please sign in to comment.