Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF4D210499 for ; Mon, 16 Sep 2013 09:11:42 +0000 (UTC) Received: (qmail 33733 invoked by uid 500); 16 Sep 2013 09:11:13 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 33537 invoked by uid 500); 16 Sep 2013 09:11:09 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 32470 invoked by uid 99); 16 Sep 2013 09:11:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Sep 2013 09:11:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2774E90565A; Mon, 16 Sep 2013 09:11:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: widodh@apache.org To: commits@cloudstack.apache.org Date: Mon, 16 Sep 2013 09:11:47 -0000 Message-Id: In-Reply-To: <734a2c281f734629af53032b1d154841@git.apache.org> References: <734a2c281f734629af53032b1d154841@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [49/50] [abbrv] Merge branch 'master' into kvm-vnc-listen http://git-wip-us.apache.org/repos/asf/cloudstack/blob/895c51d0/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java ---------------------------------------------------------------------- diff --cc plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index e253cb5,94ee9ae..4916b7b --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@@ -2634,23 -2881,7 +2882,22 @@@ ServerResource try { conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); ifaces = getInterfaces(conn, vmName); - dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName - .getBytes())); + dm = conn.domainLookupByName(vmName); + /* + We replace the private IP address with the address of the destination host. + This is because the VNC listens on the private IP address of the hypervisor, + but that address is ofcourse different on the target host. + + MigrateCommand.getDestinationIp() returns the private IP address of the target + hypervisor. So it's safe to use. + + The Domain.migrate method from libvirt supports passing a different XML + description for the instance to be used on the target host. + - This is supported by libvirt-java from version 0.50.0 ++ This is supported by libvirt-java from version 0.5.0 + */ + xmlDesc = dm.getXMLDesc(0).replace(_privateIp, cmd.getDestinationIp()); + dconn = new Connect("qemu+tcp://" + cmd.getDestinationIp() + "/system"); /* @@@ -3184,7 -3439,9 +3455,9 @@@ ConsoleDef console = new ConsoleDef("pty", null, null, (short) 0); devices.addDevice(console); - GraphicDef grap = new GraphicDef("vnc", (short) 0, true, vmTO.getVncAddr(), null, + //add the VNC port passwd here, get the passwd from the vmInstance. + String passwd = vmTO.getVncPassword(); - GraphicDef grap = new GraphicDef("vnc", (short) 0, true, null, passwd, ++ GraphicDef grap = new GraphicDef("vnc", (short) 0, true, vmTO.getVncAddr(), passwd, null); devices.addDevice(grap); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/895c51d0/pom.xml ---------------------------------------------------------------------- diff --cc pom.xml index 6208124,4013fa6..6d9a30f --- a/pom.xml +++ b/pom.xml @@@ -91,7 -81,11 +81,11 @@@ 0.9.8 0.10 build/replace.properties -- 0.4.9 ++ 0.5.0 + 0.1.3 + target + 1.0.10 - 3.0.9 ++ 4.0.0