DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd May 2017
mynameisjohn mynameisjohn is offline
Port Guard
 
Join Date: Apr 2011
Posts: 10
Default VM won't startup using vmctl

Hi All.

Testing vmctl on 6.1 amd64, just want to start up a machine, no networking, but it won't come up. I'm probably missing something obvious, any ideas?

Checked my chipset:

Code:
# dmesg |grep vmm                                              
vmm0 at mainbus0: VMX/EPT
Enabled vmd in /etc/rc.conf.local:

Code:
vmd_flags=""
Rebooted.

Created a disk:

Code:
vmctl create /root/VMs/pigmy.img -s 500M
Created entry in /etc/vm.conf:

Code:
vm "pigmy" {
    memory 512M
    kernel "/bsd.rd"
    disk "/root/VMs/pigmy.img"
    disk "/root/Downloads/install61.fs"
}
Tried to start machine, but it hangs (apologies for length of post):

Code:
# vmctl start "pigmy" -c -d /root/VMs/pigmy.img -d /root/Downloads/install61.fs
vmctl: starting without network interfaces
Connected to /dev/ttyp2 (speed 9600)
Changing serial settings was 0/0 now 3/0
SeaBIOS (version 1.10.2p2-OpenBSD-vmm)
BUILD: gcc: (GCC) 4.2.1 20070719  binutils: 2.17
enabling shadow ram
Unable to unlock ram - bridge not found
RamSize: 0x20000000 [cmos]
malloc preinit
malloc init
init ivt
init bda
init bios32
init keyboard
init pic
math cp init
pci setup
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
PCI probe
Found 5 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: 1000 - 4fff
PCI: 32: 0000000020000000 - 00000000fec00000
PCI: map device bdf=00:01.0  bar 0, addr 00001000, size 00001000 [io]
PCI: map device bdf=00:02.0  bar 0, addr 00002000, size 00001000 [io]
PCI: map device bdf=00:03.0  bar 0, addr 00003000, size 00001000 [io]
PCI: map device bdf=00:04.0  bar 0, addr 00004000, size 00001000 [io]
PCI: map device bdf=00:00.0  bar 6, addr febfb000, size 00001000 [mem]
PCI: map device bdf=00:01.0  bar 6, addr febfc000, size 00001000 [mem]
PCI: map device bdf=00:02.0  bar 6, addr febfd000, size 00001000 [mem]
PCI: map device bdf=00:03.0  bar 6, addr febfe000, size 00001000 [mem]
PCI: map device bdf=00:04.0  bar 6, addr febff000, size 00001000 [mem]
PCI: init bdf=00:00.0 id=0b5d:0666
PCI: init bdf=00:01.0 id=1af4:1005
PCI: init bdf=00:02.0 id=1af4:1001
PCI: init bdf=00:03.0 id=1af4:1001
PCI: init bdf=00:04.0 id=0b5d:0777
PCI: No VGA devices found
No apic - only the main cpu is present.
init timer
init virtio-blk
found virtio-blk at 00:02.0
pci dev 00:02.0 using legacy (0.9.5) virtio mode
virtio-blk 00:02.0 blksize=512 sectors=10485760
Registering bootable: Virtio disk PCI:00:02.0 (type:2 prio:9999 data:f1f70)
found virtio-blk at 00:03.0
pci dev 00:03.0 using legacy (0.9.5) virtio mode
virtio-blk 00:03.0 blksize=512 sectors=574400
Registering bootable: Virtio disk PCI:00:03.0 (type:2 prio:9999 data:f1f10)
init serial
Found 1 serial ports
Searching bootorder for: HALT
Mapping hd drive 0x000f1f70 to 0
drive 0x000f1f70: PCHS=0/0/0 translation=lba LCHS=652/255/63 s=10485760
Mapping hd drive 0x000f1f10 to 1
drive 0x000f1f10: PCHS=0/0/0 translation=lba LCHS=569/16/63 s=574400
malloc finalize
Space available for UMB: c0000-ef000, f0000-f1f10
Returned 245760 bytes of ZoneHigh
e820 map has 6 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 000000001fffc000 = 1 RAM
  4: 000000001fffc000 - 0000000020000000 = 2 RESERVED
  5: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
locking shadow ram
Unable to lock ram - bridge not found
Jump to int19
enter handle_19:
  NULL
enter handle_18:
  NULL
invalid handle_legacy_disk:729:
   a=00000201  b=00000000  c=00000001  d=00000000 ds=0000 es=07c0 ss=0000
  si=00000000 di=00000000 bp=00000000 sp=000066dc cs=f000 ip=d9bf  f=0202
enter handle_18:
  NULL
Thanks for any pointers or slaps round the face.

#j
Reply With Quote
  #2   (View Single Post)  
Old 23rd May 2017
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,941
Default

Hi, John. If your host is 6.1, I don't think you can use "kernel" in your vm.conf file. It was replaced with "boot" for 6.1. See vm.conf(5). Without a direct-boot ELF kernel, the guest will start a BIOS and boot from the first drive. And there are no boot blocks on the first disk at this time.

For initial guest creation, I prefer to use vmctl(*) with start options that define the guest rather than a vm.conf() configuration file, because these are one-time-use configurations.
Reply With Quote
  #3   (View Single Post)  
Old 24th May 2017
mynameisjohn mynameisjohn is offline
Port Guard
 
Join Date: Apr 2011
Posts: 10
Default

jggimi,

Thanks for the pointers, correct on all counts. I moved the vm.conf file out of the way, used my local kernel and altered the disk order to install, i.e.

Code:
vmctl start "pigmy" -c -d /root/Downloads/install61.fs -b /bsd.rd -d /root/VMs/pigmy.img
Once that was over, I was able to start the machine by simplifying the vmctl line to

Code:
vmctl start "pigmy" -c -d /root/VMs/pigmy.img
Excellent! Now to play about with the networking.

Thanks for the assistance.

#j
Reply With Quote
  #4   (View Single Post)  
Old 24th May 2017
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,941
Default

For networking, there's a new "Local" network support at -current; it's not in 6.1. It provides a virtual subnet and virtual DHCP server to the guest. Really neat for simple guests. For 6.1, you'll need manage the tap(4) device -- either providing it a subnet or bridge/switch to attach it to an existing subnet.
Reply With Quote
  #5   (View Single Post)  
Old 25th May 2017
mynameisjohn mynameisjohn is offline
Port Guard
 
Join Date: Apr 2011
Posts: 10
Default

Not really played with current before, but that's worth knowing. Thanks.
Reply With Quote
Reply

Tags
openbsd 6.1, virtual machine, vmctl, vmd, vmm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A startup website in less than 12h Oko Off-Topic 2 11th March 2016 05:13 PM
How do I run inetd at startup? ffonz OpenBSD General 3 6th May 2015 09:29 PM
startup (rc) problems kopcicle OpenBSD General 9 15th May 2010 08:35 PM
dhclient at startup bsdnewbie999 OpenBSD General 3 31st March 2009 03:55 AM
Beep on startup? matt Programming 1 16th July 2008 08:33 AM


All times are GMT. The time now is 11:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick