Kazunori INOUE
2013-11-28 10:52:14 UTC
Hi,
I have a question about config parameter of VirtualDomain after
following commit.
High: VirtualDomain: Ensure it is possible to manage a libvirt domain
defined outside of VirtualDomain
https://github.com/ClusterLabs/resource-agents/commit/f00dcaf194
I'm using RHEL6.4 and bundled libvirt.
$ rpm -qf `which virsh`
libvirt-client-0.10.2-18.el6.x86_64
For example, when VM is created by virt-manager, it is generated as
persistent domain.
* persistent domain : the state outputted by 'virsh list --all' even
if VM has stopped.
$ virsh list --all
Id Name State
----------------------------------------------------
- vm1 shut off
$ ls -l /etc/libvirt/qemu/vm1.xml
-rw------- 1 root root 3000 Nov 22 12:53 /etc/libvirt/qemu/vm1.xml
When making this vm1 manage by VirtualDomain, start operation will
become an error if /etc/libvirt/qemu/vm1.xml is specified as config.
Nov 28 17:10:33 bl460g1n6 crmd[7368]: notice: te_rsc_command:
Initiating action 14: start prmVM1_start_0 on bl460g1n6 (local)
Nov 28 17:10:33 bl460g1n6 crmd[7368]: info: do_lrm_rsc_op:
Performing key=14:4:0:682fec50-0325-46e1-9a59-ec77ccc7277e
op=prmVM1_start_0
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: info: log_execute: executing
- rsc:prmVM1 action:start call_id:47
Nov 28 17:10:33 bl460g1n6 VirtualDomain(prmVM1)[7727]: DEBUG: Virtual
domain vm1 is currently shut off.
Nov 28 17:10:33 bl460g1n6 VirtualDomain(prmVM1)[7727]: ERROR: Failed
to start virtual domain vm1.
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: notice: operation_finished:
prmVM1_start_0:7727:stderr [ error: Failed to open file
'/etc/libvirt/qemu/vm1.xml': No such file or directory ]
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: info: log_finished: finished
- rsc:prmVM1 action:start call_id:47 pid:7727 exit-code:1
exec-time:152ms queue-time:0ms
Nov 28 17:10:33 bl460g1n6 crmd[7368]: notice: process_lrm_event: LRM
operation prmVM1_start_0 (call=47, rc=1, cib-update=75,
confirmed=true) unknown error
Nov 28 17:10:33 bl460g1n6 crmd[7368]: warning: status_from_rc: Action
14 (prmVM1_start_0) on bl460g1n6 failed (target: 0 vs. rc: 1): Error
Nov 28 17:10:33 bl460g1n6 crmd[7368]: warning: update_failcount:
Updating failcount for prmVM1 on bl460g1n6 after failed start: rc=1
(update=INFINITY, time=1385626233)
I think that there are the two methods of avoiding.
A) Move /etc/libvirt/qemu/vm1.xml to another directory, and specify
the directory as config.
$ mv /etc/libvirt/qemu/vm1.xml /qemu/vm1.xml
primitive prmVM1 ocf:heartbeat:VirtualDomain \
params config="/qemu/vm1.xml" \
* Also when I change configuration of vm1 by virt-manager, it's
necessary to move /etc/libvirt/qemu/vm1.xml again.
B) After undefine the vm1, move the vm1.xml which evacuated to
/etc/libvirt/qemu/ and specify the /etc/libvirt/qemu/vm1.xml as
config.
$ mv /etc/libvirt/qemu/vm1.xml /tmp/vm1.xml
$ virsh undefine vm1
$ mv /tmp/vm1.xml /etc/libvirt/qemu/vm1.xml
primitive prmVM1 ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/vm1.xml" \
Which is the method assuming?
Best Regards,
Kazunori INOUE
I have a question about config parameter of VirtualDomain after
following commit.
High: VirtualDomain: Ensure it is possible to manage a libvirt domain
defined outside of VirtualDomain
https://github.com/ClusterLabs/resource-agents/commit/f00dcaf194
I'm using RHEL6.4 and bundled libvirt.
$ rpm -qf `which virsh`
libvirt-client-0.10.2-18.el6.x86_64
For example, when VM is created by virt-manager, it is generated as
persistent domain.
* persistent domain : the state outputted by 'virsh list --all' even
if VM has stopped.
$ virsh list --all
Id Name State
----------------------------------------------------
- vm1 shut off
$ ls -l /etc/libvirt/qemu/vm1.xml
-rw------- 1 root root 3000 Nov 22 12:53 /etc/libvirt/qemu/vm1.xml
When making this vm1 manage by VirtualDomain, start operation will
become an error if /etc/libvirt/qemu/vm1.xml is specified as config.
Nov 28 17:10:33 bl460g1n6 crmd[7368]: notice: te_rsc_command:
Initiating action 14: start prmVM1_start_0 on bl460g1n6 (local)
Nov 28 17:10:33 bl460g1n6 crmd[7368]: info: do_lrm_rsc_op:
Performing key=14:4:0:682fec50-0325-46e1-9a59-ec77ccc7277e
op=prmVM1_start_0
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: info: log_execute: executing
- rsc:prmVM1 action:start call_id:47
Nov 28 17:10:33 bl460g1n6 VirtualDomain(prmVM1)[7727]: DEBUG: Virtual
domain vm1 is currently shut off.
Nov 28 17:10:33 bl460g1n6 VirtualDomain(prmVM1)[7727]: ERROR: Failed
to start virtual domain vm1.
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: notice: operation_finished:
prmVM1_start_0:7727:stderr [ error: Failed to open file
'/etc/libvirt/qemu/vm1.xml': No such file or directory ]
Nov 28 17:10:33 bl460g1n6 lrmd[7365]: info: log_finished: finished
- rsc:prmVM1 action:start call_id:47 pid:7727 exit-code:1
exec-time:152ms queue-time:0ms
Nov 28 17:10:33 bl460g1n6 crmd[7368]: notice: process_lrm_event: LRM
operation prmVM1_start_0 (call=47, rc=1, cib-update=75,
confirmed=true) unknown error
Nov 28 17:10:33 bl460g1n6 crmd[7368]: warning: status_from_rc: Action
14 (prmVM1_start_0) on bl460g1n6 failed (target: 0 vs. rc: 1): Error
Nov 28 17:10:33 bl460g1n6 crmd[7368]: warning: update_failcount:
Updating failcount for prmVM1 on bl460g1n6 after failed start: rc=1
(update=INFINITY, time=1385626233)
I think that there are the two methods of avoiding.
A) Move /etc/libvirt/qemu/vm1.xml to another directory, and specify
the directory as config.
$ mv /etc/libvirt/qemu/vm1.xml /qemu/vm1.xml
primitive prmVM1 ocf:heartbeat:VirtualDomain \
params config="/qemu/vm1.xml" \
* Also when I change configuration of vm1 by virt-manager, it's
necessary to move /etc/libvirt/qemu/vm1.xml again.
B) After undefine the vm1, move the vm1.xml which evacuated to
/etc/libvirt/qemu/ and specify the /etc/libvirt/qemu/vm1.xml as
config.
$ mv /etc/libvirt/qemu/vm1.xml /tmp/vm1.xml
$ virsh undefine vm1
$ mv /tmp/vm1.xml /etc/libvirt/qemu/vm1.xml
primitive prmVM1 ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/vm1.xml" \
Which is the method assuming?
Best Regards,
Kazunori INOUE