Stanley Lieber | 2 Mar 11:12 2011
Picon

Re: recent plan9.iso on hosted kvm/qemu

To recap:

I'm attempting to install Plan 9 from a recent .iso on a hosted KVM/qemu
account. Both the Bell Labs and 9atom installers die here:

http://farm6.static.flickr.com/5098/5468343552_28695be1dd_o.png

I've managed to obtain the host's KVM config file, in libvirtd XML format:

<domain type='kvm' id='100'>
  <name>user-2</name>
  <uuid>REDACTED</uuid>
  <memory>786432</memory>
  <currentMemory>786432</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <source dev='/dev/vol1/user-2'/>
(Continue reading)

a z | 1 Mar 20:49 2011
Picon

Re: recent plan9.iso on hosted kvm/qemu

I have plan9 running on a qemu installation, and I had a similiar problem installing it.

The --no-kvm-irqchip option on the command line may have solved the problem.

I also may have walked away from the machine for 6 hours only to return and find that it had installed,    .... only to tear down the ubuntu distro based VM and replace the thing with a gentoo kernel specifically for hosting kvm.

The gentoo qemu + --no-kvm-irqchip  thing has definately kept the plan9.iso installation online. Here is my command-line, its miniscule compared to yours.

qemu-system-x86_64 --enable-kvm -net nic,macaddr=45:45:45:45:45:45 -net tap,ifname=9tap,script=no,downscript=no -vga std --no-kvm-irqchip -vnc:1 -hda /home/kvm9/plan9.img -m 256 -daemonize

If you havent tried this already:
Or perhaps this, --no-kqemu since this is BSD complaining about an invalid nvram checksum, other threads seem to indicate the CMOS layout error google search pops on BSD across softwares.

http://qemu-forum.ipi.fi/viewtopic.php?f=7&t=1921
 

On Wed, Mar 2, 2011 at 10:12 AM, Stanley Lieber <stanley.lieber <at> gmail.com> wrote:
To recap:

I'm attempting to install Plan 9 from a recent .iso on a hosted KVM/qemu
account. Both the Bell Labs and 9atom installers die here:
I've managed to obtain the host's KVM config file, in libvirtd XML format:

<domain type='kvm' id='100'>
 <name>user-2</name>
 <uuid>REDACTED</uuid>
 <memory>786432</memory>
 <currentMemory>786432</currentMemory>
 <vcpu>1</vcpu>
 <os>
   <type arch='x86_64' machine='pc'>hvm</type>
   <boot dev='hd'/>
 </os>
 <features>
   <acpi/>
 </features>
 <clock offset='utc'/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>destroy</on_crash>
 <devices>
   <emulator>/usr/bin/kvm</emulator>
   <disk type='block' device='disk'>
     <source dev='/dev/vol1/user-2'/>
     <target dev='hda' bus='ide'/>
   </disk>
   <disk type='file' device='cdrom'>
     <source file='/home/user/ISO/plan9.iso'/>
     <target dev='hdc' bus='ide'/>
     <readonly/>
   </disk>
   <interface type='ethernet'>
     <mac address='52:54:00:27:34:07'/>
     <script path='/home/kvm-admin/scripts/attach-tap-to-vlan.sh'/>
     <target dev='tap0-407'/>
     <model type='e1000'/>
   </interface>
   <serial type='tcp'>
     <source mode='bind' host='127.0.0.1' service='8081'/>
     <protocol type='telnet'/>
     <target port='0'/>
   </serial>
   <console type='tcp'>
     <source mode='bind' host='127.0.0.1' service='8081'/>
     <protocol type='telnet'/>
     <target port='0'/>
   </console>
   <input type='mouse' bus='ps2'/>
   <graphics type='vnc' port='5981' autoport='no' listen=''/>
 </devices>
</domain>

The actual KVM command is:

