qemu arguments
by Pierre Clouzet
Hello,
I've recently tried libvirt api to manage virtual machine.
The point of my work is to modify the topology of a virtual machine and test performances (add numa nodes, change number of cpu per numa, nvm devices, cxl, etc)
As far as understand, when using virt-manager, qemu arguments stored in xml files can only be like the one that page:
[ https://wiki.libvirt.org/QEMUSwitchToLibvirt.html | https://wiki.libvirt.org/QEMUSwitchToLibvirt.html ]
But maybe I misundertood?
For example, when I directly run qemu with arguments, I can add an arguments like this:
qemu [...] -object memory-backend-ram,size=4G,id=ram0
-object memory-backend-ram,size=2G,id=ram1
-numa node,nodeid=0,memdev=ram0,cpus=0-3
-numa node,nodeid=1,memdev=ram1,cpus=4-7
To have 2 numa nodes with 4 cpus each.
Is there an equivalent of -objet, -numa, -device; qemu arguments when using libvirt? Or arguments are restricted to the one described on wiki page?
Thanks for you help,
Have a good day,
Pierre Clouzet
9 months, 2 weeks
Migrating volumes to RBD/Ceph
by Julian Calaby
Hi,
I have a fancy new Ceph cluster and have configured a storage pool
using it in libvirt. I have a bunch of disk images in a "filesystem
directory" storage pool. I want to migrate those disk images into the
RBD pool.
What is the process for doing this?
I'm using libvirt from Debian Bookworm, version 9.0.0 and QEMU version 7.2.
I have an XML file to define my new volume:
<volume type='file'>
<name>volume</name>
<capacity unit='bytes'>8589934592</capacity>
<allocation unit='bytes'>6747271168</allocation>
<physical unit='bytes'>6747258880</physical>
</volume>
and I have tried:
1. virsh vol-create-from
# virsh vol-create-from ceph volume.xml --inputpool default
/var/lib/libvirt/images/volume.qcow2
error: Failed to create vol from volume.xml
error: failed to open the RBD image 'volume.qcow2': No such file or directory
No idea why it's trying to load "volume.qcow2" from within RBD when
I've told it that it's in the default filesystem directory pool and
provided a full path.
2. virsh blockcopy
No idea how to actually achieve what I want here as it doesn't seem
capable of copying to a non-file destination.
3. virsh vol-download and virsh vol-upload
# mkfifo tmp
# virsh vol-create --pool ceph volume.xml
Vol volume created from volume.xml
root@multimedia:~# virsh vol-list ceph
Name Path
------------------------------------------
torrentbucket VM_images/volume
root@multimedia:~# virsh vol-download --pool default volume.qcow2 tmp &
[1] 2483977
root@multimedia:~# virsh vol-upload --pool ceph volume tmp
error: cannot upload to volume volume
error: this function is not supported by the connection driver:
storage pool doesn't support volume upload
I cannot believe that any sane virtual machine management solution
does not have a way to achieve this, so clearly I'm missing something
painfully obvious here. I've done a lot of searching for solutions and
everything I've found either doesn't work for my specific case or is
specifically for copying volumes within a pool or between files on a
disk.
Could someone please provide me with a working example of how to achieve this?
Thanks,
--
Julian Calaby
Email: julian.calaby(a)gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
9 months, 2 weeks