xenapi: determine_is_pv should be fixed to have a safer default of HVM

Bug #1206828 reported by John Garbutt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Garbutt

Bug Description

The auto PV detection was removed as part of this bug:
https://code.launchpad.net/bugs/1196570

We should consider removing the check for the disk type and simply have a check like:

If os_type = linux then
  PV
else
  HVM

Defaulting to PV is a bit unsafe, as HVM is more likely to work for things that have no vm_mode (already checked before this code, should probably try and pull that code into the above method) and no os_type flags.

Tags: xenserver
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Changed in nova:
assignee: nobody → John Garbutt (johngarbutt)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/46498

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/46498
Committed: http://github.com/openstack/nova/commit/2cc2c786f4525acc73d1e61f4706ed0aaa453c25
Submitter: Jenkins
Branch: master

commit 2cc2c786f4525acc73d1e61f4706ed0aaa453c25
Author: John Garbutt <email address hidden>
Date: Fri Sep 13 14:30:37 2013 +0100

    xenapi: simplify PV vs HVM selection logic

    The logic to inspect a disk to determine if an image is PV or HVM has
    been removed. This change follows on from that simplification.

    As before, if I user wants to use PV mode, or HVM mode, then can set
    vm_mode=xen or vm_mode=hvm, respectively. This will override any other
    way of selecting the mode.

    For consistency, we now check the os_type to be either windows or linux,
    which, without vm_mode, chooses HVM or XEN mode respectively.

    For backwards compatibility, all VHD and DISK type images default to
    vm_mode=xen.

    In all other cases, we default to HVM, as this is the safest option
    that works with most images.

    Fixes bug 1206828
    DocImpact
    Change-Id: Iab2ffdc7ad396b853c7aed20d46bf12320b76c21

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.