Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Aham Brahmasmi
> Sent: Monday, February 19, 2018 at 1:41 PM
> From: "Stuart Henderson" 
> To: misc@openbsd.org
> Subject: Re: vmd - Unable to reboot Alpine guest
>
> On 2018-02-19, Martijn van Duren  wrote:
> > Hello Aham,
> >
> > On 02/18/18 21:09, Aham Brahmasmi wrote:
> >> 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.
> >
> > There's no need to build from source, just upgrading via the latest
> > snapshot suffices.
> >> 
> >> 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.
> >> 
> > That is correct.
> > If you don't intent to work on the source, there's no need to build it
> > yourself.
> 
> Unless wanting to test a diff. However for that you typically don't need
> to rebuild the whole system.
> 
> 
> 

Thank you Dave, Mike, Martijn and Stuart for your helpful responses.

Based on what I have understood from this thread, upgrading to snapshot
should suffice to run -current, unless one intends to do development on
the source. For diffs, one does not need to rebuild the whole system.

@Carlos et al, I will now try to upgrade to snapshot from the URL - 
https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd and report
back. Considering it has worked for Dave, I hope it will work for me as
well.

@Dave, Please do not apologize. I am myself unable to understand how to
reply most of the times. When you say "upgrade packages", I think you
refer to "pkg_add -u". When you say "clean out old dependencies", I am
unable to understand what would need to be done. Currently, I have not
installed any packages, since I am still learning the functionality in
the base.

Thanks.

Regards,
ab.
-|-|-|-|-|-|-|--



Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Stuart Henderson
On 2018-02-19, Martijn van Duren  wrote:
> Hello Aham,
>
> On 02/18/18 21:09, Aham Brahmasmi wrote:
>> 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.
>
> There's no need to build from source, just upgrading via the latest
> snapshot suffices.
>> 
>> 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.
>> 
> That is correct.
> If you don't intent to work on the source, there's no need to build it
> yourself.

Unless wanting to test a diff. However for that you typically don't need
to rebuild the whole system.




Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Martijn van Duren

Hello Aham,

On 02/18/18 21:09, Aham Brahmasmi wrote:

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.


There's no need to build from source, just upgrading via the latest
snapshot suffices.


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.


That is correct.
If you don't intent to work on the source, there's no need to build it
yourself.

martijn@



Re: vmd - Unable to reboot Alpine guest

2018-02-18 Thread Mike Larkin
On Sun, Feb 18, 2018 at 05:29:02PM -0500, Dave Voutila wrote:
> "Aham Brahmasmi"  writes:
> 
> >> On Sun, Feb 18, 2018 at 04:23:39PM +0100, Aham Brahmasmi wrote:
> >> > I am unable to reboot an Alpine Linux 3.7.0 guest.
> 
> I can confirm that on 6.2-current, you can reboot an Alpine 3.7.0 guest
> without errors.
> 
> >> > 
> >> > Tailing the /var/log/messages lists the following error messages:
> >> > 
> >> > /bsd: vmx_fault_page: uvm_fault returns 14, GPA=0xa148, rip=0xf7d8a
> >> > vmd: vcpu_run_loop: vm 1 / vcpu 0 run ioctl failed: Bad address
> >> > 
> 
> Here's what I see on 6.2-current when doing a `sudo reboot` inside the
> Alpine VM via SSH very shortly after startup (timestamps trimmed for brevity):
> 
> kogelvis vmd[26727]: alpine: started vm 1 successfully, tty /dev/ttyp5
> kogelvis vmd[93002]: vcpu_process_com_data: guest reading com1 when not ready
> kogelvis last message repeated 2 times
> kogelvis vmd[93002]: rtc_update_rega: set non-32KHz timebase not supported
> kogelvis vmd[93002]: rtc_update_rega: set non-32KHz timebase not supported
> kogelvis vmd[26727]: alpine: started vm 1 successfully, tty /dev/ttyp5
> kogelvis vmd[49571]: vcpu_process_com_data: guest reading com1 when not ready
> kogelvis last message repeated 2 times
> 
> > 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.
> 
> AFAIK, You shouldn't need to build anything from source, just do the upgrade
> from a recent bsd.rd and then make sure to upgrade packages and clean
> out old dependencies. Depending on how you've configured certain
> software you might need to update some configs by hand, but you
> shouldn't have to compile anything other than software you've had to
> compile yourself to install under 6.1.
> 
> (Aham, sorry if my reply is a bit mangled...for some reason I can't get your
> original post to reply to and had to grab your reply to Carlos.)
> 
> -Dave
> 

