Revision d47d3d38

b/lib/hypervisor/hv_kvm.py
150 150

  
151 151
    return (instance_name, pid, memory, vcpus, stat, times)
152 152

  
153

  
154 153
  def GetAllInstancesInfo(self):
155 154
    """Get properties of all instances.
156 155

  
......
194 193
        # FIXME: handle other models
195 194
        nic_val = "nic,macaddr=%s,model=virtio" % nic.mac
196 195
        kvm_cmd.extend(['-net', nic_val])
197
        # if os.path.blah(script):
198 196
        kvm_cmd.extend(['-net', 'tap,script=%s' % script])
199 197
        temp_files.append(script)
200 198
        nic_seq += 1
......
202 200
    boot_drive = True
203 201
    for cfdev, rldev in block_devices:
204 202
      # TODO: handle FD_LOOP and FD_BLKTAP (?)
205
      # TODO: handle if= correctly
206
      #drive_val = 'file=%s,format=raw,if=virtio' % rldev.dev_path
207 203
      if boot_drive:
208 204
        boot_val = ',boot=on'
205
        boot_drive = False
209 206
      else:
210 207
        boot_val = ''
211 208

  
212
      drive_val = 'file=%s,format=raw,if=virtio' % rldev.dev_path
213
      if boot_drive:
214
        drive_val = '%s,boot=on' % drive_val
215
        boot_drive = False
216
      #drive_val = 'file=%s,if=virtio' % rldev.dev_path
209
      # TODO: handle different if= types
210
      if_val = ',if=virtio'
211

  
212
      drive_val = 'file=%s,format=raw%s%s' % (rldev.dev_path, if_val, boot_val)
217 213
      kvm_cmd.extend(['-drive', drive_val])
218
      #flagname = cfdev.iv_name.replace('s', 'h', 1)
219
      #kvm_cmd.extend(['-%s' % flagname, drive_val])
220 214

  
221 215
    # kernel handling
222 216
    if instance.kernel_path in (None, constants.VALUE_DEFAULT):
......
251 245
    kvm_cmd.extend(['-append', 'console=ttyS0,38400 root=/dev/vda'])
252 246

  
253 247
    #"hvm_boot_order",
254
    #"hvm_pae",
255 248
    #"hvm_cdrom_image_path",
256 249

  
257 250
    kvm_cmd.extend(['-nographic'])

Also available in: Unified diff