Module: XenAPI::Vbd

Included in:
Session
Defined in:
lib/xenapi/vbd.rb

Instance Method Summary collapse

Instance Method Details

#create_VBD_for(vm_ref, disk_uuid, disk_number) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/xenapi/vbd.rb', line 4

def create_VBD_for(vm_ref, disk_uuid, disk_number)
  self.VBD.create({
    :VM => vm_ref,
    :VDI => self.VDI.get_by_uuid(disk_uuid),
    :userdevice => disk_number.to_s,
    :bootable => false,
    :mode => "RW",
    :type => "Disk",
    :unpluggable => false,
    :empty => false,
    :other_config => {},
    :qos_algorithm_type => "",
    :qos_algorithm_params => {}
  })
end