/usr/bin/kvm -S -M pc -m 768 -smp 1 -name user-2 -uuid 101ff6a0-206b-012e-09d2-525400972102 -monitor pty -boot c -drive file=/dev/vol1/user-2,if=ide,index=0,boot=on -drive file=/home/user/ISO/plan9.iso,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:27:34:07,vlan=0,model=e1000 -net tap,ifname=tap0-407,script=/home/kvm-admin/scripts/attach-tap-to-vlan.sh,vlan=0 -serial telnet:127.0.0.1:8081,server,nowait -parallel none -usb -vnc :81,password

Does anything here look obviously incorrect?

The hosting sevice is interested in offering Plan 9 services, so once
we get this working it may well be of use to others.

-sl





--
⎼⎺⎺├ <at> ┼␊├├≤-␍⎼␊▒␍:/␤⎺└␊/⎼␤⎺#
Stanley Lieber | 2 Mar 15:53 2011
Picon

Re: recent plan9.iso on hosted kvm/qemu

> I have plan9 running on a qemu installation, and I had a similiar problem
> installing it.
> 
> The --no-kvm-irqchip option on the command line may have solved the problem.
> 
> 
> I also may have walked away from the machine for 6 hours only to return and
> find that it had installed,    .... only to tear down the ubuntu distro
> based VM and replace the thing with a gentoo kernel specifically for hosting
> kvm.
> 
> The gentoo qemu + --no-kvm-irqchip  thing has definately kept the plan9.iso
> installation online. Here is my command-line, its miniscule compared to
> yours.
> 
> qemu-system-x86_64 --enable-kvm -net nic,macaddr=45:45:45:45:45:45 -net
> tap,ifname=9tap,script=no,downscript=no -vga std --no-kvm-irqchip -vnc:1
> -hda /home/kvm9/plan9.img -m 256 -daemonize

Thanks, I'll experiment with these options.

> Or perhaps this, --no-kqemu since this is BSD complaining about an invalid
> nvram checksum, other threads seem to indicate the CMOS layout error google
> search pops on BSD across softwares.
> 
> http://qemu-forum.ipi.fi/viewtopic.php?f=7&t=1921

As far as I know, KVM/qemu is hosted on Linux. The dmesg in my previous e-mail
was OpenBSD booted on the same instance of KVM/qemu; primarily so I could
get an idea of what hardware KVM/qemu was presenting to the Plan 9 installer.

-sl

erik quanstrom | 1 Mar 21:13 2011

Re: recent plan9.iso on hosted kvm/qemu

https://patchwork.kernel.org/patch/540521/

- erik

cinap_lenrek | 2 Mar 01:22 2011
Picon
Picon

realemu

completed realmode emulator that is to be used with aux/vga -m vesa ...
to enable the graphics card thru vesa bios in an attempt to make 8i
work (thanks russ ;-)).

tarball can be found in /n/sources/contrib/cinap_lenrek/realemu.tgz

needs the patch /n/sources/patch/vesa-softscreen-resize applied as the
vgavesa driver has to go thru the emulated /dev/realmode instead of
the short path by calling realmode() directly.

more details are in the notes file.

