support for the live migration with PCI passthrough devices

2020-08-25 Thread Henry lol
Hello,

I'm wondering whether the QEMU supports live migration for the VM with
passthrough devices.
if not, should I hot-unplug all those devices through libvirt or qemu cmd
before starting migration??

thanks


automatically reduced guest's memory

2020-09-14 Thread Henry lol
Hi guys,

I've just checked host memory usage for VM was gradually reduced as the
host ran out of memory.
(there was no memory change in VM)

So, I'm wondering whether QEMU supports such a native feature and how to
work.

Thanks.


Re: automatically reduced guest's memory

2020-09-15 Thread Henry lol
Sorry for the foolish question,

there was a memory ballooning daemon, and I checked that host memory
doesn't change after disabling that daemon.
Thank you.

2020년 9월 15일 (화) 오전 11:38, Henry lol 님이 작성:

> Hi guys,
>
> I've just checked host memory usage for VM was gradually reduced as the
> host ran out of memory.
> (there was no memory change in VM)
>
> So, I'm wondering whether QEMU supports such a native feature and how to
> work.
>
> Thanks.
>


Question about reduced memory by balloon driver (virtio-balloon)

2020-09-16 Thread Henry lol
Hi guys,

When a guest's memory is dynamically reduced with "balloon" QMP API, I'm
wondering whether the virtio-balloon driver in the guest is consuming such
reduced memory.

If so, how can I see that the memory virtio-balloon is consuming?
and is it possible the virtio-balloon has such a huge memory even though
it's a kernel module??

Thanks,


Change Qcow2 Source File of Live Disk

2024-12-02 Thread Henry lol
Hello,

I want to change the source file (qcow2) of a disk using qmp commands
while the guest is running.
AFAIK, this is possible with libvirt. Could I know the corresponding
qmp commands?



Re: Applying Throttle Block Filter via QMP Command

2025-02-10 Thread Henry lol
Oh, I'm really sorry.
It doesn't work as you said, and it should be throttle-node instead of
qcow2-node.

On the other hand, is it difficult to apply and manage throttle using
the QMP command?

Sincerely,

2025년 1월 27일 (월) 오후 7:42, Alberto Garcia 님이 작성:
>
> On Thu, Jan 09, 2025 at 11:02:46AM +0900, Henry lol wrote:
> > scenario where throttle works as expected
> >
> > 2-1 execute the qemu process with
> > ...
> > -object throttle-group,id=tg,x-bps-total=10485760 \
> > -blockdev 
> > '{"driver":"throttle","throttle-group":"tg","node-name":"throttle-node","file":{
> >   
> > "driver":"qcow2","node-name":"qcow2-node","file":{"driver":"file","filename":"/path/to/file.qcow2"}
> > }}' \
> > -device 
> > virtio-blk-pci,scsi=off,drive=qcow2-node,id=did,bootindex=1,bus=pci.0,addr=0x05,serial=1234
>
> How is this supposed to work as expected when the guest sees
> qcow2-node (which is the unfiltered qcow2 file) instead of
> throttle-node (which is the one that applies the limits that you set)?
>
>-device virtio-blk-pci,scsi=off,drive=qcow2-node
>  ^^
>
> If I run that example the x-bps-total limit is ignored.
>
> Berto
>



Re: Change Qcow2 Source File of Live Disk

2024-12-03 Thread Henry lol
I've handled it using snapshot related commands,
thank you

2024년 12월 3일 (화) 오후 4:18, Henry lol 님이 작성:
>
> Hello,
>
> I want to change the source file (qcow2) of a disk using qmp commands
> while the guest is running.
> AFAIK, this is possible with libvirt. Could I know the corresponding
> qmp commands?



Re: Applying Throttle Block Filter via QMP Command

2025-01-08 Thread Henry lol
I'm sorry for giving you the wrong information.
I didn't use the -drive parameter in QEMU, but the -blockdev parameter instead.

Below are the commands I used in the scenario where I/O performance
remains the same

1-1 execute the qemu process with
...
-object throttle-group,id=tg,x-bps-total=10485760 \
-blockdev 
'{"driver":"qcow2","node-name":"qcow2-node","file":{"driver":"file","filename":"/path/to/file.qcow2"}}'
\
-device 
virtio-blk-pci,scsi=off,drive=qcow2-node,id=did,bootindex=1,bus=pci.0,addr=0x05,serial=1234

1-2 run the blockdev-add command via qmp socket
{
  "execute":"blockdev-add",
  "arguments":{
"driver": "throttle",
"node-name": "throttle-node",
"throttle-group": "tg",
"file": "qcow2-node"
}}

scenario where throttle works as expected

2-1 execute the qemu process with
...
-object throttle-group,id=tg,x-bps-total=10485760 \
-blockdev 
'{"driver":"throttle","throttle-group":"tg","node-name":"throttle-node","file":{
  
"driver":"qcow2","node-name":"qcow2-node","file":{"driver":"file","filename":"/path/to/file.qcow2"}
}}' \
-device 
virtio-blk-pci,scsi=off,drive=qcow2-node,id=did,bootindex=1,bus=pci.0,addr=0x05,serial=1234

