OpenBSD Journal

vmm(4) update: it boots!

Contributed by tj on from the virtual-reality dept.

Mike Larkin (mlarkin@) is making progress on vmm(4), the upcoming OpenBSD-native hypervisor. He shared a status update today on Twitter, showcasing a VM booting to multiuser login.

OpenBSD/amd64 (testamd64.my.domain) (ttyC0)

login: root
Password:
Last login: Sun Nov  1 03:57:27 on ttyC0
OpenBSD 5.8-current (GENERIC) #378: Fri Oct 16 14:52:29 PDT 2015

You have new mail.
# ./run_vm
cpu0: entered VMM mode
vmmctl: enable VMM command successful
vmmctl: start VM command successful
Connected to /dev/ttyp0 (speed 9600)

guest eptp = 0x2acf01e
warning: bcopy during ELF kernel load not supported
warning: bcopy during ELF kernel load not supported
assigned irq 3 to pci dev 1
 adding pci bar cookie for dev 1 bar 0 = 0x0
vmd: vioblk @ 0x22634b2e100, size=72
assigned irq 5 to pci dev 2
 adding pci bar cookie for dev 2 bar 0 = 0x22634b2e100
vmd: child disk 0 has size 941621248, vioblk cookie @ 0x22634b2e100
assigned irq 9 to pci dev 3
 adding pci bar cookie for dev 3 bar 0 = 0x22634b2e148
vmd: child disk 1 has size 294092800, vioblk cookie @ 0x22634b2e148

