Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with virsh commands
    primarykey
    data
    text
    <p>I have been trying to use virsh attah-disk to attach a qcow2 file as additional storage source. The syntax i am using is (from internet):</p> <pre><code>virsh attach-disk --driver file vm2 disk2.qcow2 hdc </code></pre> <p>If the vm is running or paused it shows:</p> <pre><code>error: this function is not supported by the hypervisor: disk bus 'ide' cannot be hotplugged. </code></pre> <p>If the vm is shutdown it shows:</p> <pre><code>error: Requested operation is not valid: cannot attach device on inactive domain </code></pre> <p>I am not sure about the hdc parameter. I have tried using attach-device function also with xml file as:</p> <pre><code>&lt;disk type="file" device="disk"&gt; &lt;driver name="file"/&gt; &lt;source file="/gfs1/disk2.qcow2"/&gt; &lt;target dev="hdc"/&gt; &lt;/disk&gt; </code></pre> <p>But this also shows:</p> <pre><code>error: Failed to attach device from /gfs1/disk2tovm2.xml error: this function is not supported by the hypervisor: disk bus 'ide' cannot be hotplugged. </code></pre> <p>I looked at many examples but none of them worked and all had almost the same syntax. If someone could help me figure out the error.</p> <h2>COMPLETE CONFIGURATION FILE OF VM</h2> <pre><code>root@blade1:/vms# virsh dumpxml vm2 &lt;domain type='kvm' id='33'&gt; &lt;name&gt;vm2&lt;/name&gt; &lt;uuid&gt;70affd5d-af95-72c5-2d96-c131f46409b6&lt;/uuid&gt; &lt;description&gt;--autostart&lt;/description&gt; &lt;memory&gt;1048576&lt;/memory&gt; &lt;currentMemory&gt;1048576&lt;/currentMemory&gt; &lt;vcpu&gt;2&lt;/vcpu&gt; &lt;os&gt; &lt;type arch='i686' machine='pc-0.14'&gt;hvm&lt;/type&gt; &lt;boot dev='hd'/&gt; &lt;/os&gt; &lt;features&gt; &lt;acpi/&gt; &lt;apic/&gt; &lt;pae/&gt; &lt;/features&gt; &lt;clock offset='utc'/&gt; &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt; &lt;on_reboot&gt;restart&lt;/on_reboot&gt; &lt;on_crash&gt;restart&lt;/on_crash&gt; &lt;devices&gt; &lt;emulator&gt;/usr/bin/kvm&lt;/emulator&gt; &lt;disk type='file' device='disk'&gt; &lt;driver name='qemu' type='qcow2'/&gt; &lt;source file='/vms/vm2.qcow2'/&gt; &lt;target dev='vda' bus='virtio'/&gt; &lt;alias name='virtio-disk0'/&gt; &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/&gt; &lt;/disk&gt; &lt;interface type='bridge'&gt; &lt;mac address='52:54:00:5e:98:e4'/&gt; &lt;source bridge='br0'/&gt; &lt;target dev='vnet0'/&gt; &lt;alias name='net0'/&gt; &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/&gt; &lt;/interface&gt; &lt;serial type='pty'&gt; &lt;source path='/dev/pts/0'/&gt; &lt;target port='0'/&gt; &lt;alias name='serial0'/&gt; &lt;/serial&gt; &lt;console type='pty' tty='/dev/pts/0'&gt; &lt;source path='/dev/pts/0'/&gt; &lt;target type='serial' port='0'/&gt; &lt;alias name='serial0'/&gt; &lt;/console&gt; &lt;input type='mouse' bus='ps2'/&gt; &lt;graphics type='vnc' port='6900' autoport='no' listen='0.0.0.0'/&gt; &lt;video&gt; &lt;model type='cirrus' vram='9216' heads='1'/&gt; &lt;alias name='video0'/&gt; &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/&gt; &lt;/video&gt; &lt;memballoon model='virtio'&gt; &lt;alias name='balloon0'/&gt; &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/&gt; &lt;/memballoon&gt; &lt;/devices&gt; &lt;seclabel type='dynamic' model='apparmor'&gt; &lt;label&gt;libvirt-70affd5d-af95-72c5-2d96-c131f46409b6&lt;/label&gt; &lt;imagelabel&gt;libvirt-70affd5d-af95-72c5-2d96-c131f46409b6&lt;/imagelabel&gt; &lt;/seclabel&gt; &lt;/domain&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload