> On 09 Jan 2015, at 01:37, Dennis Jacobfeuerborn <[email protected]> wrote:
> 
> On 09.01.2015 01:11, Richard Taubo wrote:
>> Hi!
>> 
>> I am running CentOS 7 on a machine with SSD, and trying to run the fstrim 
>> command.
>> 
>> KVM is installed on a logical volume like this:
>> [#] lvcreate -L 300G -n lv_vm1 VolGroup
>> [#] mkfs.xfs /dev/VolGroup/lv_vm1
>> [#] mkdir /mnt/b_vm_1
>> [#] mount /dev/VolGroup/lv_vm1 /mnt/b_vm_1
>> [#] virt-install --name=vm1.mydomain.com \ 
>>      --disk path=/dev/VolGroup/lv_vm1 \ 
>>      --ram=8192 --os-type=linux --os-variant=rhel7 \ 
>>      --vcpus=8 --check-cpu \ 
>>      --network bridge:br0 --nographics \
>>      
>> --location=/usr/local/src/linux_isos/CENTOS7/CentOS-7.0-1406-x86_64-Minimal.iso
>>  \ 
>>      --extra-args 'ks=http://www.mydomain.com/anaconda-ks.cfg ksdevice=eth0 
>> \ 
>>      ip=192.168.19.2 netmask=255.255.255.192 dns=8.8.8.8 
>> gateway=192.168.19.1 console=ttyS0,115200n8 serial’
>> 
> 
> Why do you format and mount /dev/VolGroup/lv_vm1 and then specify it as
> a disk for the VM? That looks extremely broken. You should only create
> the volume with lvcreate and then call virt-install otherwise you will
> probably end up with all kinds of corruption.

I wasn’t sure how to set this up to begin with, and was thinking that 
virt-install needed a file system to write to.
Since things were working, I didn’t question the setup . . . .

After doing as you suggested, and running fstrim on the host, I don’t have 
trouble with the VM anymore.
Thanks! :-)

Best regards,
Richard Taubo

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to