Bug 1111662

Summary: Guestfs.Error("vgchange_uuid_all: Volume group has active logical volumes")
Product: [Community] Virtualization Tools Reporter: John Anderson <sontek>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, joseph.antony, mbooth, ptoscano, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-02 11:59:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log of sysprep
none
log of virt-sysprep ver 1.27.31 none

Description John Anderson 2014-06-20 16:37:13 UTC
I'm running the following:

sudo virt-sysprep -d ubuntu1404_smbase

and getting the error:  

sysprep operation failed: exception: Guestfs.Error("vgchange_uuid_all:   Volume group has active logical volumes")

I'm using:

$ virt-sysprep --version
virt-sysprep 1.24.5


I have attached the whole log.

Comment 1 John Anderson 2014-06-20 16:37:40 UTC
Created attachment 910835 [details]
log of sysprep

Comment 2 Richard W.M. Jones 2014-06-20 16:54:08 UTC
*** Bug 1111669 has been marked as a duplicate of this bug. ***

Comment 3 Richard W.M. Jones 2014-06-20 16:57:39 UTC
The error might be from an earlier LVM operation:

lvm vgchange -a n
  semid 32768: semop failed for cookie 0xd4ddd13: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223206675 (0xd4ddd13) to initialize waiting for incoming notifications.

I do wonder if this is a manifestation of this problem:

https://github.com/libguestfs/libguestfs/commit/7c8af234305f0fe2cb5a9042bd58fe3735e8cd73

(Fixed in 1.24.7, but not in 1.24.5 unless it was backported)

Comment 4 Joseph Antony 2014-08-27 06:47:10 UTC
Created attachment 931297 [details]
log of virt-sysprep ver 1.27.31

Comment 5 Joseph Antony 2014-08-27 06:48:11 UTC
On running this command on an Ubuntu 14.04.1 LTS VM, packaging up a 
CentOS 6.5 VM, I get the same error:

$ sudo virt-sysprep -d perfsonar-3.3.2
sysprep operation failed: exception: Guestfs.Error("vgchange_uuid_all:   Volume group has active logical volumes")

$ virt-sysprep --version
virt-sysprep 1.24.5

Then on compiling up libguestfs-1.27.31 on the same Ubuntu VM, I get the
same error again:

$ sudo virt-sysprep -d perfsonar-3.3.2 
[   0.0] Examining the guest ...
[  15.0] Performing "lvm-uuids" ...
virt-sysprep: libguestfs error: vgchange_uuid_all:   Volume group has active logical volumes

$ virt-sysprep --version
virt-sysprep 1.27.31

A trace from running virt-sysprep using libguestfs version 1.27.31 is also attached.

Comment 6 Joseph Antony 2014-08-27 06:48:17 UTC
On running this command on an Ubuntu 14.04.1 LTS VM, packaging up a 
CentOS 6.5 VM, I get the same error:

$ sudo virt-sysprep -d perfsonar-3.3.2
sysprep operation failed: exception: Guestfs.Error("vgchange_uuid_all:   Volume group has active logical volumes")

$ virt-sysprep --version
virt-sysprep 1.24.5

Then on compiling up libguestfs-1.27.31 on the same Ubuntu VM, I get the
same error again:

$ sudo virt-sysprep -d perfsonar-3.3.2 
[   0.0] Examining the guest ...
[  15.0] Performing "lvm-uuids" ...
virt-sysprep: libguestfs error: vgchange_uuid_all:   Volume group has active logical volumes

$ virt-sysprep --version
virt-sysprep 1.27.31

A trace from running virt-sysprep using libguestfs version 1.27.31 is also attached.

Comment 7 Richard W.M. Jones 2014-08-27 08:04:09 UTC
Please see comment 3.

Comment 8 Pino Toscano 2014-08-28 16:36:46 UTC
I think to be facing the same, when building libguestfs/master on a current Ubuntu/devel (i.e. soon to be Utopic). Will take a look.

Comment 9 Pino Toscano 2014-08-28 16:38:46 UTC
(Oops, sorry Joseph for having accidentally removed you from CC, readding.)

Comment 10 Joseph Antony 2014-08-29 04:40:49 UTC
Thanks Pino!

I am currently working around this for the moment on libguestfs ver 1.27.31 
by disabling lvm-uuids:
# virt-sysprep --operations defaults,-lvm-uuids  -d perfsonar-3.3.2

The image uploaded successfully into OpenStack glance and I've booted it successfully.

Cheers,
Joseph

Comment 11 Pino Toscano 2014-09-02 11:59:18 UTC
This issue is fixed with
https://github.com/libguestfs/libguestfs/commit/c004e4648d2091eb217026b15eed7e041557b635
which is in libguestfs >= 1.27.36.