[fedora-virt] virt-install disk size problems

James Harrison jamesaharrisonuk at yahoo.co.uk
Fri Mar 28 16:59:37 UTC 2014


Hi All,

If I use sparce=true or false I end up with a 100Gb qcow2 (raw) file. However If I look at the disk size in virt-manager the file is 20Gb.

I am having problems with mounting the / partition during the install.


I am using this virt-install command to create and install a RHEL 6 VM on F20 (updated OS as of today):

virt-install \
      --connect qemu:///system \
      --name Stage \
      --memory 2048 \
      --vcpus=1,maxvcpus=4 \
      --accelerate \
      --os-variant rhel6 \
      --os-type linux \
      --disk path=/var/lib/libvirt/images/stage.qcow2,cache=none,bus=virtio,size=100,sparse=true,format=qcow2 \
      --network bridge=bridge0 \
      --virt-type qemu \
      --graphics vnc \
      --location=/ISOs/rhel-server-6.4-x86_64-dvd.iso \
      --initrd-inject=/var/lib/libvirt/images/rhel6-ks.ks \
      --extra-args "ks=file:/rhel6-ks.ks" \
&


The /var/lib/libvirt/images directory is a glusterfs file system, between two machines (kvm1 and kvm2) and images are supposed to reside on this mount.


and this kickstart file (rhel6-ks.ks):

#RHEL 6 KS file
interactive
install
cdrom
lang en_US.UTF-8
keyboard uk
network --onboot=yes --device=eth0 --bootproto=dhcp --hostname=v-dst-stgjah-01.nexus.xxxxxxx.com
rootpw  xxxxxxxxx
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone --utc Europe/London
bootloader --location=mbr --driveorder=vda --append="rhgb quiet"
zerombr
clearpart --all --drives=vda
part /boot --fstype=ext4 --size=1024
part pv.008002 --size=94371840
volgroup vg_rhel6 pv.008002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_rhel6 --size=15000
logvol swap --name=lv_swap --vgname=vg_rhel6 --size=4096
logvol /repos --fstype=ext4 --name=lv_repos --vgname=vg_rhel6 --grow --size=100
%packages
@base
@client-mgmt-tools
@console-internet
@core
@directory-client
@hardware-monitoring
@java-platform
@large-systems
@network-file-system-client
@performance
@server-platform
@server-policy
wget
%end


The error message I get from anaconda: "An error occurred mounting device /dev/mapper/vg_rhel6-lv_root at / mount failed: (9, None)."


Manually creating the disk using the truncate command also same problem. 


I have created other RHEL 6 VMs on 10G disks and the OS installs without any problems.


James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/virt/attachments/20140328/e787fcbe/attachment-0001.html>


More information about the virt mailing list