From owner-freebsd-questions@FreeBSD.ORG Wed Jan 28 20:19:32 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 969F6705 for ; Wed, 28 Jan 2015 20:19:32 +0000 (UTC) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D96789E for ; Wed, 28 Jan 2015 20:19:32 +0000 (UTC) Received: from kabini1.local (rbn1-216-180-19-84.adsl.hiwaay.net [216.180.19.84]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t0SKJO3d018727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 28 Jan 2015 14:19:25 -0600 Message-ID: <54C945C3.3070607@hiwaay.net> Date: Wed, 28 Jan 2015 14:25:39 -0600 From: "William A. Mahaffey III" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "FreeBSD Questions !!!!" Subject: Re: Is QEMU working/reliable under .... References: <54C7C62A.5030605@hiwaay.net> <20150127210422.GA27921@slackbox.erewhon.home> <54C838CE.7040502@hiwaay.net> <20150128071441.GA29698@slackbox.erewhon.home> <54C8EFF3.6050803@hiwaay.net> <20150128192444.GA31295@slackbox.erewhon.home> In-Reply-To: <20150128192444.GA31295@slackbox.erewhon.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2015 20:19:32 -0000 On 01/28/15 13:24, Roland Smith wrote: > On Wed, Jan 28, 2015 at 08:19:31AM -0600, William A. Mahaffey III wrote: >> On 01/28/15 01:14, Roland Smith wrote: >>> On Tue, Jan 27, 2015 at 07:18:06PM -0600, William A. Mahaffey III wrote: >>>> On 01/27/15 15:04, Roland Smith wrote: >>>>> On Tue, Jan 27, 2015 at 11:08:58AM -0600, William A. Mahaffey III wrote: >>>>>> .... FreeBSD 9.3-RELEASE-p5, qemu-0.11.1_18, kqemu-kmod-1.3.0.p11_12 ? I >>>>>> have tried w/ kqemu loaded & unloaded (recommended online), w/ >>>>>> -nographic, w/ -vga std, etc. No love. All I want to do is run a WinXP >>>>>> 32bit VM &/or a 64-bit Win7 VM from my desktop (xfce-4.10_7, xorg-7.7_1, >>>>>> xf86-video-vesa-2.3.3_5) :-/ .... Several online sites imply that it >>>>>> works OK, 1 specifically w/ FreeBSD 9 no less. Any clues appreciated, >>>>>> any more info gladly provided .... >>>>> This version is *ancient*. I would suggest trying qemu-devel instead, because >>>>> that provides qemu-2.2.0. Last time I tried it 0.11 with or without qkemu >>>>> crashed a lot. >>>>> >>>>> According to the website, qemu version 0.11 and up do not support kqemu >>>>> anymore (see http://wiki.qemu.org/KQEMU), so you don't need that anymore. >>>>> >>>>> In time (and if your processor is new enough to have “extended page tables”) I >>>>> guess qemu on FreeBSD could be replaced by the bhyve hypervisor that is now in >>>>> 10.x and is being developed further in HEAD. Currently bhyve can load FreeBSD, >>>>> OpenBSD, NetBSD and Linux guests. Support to run windoze as a guest will come >>>>> in the future. >>>>> >>>>> Roland >>>> OK, I have qemu-devel compiled & installed, kqemu unloaded from the >>>> kernel, & (hopefully) a build of a VM underway, command-line: qemu >>>> -cdrom ../../../ISOs/winxp.iso -hda HDD.img -m 256 -boot d -cpu athlon >>>> -vga std -nographic -no-acpi -localtime, w/ qemu softlinked to > If you specify -nographic you won't see *anything*. How are you going to > interact with the windows installer that way? :-) > > Try: > > qemu-system-i386 -cdrom ../../../ISOs/winxp.iso -hda HDD.img -m 256 -boot d > > Booting a windows HD image takes around 90 seconds on my machine. Slackware > Linux takes around 120 seconds. Qemu isn't exactly a speed demon... I tried this (plus -noacpi -localtime) & got X11 errors: [root@kabini1, WinXP, 8:10:28am] 499 % qemu-system-i386 -cdrom ../../../ISOs/winxp.iso -hda HDD.img -m 256 -boot d -cpu athlon -vga std -no-acpi -localtime (:20221): Gtk-WARNING **: cannot open display: [root@kabini1, WinXP, 10:20:09am] 500 % pe TERM=xterm BLOCKSIZE=K MAIL=/var/mail/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/csh HOME=/root USER=root HOSTTYPE=FreeBSD VENDOR=amd OSTYPE=FreeBSD MACHTYPE=x86_64 SHLVL=1 PWD=/home/VMs/qemu/WinXP LOGNAME=root GROUP=wheel HOST=kabini1.local TIME= whew !!!! that took (%U cpu + %S sys) sec., %E elapsed time tot, %P CPU efficiency (%X text, %D data, %M max) KB, (%I+%O) io, %F pfs + %W swaps LC_ALL=C EDITOR=vi PAGER=more [root@kabini1, WinXP, 10:20:30am] 501 % setenv DISPLAY ":0.0" [root@kabini1, WinXP, 10:21:43am] 502 % pe TERM=xterm BLOCKSIZE=K MAIL=/var/mail/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/csh HOME=/root USER=root HOSTTYPE=FreeBSD VENDOR=amd OSTYPE=FreeBSD MACHTYPE=x86_64 SHLVL=1 PWD=/home/VMs/qemu/WinXP LOGNAME=root GROUP=wheel HOST=kabini1.local TIME= whew !!!! that took (%U cpu + %S sys) sec., %E elapsed time tot, %P CPU efficiency (%X text, %D data, %M max) KB, (%I+%O) io, %F pfs + %W swaps LC_ALL=C EDITOR=vi PAGER=more DISPLAY=:0.0 [root@kabini1, WinXP, 10:21:44am] 503 % qemu-system-i386 -cdrom ../../../ISOs/winxp.iso -hda HDD.img -m 256 -boot d -cpu athlon -vga std -no-acpi -localtime Invalid MIT-MAGIC-COOKIE-1 key (:20227): Gtk-WARNING **: cannot open display: :0.0 [root@kabini1, WinXP, 10:21:48am] 504 % I have had this problem before, when I 'su' to root (usually from an rxvt terminal running csh as a regular user), the environment isn't set up correctly for most X11 stuff to work correctly when invoked from that root CLI. I have posted about this before, but it still persists. Any clue how to get this to work for me :-) ? TIA & thanks for your reply. > >>>> qemu-system-x86_64 in /usr/local/bin. How long is this expected to take >>>> :-) ? TIA & thx for everything so far .... >>> If you are using a 64-bit build of XP the GUI should come up pretty fast. >>> Installing XP will seem to take ages. :-) Trying to run a 32-bit XP on a >>> 64-bit emulator won't work at all, IIRC. I think it won't even boot. >>> >>> Depending on which windows programs you need to run, there is a pre-built >>> 32-bit Wine for AMD64 available in ports. That might run them faster because >>> it's not a VM. >>> >>> Roland >> Hmmmmm .... OK, I was/am using 32-bit WinXP, maybe that's part of the >> problem. I eventually killed this process after 5+ hrs w/ no visible >> progress & tried again w/ qemu-system-i386 & the rest of the command >> line args, still (apparently) nogo, killed it after about 1 hr., no >> visible progress. I never saw *any* GUI pop up in either case. I'm a bit >> confused here, I thought the qemu executable needed to match the host as >> much as possible, that's why I tried the x86_64 qemu 1st. > It should match the *guest*. The postfix after qemu indicates which > architecture it is emulating. > > If you only need an emulator for i386 and x86-64, enable te X86_TARGETS options. > That will skip all the other architectures. > > > Roland Thanks, I eventually figured that out, we'll see what happens next .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.