> Sent: Sunday, February 18, 2018 at 9:19 PM > From: "Carlos Cardenas" <cardena...@gmail.com> > To: "Aham Brahmasmi" <aham.brahma...@gmx.com> > Cc: misc@openbsd.org > Subject: Re: vmd - Unable to reboot Alpine guest > > On Sun, Feb 18, 2018 at 04:23:39PM +0100, Aham Brahmasmi wrote: > > Hi, > > > > I have a simple installation of OpenBSD 6.2 with latest patches > > installed on an amd64 machine. > > > > I am unable to reboot an Alpine Linux 3.7.0 guest. > > > > 1) I have installed an Alpine Linux guest and it works fine on vmd. The > > entry in "vmctl status" properly lists the guest after host boot. > > > > $ vmctl status > > ID PID VCPUS MAXMEM CURMEM TTY OWNER NAME > > 1 #### 1 1.0G ###M ttyp0 root vmname > > > > 2) Now when I run "reboot" within the Alpine guest, one CPU on the > > host machine starts hitting 100%. Later the screen displays a blue > > background error message. > > > > Tailing the /var/log/messages lists the following error messages: > > > > /bsd: vmx_fault_page: uvm_fault returns 14, GPA=0xffffa148, rip=0xf7d8a > > vmd: vcpu_run_loop: vm 1 / vcpu 0 run ioctl failed: Bad address > > > > At this point, the 100% CPU returns to normal load. > > > > 3) A subsequent "vmctl status" does not show the vm. > > > > $ vmctl status > > ID PID VCPUS MAXMEM CURMEM TTY OWNER NAME > > > > Trying to start the vm via a "vmctl start vmname" outputs the following > > > > $ doas vmctl start vmname > > vmctl: start vm command failed: Operation already in progress > > > > However, there is no vm listed in the output of "vmctl status". > > > > $ vmctl status > > ID PID VCPUS MAXMEM CURMEM TTY OWNER NAME > > $ doas rcctl check vmd > > vmd(ok) > > $ doas vmctl reload > > vmctl: command failed > > > > After vmctl reload, the tailed log contains: > > > > vmd: /etc/vm.conf:##: vm "vmname" failed: Operation not permitted > > > > I have run "poweroff" within Alpine as well, but it has a similar result > > as above. The vm shuts down, there is no 100% CPU, but it is not visible > > within the vmctl status. Trying to start via vmctl results in the same > > output on commandline. > > > > $ doas vmctl start vmname > > vmctl: start vm command failed: Operation already in progress > > > > The tailed log contains: > > > > vmd: vcpu_run_loop: vm 3 / vcpu 0 run ioctl failed: Input/output error > > > > 4) A "doas vmctl stop #" results in one CPU hitting and staying at 100%. > > > > $ doas vmctl stop # > > $ top > > PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND > > #### _vmd 28 0 1027M 102M onproc/0 thrdeat ##.#H 99.02% vmd > > $ vmctl status > > ID PID VCPUS MAXMEM CURMEM TTY OWNER NAME > > 1 #### 1 1.0G ###M ttyp0 root vmname - stoppin > > > > The only way that works right now is to do a "doas rcctl stop vmd", > > "doas rcctl start vmd". However, this results in the entire vmd being > > stopped and started. > > > > The relevant section of /etc/vm.conf > > > > vm vmname { > > disk location/disk.img > > interface tap0 { > > locked lladdr 00:00:00:00:00:01 > > switch "local" > > } > > memory 1G > > owner normaluser > > } > > > > switch "local" { > > add vether0 > > interface bridge0 > > } > > > > I am sorry for the long mail. > > > > Thanks. > > > > Regards, > > ab. > > ---------|---------|---------|---------|---------|---------|---------|-- > > > > Quite of few bug fixes and enhancements to vmd occurred after 6.2 was > released. > > Is it possible to run your host with 6.2-current? > > +--+ > Carlos > >
Hi Carlos, Thank you for your response. I have been learning and understanding OpenBSD for around one month now. As such, I had installed -release, and used syspatch to reach -stable. I have spent some time right now trying to understand the mechanism to reach -current from -stable. >From what I understand, I first need to upgrade to the latest snapshot. >From there, I need to use source build instructions at https://www.openbsd.org/faq/faq5.html#Bld to reach -current. I would like to do the above because I am also interested in the spamd and IPv6 diff that phessler@ has. But right now, I am quite a bit inexperienced, so you would have to be patient with me. >From what I understand, to install snapshot I need to download https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd, boot that at the boot prompt and then (U)pgrade from there. To build from source, I need to follow the instructions at https://www.openbsd.org/faq/faq5.html#Bld. # cd /usr # mkdir -p xenocara ports # chgrp wsrc xenocara ports # chmod 775 xenocara ports $ user mod -G wsrc normaluser $ exit $ cd /usr $ cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs checkout -P src # cd /sys/arch/$(machine)/compile/GENERIC.MP # make obj # make config # make && make install # reboot # cd /usr/src # make obj && make build # sysmerge # cd /dev && ./MAKEDEV all (Only for xenocara) # cd /usr/xenocara # make bootstrap # make obj # make build There are some similar, but not same, instructions at https://www.bsdnow.tv/tutorials/stable-current-obsd, which seem to involve a step about make distrib-dirs. They also fetch and build xenocara. I do not know whether xenocara should be fetched and built or not and whether make distrib-dirs should be executed or not. In case the above steps help reach -current, and if it is important and advisable to reach -current, I would then proceed to install and run -current. Thanks. Regards, ab. ---------|---------|---------|---------|---------|---------|---------|--