
info+linux-ha-dev at polnik
Jan 20, 2012, 5:13 AM
Post #1 of 1
(147 views)
Permalink
|
|
ocf:heartbeat:VirtDomain extension to use qemu+ssh with a normal user
|
|
Hello, it is possible to use an user name to migrate a domain via qemu+ssh? I checked the function VirtualDomain_Migrate_To but I did not find any hint, how I can migrate a domain with a normal user. So I extend this agent a little bit. Shure, this is a quick'n'dirty hack and I can not promise, that this extension will work in all cases, but this solves my problem (ssh login/migration via root is not possible/allowed). > diff VirtualDomain.orig VirtualDomain 68a69,76 > <parameter name="user" unique="0" required="0"> > <longdesc lang="en"> > longdesc for user > </longdesc> > <shortdesc lang="en">User for Migration</shortdesc> > <content type="string" default=""/> > </parameter> > 320a329 > local user 330a340,342 > if [ -n "${OCF_RESKEY_user}" ]; then > user="${OCF_RESKEY_user}@" > fi 356c368 < remoteuri=$(echo ${OCF_RESKEY_hypervisor} | sed -e "s,\(.*\)://[^/:]*\(:\?[0-9]*\)/\(.*\),\1${transport_suffix}://${target_node}\2/\3,") --- > remoteuri=$(echo ${OCF_RESKEY_hypervisor} | sed -e "s,\(.*\)://[^/:]*\(:\?[0-9]*\)/\(.*\),\1${transport_suffix}://${user}${target_node}\2/\3,") Now I can define a primitive like this: primitive resVirt_ubuntu64bit ocf:heartbeat:VirtualDomain \ meta allow-migrate="true" \ params config="/etc/libvirt/qemu/ubuntu-64bit-2.xml" migration_transport="ssh" user="polnik" ... and I can migrate a domain via ssh with an normal user. btw: Is there any new version planned for this agents in the near future, i.e. to use follow migration options: migrate-setmaxdowntime migrate-setspeed Best regards, thomas. _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev [at] lists http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
|