loading 0x1a80000-0x8000000 (0x1a80-0x8000)
loading 0x100000-0x1000000
avail_start = 0x26000
avail_end = 0x8000000
first_avail = 0x1a80000
[ bsd ELF symbol table not valid: bad magic ]
[ no symbol table formats found ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.8-current (GENERIC) #406: Sun Nov  1 12:31:22 PST 2015
    mlarkin@miskatonic.azathoth.net:/export/bin/src/OpenBSD/vmm/src/sys/arch/amd
64/compile/GENERIC
vmd: i8253 PIT: 16 bit counter I/O not supported
RTC BIOS diagnostic error 20
real mem = 117440512 (112MB)
avail mem = 109920256 (104MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0
acpi at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
cpu0: FPU,VME,DE,PSE,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,      
CFLUSH,DS,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,FMA3,    
CX16,xTPR,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,AVX,F16C,RDRAND,
HV,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
pvbus0 at mainbus0: OpenBSD
vmx_handle_cpuid: unsupported rax=0x40000100
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "OpenBSD VMM PCI Host Bridge" rev 0x00
virtio0 at pci0 dev 1 function 0 "Qumranet Virtio RNG" rev 0x00: Virtio Entropy Device
viornd0 at virtio0
virtio0: irq 3
virtio1 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00: Virtio Block Device
vioblk0 at virtio1
scsibus1 at vioblk0: 2 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI3 0/direct fixed
sd0: 898MB, 512 bytes/sector, 1839104 sectors
virtio1: irq 5
virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00: Virtio Block Device
vioblk1 at virtio2
scsibus2 at vioblk1: 2 targets
sd1 at scsibus2 targ 0 lun 0:  SCSI3 0/direct fixed
sd1: 280MB, 512 bytes/sector, 574400 sectors
virtio2: irq 9
isa0 at mainbus0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
com0: console
vmm at mainbus0 not configured
vmx_handle_cr: mov to cr8 @ ffffffff8131a537
nvram: invalid checksum
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a swap on sd0b dump on sd0b
WARNING: invalid time in clock chip
WARNING: CHECK AND RESET THE DATE!

Automatic boot in progress: starting file system checks.
/dev/sd0a (0078ad64fc7cb4ea.a): file system is clean; not checking
setting tty flags
pf enabled
starting network
dd: /var/db/host.random: No such file or directory
chmod: /var/db/host.random: No such file or directory
vmx_handle_cpuid: function 0x04 (deterministic cache info) not supported
openssl: generating isakmpd/iked RSA keys... done.
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.

savecore: can't find device 3/24834
checking quotas: done.
kvm_mkdb: can't open /dev/ksyms
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
starting local daemons: cron.
Tue Oct 20 09:28:50 PDT 2015

OpenBSD/amd64 (a.my.domain) (tty00)

login: root
Password:
OpenBSD 5.8-current (GENERIC) #406: Sun Nov  1 12:31:22 PST 2015

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

You have mail.
# top

load averages:  0.13,  0.04,  0.01                         a.my.domain 09:32:33
20 processes: 19 idle, 1 on processor                                  up  0:04
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  0.0% idle
Memory: Real: 14M/56M act/tot Free: 57M Cache: 19M Swap: 0K/11M

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
    1 root      10    0  480K  544K idle      wait      0:03  0.00% init
 7301 root      18    0  628K  724K sleep     pause     0:03  0.00% ksh
18150 _syslogd   2    0 1132K 1400K idle      kqread    0:02  0.00% syslogd
23971 _smtpd     2    0 1444K 2016K idle      kqread    0:01  0.00% smtpd
24405 _smtpd     2    0 1368K 1948K idle      kqread    0:01  0.00% smtpd
27038 root       2    0  716K 1036K idle      poll      0:01  0.00% cron
20007 root       2    0  948K 1296K idle      select    0:01  0.00% sshd
14240 root       2    0 1132K 1236K idle      netio     0:00  0.00% syslogd
28182 _pflogd    4    0  692K  376K sleep     bpf       0:00  0.00% pflogd
28618 _smtpd     2    0 1572K 2124K idle      kqread    0:00  0.00% smtpd
22585 _smtpd     2    0 1300K 1940K idle      kqread    0:00  0.00% smtpd
20954 _ntp       2    0  704K 1380K sleep     poll      0:00  0.00% ntpd
  664 root       2    0  628K  596K idle      netio     0:00  0.00% pflogd
31819 root       2    0 1568K 2124K idle      kqread    0:00  0.00% smtpd
18465 _smtpd     2    0 1504K 2540K idle      kqread    0:00  0.00% smtpd
20980 _ntp       2  -20  772K 1540K sleep     poll      0:00  0.00% ntpd
23930 _smtpq     2    0 1568K 2096K idle      kqread    0:00  0.00% smtpd
25424 root       2  -20  620K 1356K idle      poll      0:00  0.00% ntpd

Thanks for the update Mike, we're living in exciting times. The vmm work is being sponsored by The OpenBSD Foundation, so if you're interested in virtualization, now would be a great time to help out. Note that the actual code is not yet committed to CVS, but will be appearing in due time.

(Comments are closed)


Comments
  1. By journeysquid (Tor) on http://www.openbsd.org/donations.html

    Great work! I know network support isn't there yet, so I'm jumping the gun in asking, but is MP support likely to be a 1.0 feature?

  2. By Petr Topiarz (194.50.64.131) topiarz@post.cz on https://www.openunix.eu

    This is great news! My true admirations! I really need a working VM for virtualizing other systems and since the end of kqemu some ten releases back I have been left with nothing usable. Cant wait for it!
    Petr

  3. By Anonymous Coward (135.23.87.149) on

    > so if you're interested in virtualization, now would be a great time to help out

    How do I do that if the code isn't available yet?

    Comments
    1. By brynet (Brynet) on http://brynet.biz.tm/

      > > so if you're interested in virtualization, now would be a great time to help out
      >
      > How do I do that if the code isn't available yet?

      > The vmm work is being sponsored by The OpenBSD Foundation.

      Comments
      1. By Anonymous Coward (135.23.87.149) on

        > so if you're interested in virtualization, now would be a great time to help out
        >
        > How do I do that if the code isn't available yet?
        >
        > The vmm work is being sponsored by The OpenBSD Foundation.

        When did openbsd stop being about code and start being about money?

        Comments
        1. By Anonymous Coward (80.187.100.202) on

          > When did openbsd stop being about code and start being about money?

          Yes, heaven forfend that Mike be able to pay his bills while he works on a feature to be released when the work is ready to be seen by the rest of the world.

          Way to be an asshole.

          Comments
          1. By Anonymous Coward 2 (192.35.17.12) on

            > > When did openbsd stop being about code and start being about money?
            >
            > Yes, heaven forfend that Mike be able to pay his bills while he works on a feature to be released when the work is ready to be seen by the rest of the world.
            >
            > Way to be an asshole.

            Give him all the money he needs... But his point is valid, it boots, so maybe it's time to show some code?
            But maybe at this point asking Mike privately is the way to go?

            Either way, the "asshole" calling was way out of line.

            Comments
            1. By Ed Ahlsen-Girard (72.213.210.31) eagirard@cox.net on

              > > > When did openbsd stop being about code and start being about money?
              > >
              > > Yes, heaven forfend that Mike be able to pay his bills while he works on a feature to be released when the work is ready to be seen by the rest of the world.
              > >
              > > Way to be an asshole.
              >
              > Give him all the money he needs... But his point is valid, it boots, so maybe it's time to show some code?
              > But maybe at this point asking Mike privately is the way to go?
              >
              > Either way, the "asshole" calling was way out of line.

              "Some go to the missions by giving. Some give to the missions by going. Without both there would be no missions at all."

              -Archbishop Fulton Sheen

            2. By Anonymous Coward (92.128.100.193) on

              > Give him all the money he needs... But his point is valid, it boots, so maybe it's time to show some code?
              > But maybe at this point asking Mike privately is the way to go?
              >
              > Either way, the "asshole" calling was way out of line.

              Well, the way OpenBSD is managed, they will reveal the code when it has been throughly audited, deconstructed, reconstructed, debugged, tested, kicked savagely in the nuts, refactored, re-tested, criticized, insulted several times by Theo, dipped into acid, thrown to the wolves, parachuted in the middle of nowhere with just a swiss army knife, chased by grizzly bears, returned to civilization, kidnapped, placed in a burlap sack and beaten with tire irons, passed a PhD, sworn allegiance to Cthulhu under a pale, gibbous moon in the middle of a graveyard, and electrocuted a couple of times (just for kicks).

              Then, and only then, will it be declared as fit for service, and inclusion in OpenBSD, unless of course Theo feels like insulting it a few more times, including his entire extended family, and his mom in particular. The latter insults may generate a couple of dozens diff in short order.

              And then Miod Vallat will probably find out it does not work at all on a VaxStation 4000, and the whole cycle will have to be repeated all over again. Especially the Cthulhu part.

              And THEN, and only then, will we get a working vmm.

              Be patient. Fast food isn't good and good food isn't fast. Sausage is delicious, but you REALLY don't want to know how it is made, and it may give you cancer. OpenBSD code is, well, programmed pretty much in the same way, if you see what I mean.

              And, yes, the original poster is an asshole.

              Comments
              1. By Anonymous Coward (217.191.208.73) on

                > Well, the way OpenBSD is managed, they will reveal the code when it has been throughly audited, deconstructed, reconstructed, debugged, tested, kicked savagely in the nuts, refactored, re-tested, criticized, insulted several times by Theo, dipped into acid, thrown to the wolves, parachuted in the middle of nowhere with just a swiss army knife, chased by grizzly bears, returned to civilization, kidnapped, placed in a burlap sack and beaten with tire irons, passed a PhD, sworn allegiance to Cthulhu under a pale, gibbous moon in the middle of a graveyard, and electrocuted a couple of times (just for kicks).
                >
                > Then, and only then, will it be declared as fit for service, and inclusion in OpenBSD, unless of course Theo feels like insulting it a few more times, including his entire extended family, and his mom in particular. The latter insults may generate a couple of dozens diff in short order.
                >
                > And then Miod Vallat will probably find out it does not work at all on a VaxStation 4000, and the whole cycle will have to be repeated all over again. Especially the Cthulhu part.
                >
                > And THEN, and only then, will we get a working vmm.
                >
                > Be patient. Fast food isn't good and good food isn't fast. Sausage is delicious, but you REALLY don't want to know how it is made, and it may give you cancer. OpenBSD code is, well, programmed pretty much in the same way, if you see what I mean.

                Serious contender for *best post ever* at undeadly!

              2. By Anonymous Coward (2001:470:b01e:3:9cea:fc64:7624:e904) on

                > Well, the way OpenBSD is managed, they will reveal the code when it has been throughly audited, deconstructed, reconstructed, debugged, tested, kicked savagely in the nuts, refactored, re-tested, criticized, insulted several times by Theo, dipped into acid, thrown to the wolves, parachuted in the middle of nowhere with just a swiss army knife, chased by grizzly bears, returned to civilization, kidnapped, placed in a burlap sack and beaten with tire irons, passed a PhD, sworn allegiance to Cthulhu under a pale, gibbous moon in the middle of a graveyard, and electrocuted a couple of times (just for kicks).
                >
                > Then, and only then, will it be declared as fit for service, and inclusion in OpenBSD, unless of course Theo feels like insulting it a few more times, including his entire extended family, and his mom in particular. The latter insults may generate a couple of dozens diff in short order.
                >
                > And then Miod Vallat will probably find out it does not work at all on a VaxStation 4000, and the whole cycle will have to be repeated all over again. Especially the Cthulhu part.
                >
                > And THEN, and only then, will we get a working vmm.
                >
                > Be patient. Fast food isn't good and good food isn't fast. Sausage is delicious, but you REALLY don't want to know how it is made, and it may give you cancer. OpenBSD code is, well, programmed pretty much in the same way, if you see what I mean.
                >
                > And, yes, the original poster is an asshole.

                You're THAT deluded?

                Comments
                1. By Anonymous Coward (82.123.156.90) on

                  > You're THAT deluded?

                  And you are THAT stuck-up?

                  It's a bad attempt at humor, man, nothing more.

            3. By Marc Espie (espie) on


              > Give him all the money he needs... But his point is valid, it boots, so maybe it's time to show some code?
              > But maybe at this point asking Mike privately is the way to go?

              I've seen the code and played with it.

              There is a reason it's not public yet. There are LOADS of small details that need to be figured out first.

              Right now, it runs, BUT you have to be real careful and know what you're doing. There are lots of rough edges, and the instructions about how to run it are almost as long as the code proper. I definitely understand mlarkin not wanting to have to deal with wannabe coders noob questions when they manage to hose their machine...

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]