From: Joe VLcek <jvl...@redhat.com> The default first boot device has been changed in the rbovirt gem to hard disk, followed by network. This push allows the user to explicitly specify the first boot device as either netowrk or hard disk with the other becoming the second boot device. --- server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 2 ++ server/views/instances/new.html.haml | 8 ++++++++ 2 files changed, 10 insertions(+)
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb index 724c6b3..ce34457 100644 --- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb @@ -23,6 +23,7 @@ module Deltacloud class RhevmDriver < Deltacloud::BaseDriver feature :instances, :user_data + feature :instances, :first_boot_dev feature :instances, :user_name do { :max_length => 50 } end @@ -192,6 +193,7 @@ class RhevmDriver < Deltacloud::BaseDriver params[:cores] = opts[:hwp_cpu] if opts[:hwp_cpu] params[:user_data] = opts[:user_data].gsub(/\n/,'') if opts[:user_data] params[:fileinject_path] = "deltacloud-user-data.txt" + params[:first_boot_dev] = opts[:first_boot_dev] if opts[:first_boot_dev] convert_instance(client, client.create_vm(params)) end end diff --git a/server/views/instances/new.html.haml b/server/views/instances/new.html.haml index f508e7f..57ce572 100644 --- a/server/views/instances/new.html.haml +++ b/server/views/instances/new.html.haml @@ -37,6 +37,14 @@ %br/ %a{ :href => "", :onclick => 'encodeb64();', :'data-ajax' => 'false'} Encode data + - if driver.class.has_feature?(:instances, :first_boot_dev) + %fieldset{ :'data-role' => 'controlgroup', 'data-iconpos' => 'right'} + %legend First boot device: + %input{ :name => 'first_boot_dev', :id => :first_boot_dev_hd, :value => 'hd', :checked => 'checked', :type => 'radio'} + %label{ :for => :first_boot_dev_hd} Hard Disk + %input{ :name => 'first_boot_dev', :id => :first_boot_dev_network, :value => 'network', :type => "radio"} + %label{ :for => :first_boot_dev_network} Network + - if driver.class.has_feature?(:instances, :instance_count) %div{ 'data-role' => :fieldcontain } %label{ :for => :instance_count} # of instances to be launched: -- 1.7.11.7