1
I assigned some volumes to my VM on kvm. Now I want to remove those volumes. I used virsh vol-delete command and deleted those volumes. Still from the guest side, can see those volumes!!!. lsblk, fdisk etc is listing those volumes. It is not a stale entry. I can even make files on those volumes. I rebooted my guest, but no luck.
list below shows no volumes in the pool now . Only it has boot volumes., but guest is showing already deleted volumes as well!
virsh # pool-list
Name State Autostart
-------------------------------------------
default active yes
pool_1 active yes
vm-images active yes
virsh # vol-list --pool default --->boot volume
Name Path
-----------------------------------------------------------------------
-------
GOS_1.qcow2 /var/lib/libvirt/images/GOS_1.qcow2
virsh # vol-list --pool pool_1 ---> I deleted from this pool
Name Path
------------------------------------------------------------------------------
virsh # vol-list --pool vm-images --->just vm image backup
Name Path
-----------------------------------------------------------------------
-------
centos70_vdisk.raw /container/vm-images/centos70_vdisk.raw
virsh #
From my guest:
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3G 0 disk ---ghost partition now
└─sda1 8:1 0 3G 0 part
sdb 8:16 0 20G 0 disk ----ghost partition now
sdc 8:32 0 20G 0 disk ---ghost partition now
sdd 8:48 0 4G 0 disk --boot
├─sdd1 8:49 0 500M 0 part /boot
└─sdd2 8:50 0 3.5G 0 part
├─centos-swap 253:0 0 412M 0 lvm [SWAP]
└─centos-root 253:1 0 3.1G 0 lvm /
[root@localhost ~]#
[root@localhost ~]#
But I can see from dumpxml command, vm has
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/container/pool/TEST.qcow2'/>
<backingStore/>
<target dev='sdc' bus='scsi'/>
<alias name='scsi0-0-0-2'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
But no disk in the location.
[root@localhost ~]# ls /container/pool
[root@localhost ~]# ls -a /container/pool
. ..
[root@localhost ~]#
I restarted the vm from guest now, Its not booting up.
I thinks its domain xml already has those removed disk and when I tried to start the guest from host, it searched for the volumes and couldn't find it ? – syam – 2018-02-25T04:47:18.273
Yes. You removed image, but not all references to it from guests. – Mikhail Moskalev – 2018-03-01T17:29:02.427
Your question has no question. I tried to answer to question "How guest can still be running well when disk image already removed?" – Mikhail Moskalev – 2018-03-01T17:30:47.840