[PATCH] bug fix: setup disks to use cache=none to support live migration.

When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>""" -- 1.8.3.1

Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> On 03/05/2014 12:51 PM, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters.
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""

Applied. Thanks. Regards, Aline Manera

On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm?
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""

于 2014/3/6 8:46, Royce Lv 写道:
On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm?
Agree. I can imagine the bad performance with disk's cache off. Can we re-enable it after the VM migrated?
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 03/06/2014 08:46 AM, Royce Lv wrote:
On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm? Agree.
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

On 03/05/2014 11:44 PM, Sheldon wrote:
On 03/06/2014 08:46 AM, Royce Lv wrote:
On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm? Agree.
Patches are welcome! =)
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

I also worried about that, but I know that the performance team in the past said it was okay, as long as you're running a newer OS: https://ltc3.linux.ibm.com/wiki/LinuxPerformance/KVM-Performance-Tuning We might want to check with the performance team, unless there's a specific case which we know will be impacted by cache=none. Regards, Christy On Thu, 2014-03-06 at 12:23 -0300, Aline Manera wrote:
On 03/05/2014 11:44 PM, Sheldon wrote:
On 03/06/2014 08:46 AM, Royce Lv wrote:
On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm? Agree.
Patches are welcome! =)
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 2014年03月08日 04:55, Christy Perez wrote:
I also worried about that, but I know that the performance team in the past said it was okay, as long as you're running a newer OS:
https://ltc3.linux.ibm.com/wiki/LinuxPerformance/KVM-Performance-Tuning
We might want to check with the performance team, unless there's a specific case which we know will be impacted by cache=none.
Regards,
Christy Thanks for your information Christy, pls keep us update.
On Thu, 2014-03-06 at 12:23 -0300, Aline Manera wrote:
On 03/05/2014 11:44 PM, Sheldon wrote:
On 03/06/2014 08:46 AM, Royce Lv wrote:
On 2014年03月05日 23:51, Paulo Vital wrote:
When executing a virsh live migration of a VM created by Kimchi, the migration stops due to miss configuration "cache=none" on disk's performance parameters. I'm little worried about make cache 'none' will cause performance downgrade for guest in daily running. Can we allow update this parameter in vm disk edit and change it when we decide to live migrate a vm? Agree. Patches are welcome! =)
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com> --- src/kimchi/vmtemplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py index e2d78a4..89b5e72 100644 --- a/src/kimchi/vmtemplate.py +++ b/src/kimchi/vmtemplate.py @@ -152,7 +152,7 @@ class VMTemplate(object): params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus']} ret += """ <disk type='file' device='disk'> - <driver name='qemu' type='qcow2'/> + <driver name='qemu' type='qcow2' cache='none'/> <source file='%(src)s' /> <target dev='%(dev)s' bus='%(bus)s' /> </disk> @@ -182,7 +182,7 @@ class VMTemplate(object): # Passthrough configuration disk_xml = """ <disk type='volume' device='lun'> - <driver name='qemu' type='raw'/> + <driver name='qemu' type='raw' cache='none'/> <source dev='%(src)s'/> <target dev='%(dev)s' bus='scsi'/> </disk>"""
Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (7)
-
Aline Manera
-
Christy Perez
-
Daniel H Barboza
-
Paulo Vital
-
Royce Lv
-
Sheldon
-
Shu Ming