virsh attach-disk using files and KVM

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

 



Currently virsh attach-disk interface only accepts 'file' or 'tap' for
driver type when attaching files as disks.  One can succesfully attach
a file as disk with:

virsh attach-disk <vm> <file> <drive> --driver file --type disk

which generates the following xml which is passed to libvirt:


 <disk type='file' device='disk'>
   <driver name='file' type='raw'/>
   <source file='/images/test02.img'/>
   <target dev='vdc' bus='virtio'/>
   <alias name='virtio-disk2'/>
   <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
 </disk>


Now, if you shutdown the guest and restart, libvirt complains that the
driver type 'file' isn't supported.  This is from
src/qemu/qemu_conf.c:4146 where if the driver name isn't 'qemu' it
rejects the configuration.  

How best to resolve this?  Update qemu_conf.c to accept 'file' type?
update virsh to allow specifying 'qemu' as a driver type for files?


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@xxxxxxxxxx

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]