Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 346B1117D2 for ; Wed, 14 May 2014 10:40:45 +0000 (UTC) Received: (qmail 43485 invoked by uid 500); 14 May 2014 08:54:03 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 43445 invoked by uid 500); 14 May 2014 08:54:03 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 43437 invoked by uid 99); 14 May 2014 08:54:03 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2014 08:54:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of runseb@gmail.com designates 74.125.83.42 as permitted sender) Received: from [74.125.83.42] (HELO mail-ee0-f42.google.com) (74.125.83.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2014 08:54:00 +0000 Received: by mail-ee0-f42.google.com with SMTP id d49so1102062eek.15 for ; Wed, 14 May 2014 01:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=g3+4bx9Cgf09BwP6JmkRNK6cbtfqwww4Er4JsdLwMTc=; b=uxf3PqAY3LqyBwtEttuXuaKOKuKZ8O+4b8ucBr+3y6mvFRXYyMhBTpcU584i31+Llv O8dCb7syc5iXHk7xjbyAeSLw+TlzzrdWkA+dk4aEPbvch2y3djCZ0BbzfMeIRCNEGfye iy0jjyNeet8ndAA49chKw1h0Cbr+9lyQo58ewLt3i4wcOJOg3R61HfqXoEpj7LZTE225 NRMw8m9sH9DM5arlLsG3gsPub9x6JrXVB5jybIBrk63wwKnycehjtlIGxbeHqtp6IS6h qblmZ6bCvmWgNxxXRZc9gBS5MYSE6kAXHgMFHbY7YIxupac3ggu0cqk60Jou5AkFlqVg f/mw== X-Received: by 10.15.53.135 with SMTP id r7mr1820680eew.102.1400057617418; Wed, 14 May 2014 01:53:37 -0700 (PDT) Received: from [10.0.0.3] (202-193.193-178.cust.bluewin.ch. [178.193.193.202]) by mx.google.com with ESMTPSA id h49sm3500047eeg.21.2014.05.14.01.53.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 01:53:35 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: Support pure Xen as a hypervisor follow-up From: sebgoa In-Reply-To: Date: Wed, 14 May 2014 10:53:34 +0200 Cc: "tmackey@gmail.com" Content-Transfer-Encoding: quoted-printable Message-Id: <2A6A27E4-A523-4C00-A77D-1129D93AF3EA@gmail.com> References: To: dev@cloudstack.apache.org X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org On Apr 9, 2014, at 2:37 PM, Dave Scott wrote: > Hi, >=20 > Following up from Tim's "Support pure Xen as a hypervisor" proposal = last month[1] I'd like to start working on this and maybe even make a = little bit of progress while I'm at CCC in Denver. >=20 > Helpfully James Bulpin managed to get CS + libvirt + xen to start an = instance in a simple configuration. Although the patches[2] are not = intended to be production-ready :) they help highlight some of the areas = we need to change. Dave, just to let you know that Tim has done some important = "refactoring" to split up XenServer hypervisor in CS between Xen and = XenServer. That way we could keep using xapi for XS but start moving to = libvirt for Xen. Tim worked in the xen2server branch (don't ask about the name, I messed = it up=85:) ). = https://git-wip-us.apache.org/repos/asf?p=3Dcloudstack.git;a=3Dshortlog;h=3D= refs/heads/xen2server Would be nice to see some of the libvirt stuff in that branch to handle = a new driver for Xen. Since the two hypervisors will be split up, we could still drop in some = early libvirt patches to handle Xen and put this in 4.5 as a wip. -Sebastien >=20 > Some of the areas are: >=20 > 1. hypervisor detection >=20 > Where we currently look for KVM specifically ("lsmod | grep kvm") we = could switch to either detecting any Linux hypervisor (by reading = /sys/hypervisor/type) and assuming if a hypervisor is present then we = can use libvirt on it (is this a fair assumption?) Or we could = white-list =93kvm=94 or =93xen=94. Or we could query libvirt directly = (perhaps via 'virsh capabilities'?) >=20 > 2. fiddling with the domain.xml >=20 > When starting a domain via libvirt the XML configuration has = hypervisor-specific stuff in it. Some of this is easy to change like: >=20 > >=20 > obviously becomes >=20 > >=20 > and >=20 > /usr/libexec/qemu-kvm >=20 > should probably be >=20 > /some/other/path/qemu-dm >=20 > Some is a bit more invasive (to the VM) such as the virtual hardware = type should be switched from "virtio" to "xen" (and the block device in = Linux will change from /dev/vd* to /dev/xvd*) and we'll have to either = implement or work around the lack of >=20 > ... >=20 > -- I presume this is a control channel into the system VM. Perhaps we = could implement this in libvirt/libxl using vchan? >=20 > 3. system VMs? >=20 > It would be very convenient if the system VM images could work on both = xen and KVM. This is probably doable as long as we don't bake in virtual = hardware specific information (such as /dev/vda) in the image. We could = use the qcow2 format in both cases. What do you think? >=20 > =85 and I=92m sure there=92s more. >=20 > Anyway, feedback would be welcome. If anyone else in Denver wants to = chat, then come grab me later! >=20 > Cheers, > Dave Scott >=20 > [1] = http://mail-archives.apache.org/mod_mbox/cloudstack-users/201403.mbox/%3cC= AJGXtBNbmQTQ81rALgH2kMA7V5WJYZKr3xnyasMKC_br+UKzOw@mail.gmail.com%3e >=20 > [2] = https://github.com/jamesbulpin/cloudstack/commits/jamesb_xen_exploratory