there is a incomplete list of graphics cards this was tested on in the
vgalist file included in the tarball.  (have like 5 working pci graphics
cards here that i'm too lazy to hookup again to get the vid/did numbers)

you might hit unimplemented instructions or code spinning in endless
loops due to lack of proper system port emulation (i just return 0 on IN[BWL]
instructions for restricted ports right now).

--
cinap

erik quanstrom | 2 Mar 01:30 2011
Picon

Re: realemu

On Tue Mar  1 19:23:42 EST 2011, cinap_lenrek <at> gmx.de wrote:
> completed realmode emulator that is to be used with aux/vga -m vesa ...
> to enable the graphics card thru vesa bios in an attempt to make 8i
> work (thanks russ ;-)).
> 
> tarball can be found in /n/sources/contrib/cinap_lenrek/realemu.tgz
> 
> needs the patch /n/sources/patch/vesa-softscreen-resize applied as the
> vgavesa driver has to go thru the emulated /dev/realmode instead of
> the short path by calling realmode() directly.
> 
> more details are in the notes file.
> 
> there is a incomplete list of graphics cards this was tested on in the
> vgalist file included in the tarball.  (have like 5 working pci graphics
> cards here that i'm too lazy to hookup again to get the vid/did numbers)
> 
> you might hit unimplemented instructions or code spinning in endless
> loops due to lack of proper system port emulation (i just return 0 on IN[BWL]
> instructions for restricted ports right now).

i'm sorry i've forgotten.  what's the problem with unemulated vesa?

- erik

Gorka Guardiola | 2 Mar 01:49 2011
Picon

Re: realemu

> i'm sorry i've forgotten.  what's the problem with unemulated vesa?
> 
Going back and forth to 16 bits does not make thing faster exactly. It will be
even more fun in 64bits. 16-32-64...

G.

erik quanstrom | 2 Mar 01:58 2011
Picon

Re: realemu

On Tue Mar  1 19:49:36 EST 2011, paurea <at> gmail.com wrote:
> > i'm sorry i've forgotten.  what's the problem with unemulated vesa?
> > 
> Going back and forth to 16 bits does not make thing faster exactly. It will be
> even more fun in 64bits. 16-32-64...

is that an issue?  the only time that vesa bios is explicitly
called is during setup of the frame buffer, and for other
rare events like blanking the screen.

- erik

cinap_lenrek | 2 Mar 02:06 2011
Picon
Picon

Re: realemu

the real realmode is shoot and pray. it might just crash the machine
or do wired things like reenable interrupts or even try to switch
itself to protected mode.

with realemu, you might get a messed up screen, but plan9 is still
running.  in case the vesa bios did wired stuff that caused plan9 to
crash before, it might now work with realemu.

--
cinap
Picon
From: erik quanstrom <quanstro <at> quanstro.net>
Subject: Re: [9fans] realemu
Date: 2011-03-02 00:30:05 GMT
On Tue Mar  1 19:23:42 EST 2011, cinap_lenrek <at> gmx.de wrote:
> completed realmode emulator that is to be used with aux/vga -m vesa ...
> to enable the graphics card thru vesa bios in an attempt to make 8i
> work (thanks russ ;-)).
> 
> tarball can be found in /n/sources/contrib/cinap_lenrek/realemu.tgz
> 
> needs the patch /n/sources/patch/vesa-softscreen-resize applied as the
> vgavesa driver has to go thru the emulated /dev/realmode instead of
> the short path by calling realmode() directly.
> 
> more details are in the notes file.
> 
> there is a incomplete list of graphics cards this was tested on in the
> vgalist file included in the tarball.  (have like 5 working pci graphics
> cards here that i'm too lazy to hookup again to get the vid/did numbers)
> 
> you might hit unimplemented instructions or code spinning in endless
> loops due to lack of proper system port emulation (i just return 0 on IN[BWL]
> instructions for restricted ports right now).

i'm sorry i've forgotten.  what's the problem with unemulated vesa?

- erik
cinap_lenrek | 2 Mar 02:08 2011
Picon
Picon

Re: realemu

no, speed was never a concern for realemu.

--
cinap
Picon
From: erik quanstrom <quanstro <at> quanstro.net>
Subject: Re: [9fans] realemu
Date: 2011-03-02 00:58:45 GMT
On Tue Mar  1 19:49:36 EST 2011, paurea <at> gmail.com wrote:
> > i'm sorry i've forgotten.  what's the problem with unemulated vesa?
> > 
> Going back and forth to 16 bits does not make thing faster exactly. It will be
> even more fun in 64bits. 16-32-64...

is that an issue?  the only time that vesa bios is explicitly
called is during setup of the frame buffer, and for other
rare events like blanking the screen.

- erik

Gmane