Skip to contentSkip to conversation

question about qemu migrate.

Qemu-devel Sheldon 2 participants 5 messages Jul 22, 2012 – Jul 23, 2012

lore
Share & tools
lore

Sheldon

author
#0 lore raw

I find there are four kinds of uri for qmp_migrate "tcp:", "exec:", "unix:", and "fd:"

now I want to migrate the vm to a local file with "exec:" uri by hmp-command.

How should I do the migration?

#1 lore raw
Quoted 9 lines · Sheldon

I find there are four kinds of uri for qmp_migrate "tcp:", "exec:", "unix:", and "fd:"

now I want to migrate the vm to a local file with "exec:" uri by hmp-command.

How should I do the migration?

(qemu) migrate -d exec:cat>/tmp/vm.out
.... -incoming fd:</tmp/vm.out

author
#2 lore raw
Quoted 6 lines · Amos Kong

On Sun, Jul 22, 2012 at 12:30 PM, Sheldon <[email protected] <mailto:[email protected]>> wrote:

I find there are four kinds of uri for qmp_migrate "tcp:", "exec:", "unix:", and "fd:"

Quoted 8 lines

now I want to migrate the vm to a local file with "exec:" uri by hmp-command.

How should I do the migration?

(qemu) migrate -d exec:cat>/tmp/vm.out
.... -incoming fd:</tmp/vm.out

thank you. it can work now.
there are still some questions.
1. the migration file vm.out is a QEMU suspend to disk image. How can I reboot vm.out by QEMU?

2. I execute "migrate" with -b option, seems that the "migrate" runs at background.
I cat get the "migrate" information by qmp , there is a { "execute": "query-migrate" } command in qmp-command. But I can not get the the "migrate" information by hmp, there is not a "query-migrate" command in hmp-command.

#3 lore raw
Quoted 9 lines · Sheldon

(qemu) migrate -d exec:cat>/tmp/vm.out
.... -incoming fd:</tmp/vm.out

thank you. it can work now.
there are still some questions.
1. the migration file vm.out is a QEMU suspend to disk image. How can I reboot vm.out by QEMU?

Load the suspend vm.out by # qemu-kvm .... incoming fd</tmp/vm.out, and execute monitor cmd to reboot # system_reset.
Then re-dump VM to disk by (qemu) migrate -d exec:cat>/tmp/vm.out2

Is it satisfied for you?

Quoted 8 lines

2. I execute "migrate" with -b option, seems that the "migrate" runs at background.
I cat get the "migrate" information by qmp , there is a { "execute":
"query-migrate" } command in qmp-command.

But I can not get the the "migrate" information by hmp, there is not a "query-migrate" command in hmp-command.

(qemu) info migrate

info commands(for hmp) always correspond with query commands(for qmp), some query-cmds are not implemented right now (eg. query-network)

hmp qmp
--- ---
info status -> query-status
info block -> query-block
info pci -> query-pci
....

author
#4 lore raw
Quoted 10 lines · Amos Kong
Quoted 8 lines · Sheldon

(qemu) migrate -d exec:cat>/tmp/vm.out
.... -incoming fd:</tmp/vm.out

thank you. it can work now.
there are still some questions.
1. the migration file vm.out is a QEMU suspend to disk image. How can I reboot vm.out by QEMU?

Quoted 5 lines

Load the suspend vm.out by # qemu-kvm .... incoming fd</tmp/vm.out, and execute monitor cmd to reboot # system_reset.
Then re-dump VM to disk by (qemu) migrate -d exec:cat>/tmp/vm.out2

Is it satisfied for you?

Thank for your patience.

Load the suspend vm.out by # qemu-kvm .... incoming fd</tmp/vm.out,

Actual, I have not do it successfully. For I can not load the suspend vm.out, the hmp terminal report "load of migration failed"

When "migrate" with -b option (full copy of disk), the suspend vm.out will copy the source image. So if I Load the suspend vm.out, does the qemu need the source image?

Quoted 14 lines
Quoted 8 lines

2. I execute "migrate" with -b option, seems that the "migrate" runs at background.
I cat get the "migrate" information by qmp , there is a { "execute":
"query-migrate" } command in qmp-command.

But I can not get the the "migrate" information by hmp, there is not a "query-migrate" command in hmp-command.

(qemu) info migrate

info commands(for hmp) always correspond with query commands(for qmp), some query-cmds are not implemented right now (eg. query-network)

Quoted 6 lines

hmp qmp
--- ---
info status -> query-status
info block -> query-block
info pci -> query-pci
....

got it. Thank you again.