From 847d5aa49732bb296f62638f564556667fc03d49 Mon Sep 17 00:00:00 2001 From: Ohad Levy Date: Thu, 27 Dec 2012 16:55:32 +0200 Subject: [PATCH] [vsphere] allow to create a vm with multiple disks. unitNumber has to be unique. --- lib/fog/vsphere/requests/compute/create_vm.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fog/vsphere/requests/compute/create_vm.rb b/lib/fog/vsphere/requests/compute/create_vm.rb index 0df1543b5..cc7f3ddde 100644 --- a/lib/fog/vsphere/requests/compute/create_vm.rb +++ b/lib/fog/vsphere/requests/compute/create_vm.rb @@ -75,7 +75,7 @@ module Fog } end - def create_disk disk, index = 0, operation = :add, controller_key = 1000, unit_id = 0 + def create_disk disk, index = 0, operation = :add, controller_key = 1000 { :operation => operation, :fileOperation => :create, @@ -87,7 +87,7 @@ module Fog :thinProvisioned => disk.thin ), :controllerKey => controller_key, - :unitNumber => unit_id, + :unitNumber => index, :capacityInKB => disk.size ) }