KVM and libvirt: How to configure a new disc device to an existing VM?
        Posted  
        
            by 
                initall
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by initall
        
        
        
        Published on 2011-03-07T15:42:20Z
        Indexed on 
            2012/12/08
            23:09 UTC
        
        
        Read the original article
        Hit count: 307
        
I've got an Ubuntu 9.04 server running two VM's. In /etc/libvirt/qemu/machine1.xml two disk devices are defined like this:
<devices>
 <emulator>/usr/bin/kvm</emulator>
 <disk type='file' device='disk'>
   <source file='/vserver/machine1/disk0.qcow2'/>
   <target dev='hda' bus='ide'/>
 </disk>
 <disk type='file' device='disk'>
   <source file='/vserver/machine1/disk1.qcow2'/>
   <target dev='hdb' bus='ide'/>
 </disk>
I need more storage space in at least one of the devices and thought about adding a third hdc device by simply adding one with same style as above and re-organising my mount structure (The virtual sizes of the current qcow2 files are unfortunately limited.)
My problem is that reloading libvirtd and restarting the VM do not result in a new visible device (checked with fdisk).
I'm aware of extending an existing qcow2 file (converting to raw format, cat-ing/adding the new one, using smth. like gparted) - but only as a last resort.
Hopefully it's something very simple I'm missing?
© Server Fault or respective owner