2025년 1월 8일 (수) 오후 6:45, Henry lol 님이 작성:
>
> Hello,
>
> I want to apply a throttle block filter using the QMP command, but it
> doesn't seem to work as the I/O performance remains the same.
>
> Are there any additional steps I need to follow?
> I predefined the throttle-group object and block device in the QEMU
> parameters and then used the blockdev-add QMP command to apply the
> filter, as described in the link
> - https://github.com/qemu/qemu/blob/master/docs/throttle.txt#L315-L322
>
> Additionally, I’ve confirmed that the filter works well when defined
> in the QEMU -drive parameter instead of using the QMP command.
>
> thanks,



Re: Applying Throttle Block Filter via QMP Command

2025-01-08 Thread Henry lol
Actually, the above is a simple scenario, and I want to apply a filter
to an overlay image as following.

1. Execute the QEMU process as in 1-1 or 2-1.
2. Run the command to create the overlay image
{"execute":"blockdev-snapshot-sync","arguments":{"node-name":
"qcow2-node", "snapshot-file":"/path/to/overlay.qcow2", "format":
"qcow2", "snapshot-node-name": "overlay-node"}}

3. run the blockdev-add command to apply filter
{
  "execute":"blockdev-add",
  "arguments":{
"driver": "throttle",
"node-name": "throttle-node2",
"throttle-group": "tg",
"file": "overlay-node"
}}

Sincerely,

2025년 1월 9일 (목) 오전 11:02, Henry lol 님이 작성:
>
> I'm sorry for giving you the wrong information.
> I didn't use the -drive parameter in QEMU, but the -blockdev parameter 
> instead.
>
> Below are the commands I used in the scenario where I/O performance
> remains the same
>
> 1-1 execute the qemu process with
> ...
> -object throttle-group,id=tg,x-bps-total=10485760 \
> -blockdev 
> '{"driver":"qcow2","node-name":"qcow2-node","file":{"driver":"file","filename":"/path/to/file.qcow2"}}'
> \
> -device 
> virtio-blk-pci,scsi=off,drive=qcow2-node,id=did,bootindex=1,bus=pci.0,addr=0x05,serial=1234
>
> 1-2 run the blockdev-add command via qmp socket
> {
>   "execute":"blockdev-add",
>   "arguments":{
> "driver": "throttle",
> "node-name": "throttle-node",
> "throttle-group": "tg",
> "file": "qcow2-node"
> }}
>
> scenario where throttle works as expected
>
> 2-1 execute the qemu process with
> ...
> -object throttle-group,id=tg,x-bps-total=10485760 \
> -blockdev 
> '{"driver":"throttle","throttle-group":"tg","node-name":"throttle-node","file":{
>   
> "driver":"qcow2","node-name":"qcow2-node","file":{"driver":"file","filename":"/path/to/file.qcow2"}
> }}' \
> -device 
> virtio-blk-pci,scsi=off,drive=qcow2-node,id=did,bootindex=1,bus=pci.0,addr=0x05,serial=1234
>
> 2025년 1월 8일 (수) 오후 6:45, Henry lol 님이 작성:
> >
> > Hello,
> >
> > I want to apply a throttle block filter using the QMP command, but it
> > doesn't seem to work as the I/O performance remains the same.
> >
> > Are there any additional steps I need to follow?
> > I predefined the throttle-group object and block device in the QEMU
> > parameters and then used the blockdev-add QMP command to apply the
> > filter, as described in the link
> > - https://github.com/qemu/qemu/blob/master/docs/throttle.txt#L315-L322
> >
> > Additionally, I’ve confirmed that the filter works well when defined
> > in the QEMU -drive parameter instead of using the QMP command.
> >
> > thanks,



Applying Throttle Block Filter via QMP Command

2025-01-08 Thread Henry lol
Hello,

I want to apply a throttle block filter using the QMP command, but it
doesn't seem to work as the I/O performance remains the same.

Are there any additional steps I need to follow?
I predefined the throttle-group object and block device in the QEMU
parameters and then used the blockdev-add QMP command to apply the
filter, as described in the link
- https://github.com/qemu/qemu/blob/master/docs/throttle.txt#L315-L322

Additionally, I’ve confirmed that the filter works well when defined
in the QEMU -drive parameter instead of using the QMP command.

thanks,



Re: Applying Throttle Block Filter via QMP Command

2025-03-27 Thread Henry lol
Thanks!

Could I get more examples to apply them to an already attached disk?
It doesn't seem to work and may require more steps for the attached disk.

2025년 2월 25일 (화) 오전 4:30, Alberto Garcia 님이 작성:
>
> On Mon, Feb 10, 2025 at 08:21:51PM +0900, Henry lol wrote:
> > On the other hand, is it difficult to apply and manage throttle
> > using the QMP command?
>
> Sorry that I took so long to reply, here are some examples:
>
> https://github.com/qemu/qemu/blob/v9.2.2/tests/qemu-iotests/184#L66
> https://github.com/qemu/qemu/blob/v9.2.2/tests/qemu-iotests/184#L147
> https://github.com/qemu/qemu/blob/v9.2.2/qapi/block-core.json#L2699
>
> Berto
>



