fix storage pool permissions

- Hash args for driver create_image and init_storage
- driver: add host os detection methods
- Set permissions when import
import: add o+r permission for export

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
fix memory config to working

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
fix #143

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Fix memory configuration

- vm_definiton.rb
 * always use :memory attribute as in bytes
 * fixed behavior ignoring config value stored in :memory attribute
   but @memory is used to create domain
   that is set by box's definition.
 * remove @memory
- libvirt_domain.erb
 * introduce memory_size and memory_size embeded variables.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Added MessageNotRunning class
Load MessageNotRunning class on action.rb
Merge pull request #150 from esanchezm/master

Added missing MessageNotRunning action
config: default memsize is specified by box

- fix error when no memory size kvm config
  now default memory size is same as box.xml

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
add action reset image permission

- reset volume image uid:gid to owner

libvirt should revert its owner to original user
but it has never been implemented yet.
This is work around for it.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
util: introduce run_root_command()

-prepare separate run_command() for root previleges.

TODO: some host OS need to use 'su -c' instead of 'sudo'

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Merge pull request #148 from miurahr/fix_config_memory

fix memory config to working
Merge pull request #149 from miurahr/fix_spec_test_box

fix #143
Merge pull request #152 from miurahr/avoid_libvirt_security_bug

Avoid libvirt security bug
Merge pull request #141 from miurahr/fix-pool-permission-problem

fix storage pool permissions
fix primary ide pci id: 0000:0:1.1

- ide, sata and scsi has each pci id.
- ide is on 0000:0:1.1

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
add fedora vagrant box for test

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Merge pull request #154 from miurahr/fix_pci_ide_error

fix primary ide pci id: 0000:0:1.1
Merge pull request #155 from miurahr/spec_fedora_vagrantfile

add fedora vagrant box for test