XenAPI does not support GPT partition table

Bug #1574531 reported by huan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

Description
==========
Boot an instance with FreeBSD image using OpenStack Liberty stable release

Steps
=====
I downloaded a FreeBSD image from it's offical website and upload this image via glance.
I tried to boot an instance with this image, but it will always fail at auto config disk, see xenapi/vm_utils.py: _auto_configure_disk()

Expect:
======
Boot instance successfully

Actual:
======
Failed to boot instance

Logs
====

2016-04-20 05:04:10.043 ERROR nova.utils [req-7f9d8900-a3c4-4e9e-93dc-cd71d7263895 demo demo] [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] Failed to spawn, rolling back
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] Traceback (most recent call last):
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vmops.py", line 570, in _spawn
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] attach_devices_step(undo_mgr, vm_ref, vdis, disk_image_type)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vmops.py", line 129, in inner
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] rv = f(*args, **kwargs)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vmops.py", line 503, in attach_devices_step
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] attach_disks(undo_mgr, vm_ref, vdis, disk_image_type)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vmops.py", line 450, in attach_disks
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] admin_password, injected_files)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vmops.py", line 748, in _attach_disks
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] flavor.root_gb)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vm_utils.py", line 926, in try_auto_configure_disk
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] _auto_configure_disk(session, vdi_ref, new_gb)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vm_utils.py", line 904, in _auto_configure_disk
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] partitions = _get_partitions(dev)
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] File "/opt/stack/nova/nova/virt/xenapi/vm_utils.py", line 2197, in _get_partitions
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] num, start, end, size, fstype, name, flags = line.split(':')
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055] ValueError: need more than 1 value to unpack
2016-04-20 05:04:10.043 TRACE nova.utils [instance: d970c4d0-c112-4b6e-b559-9f38e91c1055]

With some additional debug loggs added, you can see:
2016-04-20 05:04:09.322 DEBUG nova.virt.xenapi.vm_utils [req-7f9d8900-a3c4-4e9e-93dc-cd71d7263895 demo demo]
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Warning: Not all of the space available to /dev/xvdb appears to be used, you can fix the GPT to use all of the space (an extra 18874001 blocks) or continue with the current setting?
BYT;
/dev/xvdb:62914560s:xvd:512:512:gpt:Xen Virtual Block Device;
1:3s:170s:168s::bootfs:;
2:171s:2097322s:2097152s::swapfs:;
3:2097323s:44040362s:41943040s:freebsd-ufs:rootfs:;

This is because XenAPI driver doesn't support GPT partition tables currently

tags: added: xenserver
Matt Riedemann (mriedem)
summary: - XenAPI dosen't support GPT partition table
+ XenAPI does not support GPT partition table
Bob Ball (bob-ball)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version liberty in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.liberty
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.