Re: Applying Throttle Block Filter via QMP Command

2025-04-07 Thread Henry lol
I agree with you. It seems almost impossible.
I’ll open a new thread about it. Thank you :)

Sincerely,

2025년 4월 4일 (금) 오전 3:18, Alberto Garcia 님이 작성:
>
> On Thu, Apr 03, 2025 at 03:29:31PM +0900, Henry lol wrote:
> > Finally, is it possible to set the throttle filter as the top node
> > like "throttle filter -> qcow2 -> file node"?
>
> I'm probably forgetting something but I'm not sure if it's possible
> to do that dynamically. One way to insert a new top node is with
> 'blockdev-snapshot' but I don't think that it would work in this case.
>
> Berto
>



Replacing Top Block Device Node on Running VM

2025-04-07 Thread Henry lol
Hello,

I want to replace the top node of a block device attached to a running
VM (for example, switching a throttle node to a qcow2 node or vice
versa).

Is there any way to do this without restarting the VM with a new block
device configuration?

Sincerely,



Dynamically Reconfiguring a Block Device

2025-03-11 Thread Henry lol
Hello,

I want to dynamically reconfigure a block device, as described on page
28 of https://www.linux-kvm.org/images/d/d5/02x07a-Blockdev.pdf.
More specifically, I want to take a live snapshot and add an I/O
throttling filter.

I found that the QMP feature x-blockdev-change can reconfigure the
device, but it seems to support only the Quorum driver.
Is there any other way to achieve this?

Sincerely,



Re: Applying Throttle Block Filter via QMP Command

2025-04-02 Thread Henry lol
I inserted a throttle filter between the qcow2 and file nodes, and it
works well! Thanks a lot.

Finally, is it possible to set the throttle filter as the top node
like "throttle filter -> qcow2 -> file node"?
If so, I assume, not sure, the frontend block device would need to be
dynamically reconfigured to point to the new throttle filter node.

Sincerely,

2025년 3월 31일 (월) 오후 7:39, Alberto Garcia 님이 작성:
>
> On Fri, Mar 28, 2025 at 11:29:30AM +0900, Henry lol wrote:
> > Could I get more examples to apply them to an already attached disk?
> > It doesn't seem to work and may require more steps for the attached disk.
>
> Hi,
>
> if you want to add a filter to an attached disk then I think that this
> is the example you are looking for:
>
> https://gitlab.com/qemu-project/qemu/-/blob/v9.2.3/tests/qemu-iotests/245#L568
>
> Berto
>



How to Resolve a Complex qcow2 Backing File Path

2025-06-23 Thread Henry lol
Hello,

Is there any way to change the backing file path of qcow2 being used by a vm?
rebase failed due to a lock.

for example,

before
$ qemu-img info qcow2-file
...
backing file: json:{"backing": {"driver": "qcow2", "file":
{"throttle-group": "tg", "driver": "throttle", ...

after
$ qemu-img info qcow2-file
...
backing file: /path/to/backing/file

In many cases, qcow2-related commands such as virt-* fail to work due
to the complex backing file format shown above.

such a qcow2 file is generated when running the blockdev-snapshot-sync
qmp on a device that has a throttle filter between qcow2 and file
nodes.

or is it possible to explicitly specify the backing file path when
running blockdev-snapshot-sync?

Sincerely,



Re: VM Shuts Down When Running blockdev-add Command

2025-07-04 Thread Henry lol
It seems that the issue is caused by using iothread.
A segmentation fault occurs at the mutex lock section when using iothread.

Additionally, this appears to be the same issue as described in the
link below—has it still not been resolved?
- https://bugzilla.redhat.com/show_bug.cgi?id=2067118

2025년 7월 3일 (목) 오후 9:27, Henry lol 님이 작성:
>
> Hello,
>
> The VM shuts down without any response when I run the following
> blockdev-add QMP command.
> - 
> '{"execute":"blockdev-add","arguments":{"driver":"throttle","node-name":"tn1","throttle-group":"tg1","file":{"driver":"throttle","node-name":"tn2","throttle-group":"tg2","file":"#block656"}}}'
> where the throttle groups are already defined, and #block656 is the
> node name of a file drive that is currently in use.
>
> Are there any precautions I should be aware of when using it?



VM Shuts Down When Running blockdev-add Command

2025-07-03 Thread Henry lol
Hello,

The VM shuts down without any response when I run the following
blockdev-add QMP command.
- 
'{"execute":"blockdev-add","arguments":{"driver":"throttle","node-name":"tn1","throttle-group":"tg1","file":{"driver":"throttle","node-name":"tn2","throttle-group":"tg2","file":"#block656"}}}'
where the throttle groups are already defined, and #block656 is the
node name of a file drive that is currently in use.

Are there any precautions I should be aware of when using it?