mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Do not chance disk path
Mutating path caused vagrant to constatnyl spew errors from #validate while waiting for ssh to be available. Instead, create a new key.
This commit is contained in:
parent
f39797fa6a
commit
a5b5e3e800
@ -75,10 +75,7 @@ module VagrantPlugins
|
||||
# http://www.redhat.com/archives/libvir-list/2008-August/msg00329.html
|
||||
disk[:name] = disk[:path]
|
||||
|
||||
# Prefix relative paths by storage pool path
|
||||
unless disk[:path][0] == '/'
|
||||
disk[:path] = storage_prefix + disk[:path]
|
||||
end
|
||||
disk[:absolute_path] = storage_prefix + disk[:path]
|
||||
|
||||
# make the disk. equivalent to:
|
||||
# qemu-img create -f qcow2 <path> 5g
|
||||
@ -86,7 +83,7 @@ module VagrantPlugins
|
||||
domain_volume_disk = env[:libvirt_compute].volumes.create(
|
||||
:name => disk[:name],
|
||||
:format_type => disk[:type],
|
||||
:path => disk[:path],
|
||||
:path => disk[:absolute_path],
|
||||
:capacity => disk[:size],
|
||||
#:allocation => ?,
|
||||
:pool_name => @storage_pool_name)
|
||||
@ -119,7 +116,7 @@ module VagrantPlugins
|
||||
env[:ui].info(" -- Disks: #{_disks_print(@disks)}")
|
||||
end
|
||||
@disks.each do |disk|
|
||||
env[:ui].info(" -- Disk(#{disk[:device]}): #{disk[:path]}")
|
||||
env[:ui].info(" -- Disk(#{disk[:device]}): #{disk[:absolute_path]}")
|
||||
end
|
||||
env[:ui].info(" -- Command line : #{@cmd_line}")
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
<% @disks.each do |d| -%>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='<%= d[:type] %>' cache='<%= d[:cache] %>'/>
|
||||
<source file='<%= d[:path] %>'/>
|
||||
<source file='<%= d[:absolute_path] %>'/>
|
||||
<target dev='<%= d[:device] %>' bus='<%= d[:bus] %>'/>
|
||||
<%# this will get auto generated by libvirt
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='???' function='0x0'/>
|
||||
|
Loading…
Reference in New Issue
Block a user