Thanks for confirming Dave.

The messages you posted above are pertty harmless, usual noise when running
Linux guests.

-ml



Re: vmd - Unable to reboot Alpine guest

2018-02-18 Thread Dave Voutila
"Aham Brahmasmi"  writes:

>> On Sun, Feb 18, 2018 at 04:23:39PM +0100, Aham Brahmasmi wrote:
>> > I am unable to reboot an Alpine Linux 3.7.0 guest.

I can confirm that on 6.2-current, you can reboot an Alpine 3.7.0 guest
without errors.

>> > 
>> > Tailing the /var/log/messages lists the following error messages:
>> > 
>> > /bsd: vmx_fault_page: uvm_fault returns 14, GPA=0xa148, rip=0xf7d8a
>> > vmd: vcpu_run_loop: vm 1 / vcpu 0 run ioctl failed: Bad address
>> > 

Here's what I see on 6.2-current when doing a `sudo reboot` inside the
Alpine VM via SSH very shortly after startup (timestamps trimmed for brevity):

kogelvis vmd[26727]: alpine: started vm 1 successfully, tty /dev/ttyp5
kogelvis vmd[93002]: vcpu_process_com_data: guest reading com1 when not ready
kogelvis last message repeated 2 times
kogelvis vmd[93002]: rtc_update_rega: set non-32KHz timebase not supported
kogelvis vmd[93002]: rtc_update_rega: set non-32KHz timebase not supported
kogelvis vmd[26727]: alpine: started vm 1 successfully, tty /dev/ttyp5
kogelvis vmd[49571]: vcpu_process_com_data: guest reading com1 when not ready
kogelvis last message repeated 2 times

> 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.

AFAIK, You shouldn't need to build anything from source, just do the upgrade
from a recent bsd.rd and then make sure to upgrade packages and clean
out old dependencies. Depending on how you've configured certain
software you might need to update some configs by hand, but you
shouldn't have to compile anything other than software you've had to
compile yourself to install under 6.1.

(Aham, sorry if my reply is a bit mangled...for some reason I can't get your
original post to reply to and had to grab your reply to Carlos.)

-Dave



Re: vmd - Unable to reboot Alpine guest

2018-02-18 Thread Aham Brahmasmi
> Sent: Sunday, February 18, 2018 at 9:19 PM
> From: "Carlos Cardenas" 
> To: "Aham Brahmasmi" 
> 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 TTYOWNER NAME
> > 1   11.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=0xa148, 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 TTYOWNER 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 TTYOWNER 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  TIMECPU COMMAND
> >   _vmd  280 1027M  102M onproc/0  thrdeat  ##.#H 99.02% vmd
> > $ vmctl status
> >ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> > 1   11.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 d

Re: vmd - Unable to reboot Alpine guest

2018-02-18 Thread Carlos Cardenas
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 TTYOWNER NAME
> 1   11.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=0xa148, 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 TTYOWNER 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 TTYOWNER 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  TIMECPU COMMAND
>   _vmd  280 1027M  102M onproc/0  thrdeat  ##.#H 99.02% vmd
> $ vmctl status
>ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> 1   11.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



vmd - Unable to reboot Alpine guest

2018-02-18 Thread Aham Brahmasmi
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 TTYOWNER NAME
1   11.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=0xa148, 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 TTYOWNER 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 TTYOWNER 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  TIMECPU COMMAND
  _vmd  280 1027M  102M onproc/0  thrdeat  ##.#H 99.02% vmd
$ vmctl status
   ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
1   11.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.
-|-|-|-|-|-|-|--