rubiojr/knife-kvm — pull request #5 by efrakt (2013-12-17 19:52:54+00:00)
Title: Fixed NoMethodError: exception in memory calculation under Ubuntu

I recently setup knife-kvm on multiple Ubuntu 12.04 hosts using the distro version of ruby 1.9.1 and 1.9.3 along with matching gems version. All hosts gave me the following errors when creating and listing new vms.

/var/lib/gems/1.9.1/gems/knife-kvm-0.1.2/lib/chef/knife/kvm_vm_create.rb:185:in `run': undefined method `kilobytes' for 524288:Fixnum (NoMethodError)

/var/lib/gems/1.9.1/gems/knife-kvm-0.1.2/lib/chef/knife/kvm_vm_list.rb:34:in `block (2 levels) in run': undefined method `kilobytes' for 1048576:Fixnum (NoMethodError)

The following change fixes this problem.