[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] Installing a KVM guest with LVM partitioning on an LVM partitioned KVM host via virt-install fails: "volume group already exists"

Hello everyone,

our setup consists of a ubuntu 10.04 kvm host server formatted with LVM,
on top of which we install the ubuntu 10.04 virtual machines by using a
combination of virt-install and preseed files. 

Each VM has a dedicated Logical Volume on the KVM host which we pass to
virt-install via the "--disk path=/dev/sysvg/vm-name" parameter. The
virtual machines themselves are partitioned with LVM as well.

Virt-install seems to have a few issues with this setup. When we install
the virtual machines the installer halts, complaining that the "volume
group name already in use". We tried removing the logical volumes,
recreated them, rebooted the kvm host to clear any leftovers but the
issue perists.
The preseed is telling the vms to create a volume group named "sysvg",
which has the same name used by the volume group of the kvm host.
Keeping this into consideration we did another test: we got rid of the
preseed part which is taking care of the partitioning/lvm creation and
started the creation of two VMs again. When the installer asks us to
select the partitioning method we select the "guided partitioning of the
disk with LVM". The installer will still fail giving this different error:

Physical Volume /dev/sda5 is already in volume group sysvg.

As I wrote, sysvg is the volume group used by the KVM host. So I thought
the name clashing was the issue. By removing the preseed part I skipped
the volume group naming and thus the conflict, but the issue is now
different. I can't understand how the virtual machines would be aware of
the presence of that volume group since they're supposed to be isolated
from it, especially after I removed and recreated the logical volumes
dedicated to them. That detail should not be exposed at all to them!

As a further test we manually created the vms with virt-manager and
installed them via pxe-boot and by using the same preseed file. In this
way, we succeeded without issues.

My suspect is that virt-install is somehow creating a conflict, yet I
can't get how that would happen.

This is the full virt-install command:

*To create the LVM:*

lvcreate -L30G -n vc99nx999ta sysvg

*To start the VM installation*

virt-install --connect qemu:///system --virt-type kvm --noautoconsole
--name vc99nx999ta --disk path=/dev/sysvg/vc99nx999ta --ram 512 --vcpus
2 --location
--network bridge=vlan110 --extra-args='locale=en_US
console-setup/ask_detect=false console-setup/layout=USA
console-setup/variant=USA netcfg/choose_interface=eth0
netcfg/get_domain=inv.cooldomain.com netcfg/get_ipaddress
string= netcfg/get_netmask string=
netcfg/get_gateway string= hostname=vc99nx999ta
initrd=ubuntu/ubuntu-lucid/amd64/initrd-cooldomainpgpkey.gz --

And this is the part of the preseed file taking care of the
partitioning: http://pastebin.com/vhRBhn1V

Thanks for your help, this issue is driving me mad since a few days.
I'll be happy to provide more details!

The information in this email is confidential and may be legally privileged.
If you are not the intended recipient, you must not read, use or disseminate that information
and upon reception, permanently delete the original and destroy any copies.
Although this email and any attachments are believed to be free of any virus
or any other defect which might affect any computer or IT system into which
they are received and opened, it is the responsibility of the recipient to
ensure that they are virus free and no responsibility is accepted by Kambi
for any loss or damage arising in any way from receipt or use thereof.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]