On 26.03.2010, at 10:56, Ruben S, Montero wrote:
> Well actually is the opposite: the patch defaults the driver to use
> qemu:///system. It also does a touch to the checkpoint file before
> saving the image so it belongs to oneadmin and not to root.
Okay, I just assumed the possibility to change the driver was a suggestion to use qemu:///session (in the bug description it is mentioned as well).
I just missed the touch command. It works like a charm.
Unfortunately the changeset cannot be easily integrated into OpenNebula 1.2 since one_vmm_kvm.rb seems to be completely rewritten in OpenNebula 1.4. However, I made a small, quick and very dirty workaround for the current OpenNebula implementation of Karmic. Below you can see the patch that needs to be applied to /usr/lib/one/mads/one_vmm_kvm.rb.
Yet there is still another problem. AppArmor prevents libvirt to write checkpoints outside of oneadmin's home. Is there an open bug ticket for that or should I file a new one? There was a similar bug report in an earlier Ubuntu release but the fix only gave libvirt the ability to write inside the user's home and not in /var/lib/one/...
Hi,
On 26.03.2010, at 10:56, Ruben S, Montero wrote:
> Well actually is the opposite: the patch defaults the driver to use
> qemu:///system. It also does a touch to the checkpoint file before
> saving the image so it belongs to oneadmin and not to root.
Okay, I just assumed the possibility to change the driver was a suggestion to use qemu:///session (in the bug description it is mentioned as well).
I just missed the touch command. It works like a charm.
> You can check the commit dev.opennebula. org/projects/ opennebula/ repository/ revisions/ f8252cfe8bc49bc 0ecec376476b711 e5d2f1c5dd
>
> http://
Unfortunately the changeset cannot be easily integrated into OpenNebula 1.2 since one_vmm_kvm.rb seems to be completely rewritten in OpenNebula 1.4. However, I made a small, quick and very dirty workaround for the current OpenNebula implementation of Karmic. Below you can see the patch that needs to be applied to /usr/lib/ one/mads/ one_vmm_ kvm.rb.
Yet there is still another problem. AppArmor prevents libvirt to write checkpoints outside of oneadmin's home. Is there an open bug ticket for that or should I file a new one? There was a similar bug report in an earlier Ubuntu release but the fix only gave libvirt the ability to write inside the user's home and not in /var/lib/one/...
$ diff -u /usr/lib/ one/mads/ one_vmm_ kvm.ubuntu- orig.rb /usr/lib/ one/mads/ one_vmm_ kvm.rb one/mads/ one_vmm_ kvm.ubuntu- orig.rb 2010-03-26 19:30:51.434615520 +0100 one/mads/ one_vmm_ kvm.rb 2010-03-26 19:58:07.475803935 +0100
--- /usr/lib/
+++ /usr/lib/
@@ -112,6 +112,7 @@
end
def action_save(args) t_file( args[2] , args[4])
std_action( "SAVE", "save #{args[3]} #{args[4]}", args)
+ touch_checkpoin
end
@@ -179,6 +180,18 @@
res[0] .close t_file( host, file) "TOUCH" , stdout, stderr, file)
res
end
+
+ def touch_checkpoin
+ res=Open3.popen3(
+ "ssh -n #{host} touch #{file} ;"+
+ " echo ExitCode: $? 1>&2")
+ res[0].close
+
+ stdout=res[1].read
+ stderr=res[2].read
+
+ write_response(
+ end
def write_response( action, stdout, stderr, args)
exit_ code=get_ exit_code( stderr)