From owner-freebsd-xen@FreeBSD.ORG Fri Aug 3 16:22:41 2012 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25334106564A for ; Fri, 3 Aug 2012 16:22:41 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id E34178FC18 for ; Fri, 3 Aug 2012 16:22:40 +0000 (UTC) Received: from [IPv6:::1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q73GM4Dv067457; Fri, 3 Aug 2012 09:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1344010925; bh=Z+gLf5f2T1MbTl/LAzLQKGHzWkrcbWk7pq2tZhHbyLk=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=cMUxpA5KNjPappyg4uinHU0RaLv2L18kE29GByLCIrBZdJ/NyRjPiwQUfURuBLyb9 6vw2XyWofn8iPRmBhytOWsq5p3d9avqhKtuO6rkTvmjmeqNI1nZr+aeyp8+2ZfbqUi hVYcu0Iru/Heiu63Y/NrRyjulAPVQNnuPSqlgEY0= From: Sean Bruno To: Wei Xu In-Reply-To: References: <1343844148.5229.1.camel@powernoodle.corp.yahoo.com> <1343929221.2573.5.camel@powernoodle.corp.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 03 Aug 2012 09:22:04 -0700 Message-ID: <1344010924.2552.7.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 010924002 Cc: "freebsd-xen@freebsd.org" Subject: Re: Compiling error for amd64 on FreeBSD9.0 with XENHVM when include xen console driver. X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2012 16:22:41 -0000 On Thu, 2012-08-02 at 19:21 -0700, Wei Xu wrote: > My Dom0 is Oracle Linux(64bit too), Xen version is 4.0.2, I installed > FreeBSD with the official iso image, that's > "FreeBSD-9.0-RELEASE-i386-dvd1.iso", I'm not sure if it was started as > HVM by default, how can i check it? > If the VM started up at all, it had to be running via full hardware virtualization. :-) > How to convert it to PV support, i just compiled and installed the src > with the "XEN" config in the source tree, I think that will include PV > support, since "XEN" is defined in the options, right? > Correct. You compile your i386 kernel with the XEN kernel config, then you need to copy that kernel into your Dom0 and reconfigure the VM to be PV and boot with no HVM options. I'm not sure how to do that with the tools that you have access to, but I did this by editing the xen domU config file for the virtual machine. Here's an example of my DomU config for your reference. Of course, this is a Xen 3 hypervisor, so your changes might have to be different( xl create vs xm create). #============================================================================ # Python configuration setup for 'xm create'. # This script sets the parameters used when a domain is created using 'xm create'. # You use a separate script for each domain you want to create, or # you can set the parameters for the domain on the xm command line. #============================================================================ #---------------------------------------------------------------------------- # Kernel image file. #kernel = "/usr/lib/xen/boot/hvmloader" kernel = "/var/virt/freebsd-9.current-i386-domu-kernel" #---------------------------------------------------------------------------- # device model to use: only qemu-dm available for now #device_model = '/usr/lib64/xen/bin/qemu-dm' #builder='hvm' # Initial memory allocation (in megabytes) for the new domain. memory = 2048 # number of CPUS vcpus = 1 # A name for your domain. All domains must have different names. name = "ref9-xen32" arch = "i386" #Network interface. By default emules a realtek 8139. For a NetBSD guest you # have to disable re(4) and let rtk attach to use it. # ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0 # pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with # pcn(4) under NetBSD. #vif = [ 'mac=00:16:3e:00:00:03, bridge=xenbr0, type=ioemu' ] vif = [ 'mac=00:16:3e:00:00:03, bridge=xenbr0, type=vbd' ] # Define the disk devices you want the domain to have access to, and # what you want them accessible as. # Each disk entry is of the form phy:UNAME,DEV,MODE # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. # For hvm domains you can only use hda to hdd. You can set extra types # (e.g. cdrom) disk = [ 'file:/var/virt/ref9-xen32.bin,hda,w', 'file:/var/virt/ref9-xen32_scratch.bin,hdb,w' ] # floppy images; this doesn't seem to work currently. Use a iso image instead. #fda = '/home/domains/boot1.fs' extra = "vfs.root.mountfrom=ufs:/dev/ad0p2,kern.hz=100" # boot device: a = floppy, c= hard drive, d= cdrom (with the disk entry # before) # # boot CDROM image #boot='d' # boot from DISK file #boot='c' # boot from DHCP/PXE then DISK file boot='nc' # By default, 'xm create' will try to open an X window on the current display # for the virtal framebuffer. You can have the virtal framebuffer in vnc # instead, and connect using a vnc client (using localhost:$vncdisplay) # If vncunused is set to 1 (this is the default value), vncdisplay # will be set to the first unused port; so it's recommended to #vnc = 1 #vncdisplay = 3 #vncunused = 1 #vncpasswd='' #Xen emulates a PS/2 mouse, but the pointer in the guest has difficulties # tracking the absolute position. Xen can emulate a USB tablet in addition # to the mouse which will report the absolute position of the pointer, # and make the mouse much easier to use. # usb=1 usbdevice='tablet' #usbdevice='mouse' acpi = 1 serial='pty' on_reboot='restart' #============================================================================