Mike Larkin <mlar...@nested.page> writes:

> On Sun, Dec 10, 2023 at 03:16:22PM -0600, Robert B. Carleton wrote:
>> Mike Larkin <mlar...@nested.page> writes:
>>
>> > On Sun, Dec 10, 2023 at 01:03:27PM -0600, Robert B. Carleton wrote:
>> >> I have a number virtual machines, and I've noticed that they power off
>> >> instead of rebooting when using "shutdown -r now" on the guest. This is
>> >> the general form for a configuration in the /etc/vm.conf:
>> >>
>> >> vm "batch2" {
>> >>         memory 2G
>> >>         enable
>> >>         cdrom /home/ISO/OpenBSD/7.4/install74.iso
>> >>         disk /home/vm/batch2/disk0.qcow2
>> >>         boot device disk
>> >>         interface { switch "int_switch" }
>> >>         interface { switch "ext_switch" }
>> >> }
>> >>
>> >
>> > I've not heard of anyone else having reboot vs shutdown issues recently.
>> > I just did a shutdown -r now on my local machine and it works here:
>> >
>> > --------
>> > -vmmtech- /var/www/logs# shutdown -r now
>> > Shutdown NOW!
>> > shutdown: [pid 95485]
>> >
>> > *** FINAL System shutdown message from root ***
>> > System going down IMMEDIATELY
>> >
>> >
>> > -vmmtech- /var/www/logs#
>> > System shutdown time has arrived
>> >
>> > -vmmtech- /var/www/logs# syncing disks... done
>> > vmmci0: powerdown
>> > rebooting...
>> >
>> >
>> >
>> > Using drive 0, partition 3.
>> > Loading......
>> > probing: pc0 com0 mem[638K 3838M 256M a20=on]
>> > disk: hd0+
>> >>> OpenBSD/amd64 BOOT 3.65
>> > \
>> > com0: 115200 baud
>> > switching console to com0
>> >>> OpenBSD/amd64 BOOT 3.65
>> > boot>
>> > ---------
>> >
>> >> I also tried running vmd from the command line with "-d -vv". Here's the
>> >> end of the logging when I tried to reboot the guest:
>> >>
>> >> vm/batch2: vcpu_exit_eptviolation: fault already handled
>> >> vm/batch2: vcpu_exit_eptviolation: fault already handled
>> >> vm/batch2: vcpu_exit_eptviolation: fault already handled
>> >> vm/batch2: vmmci_ack: vm 7 requested shutdown
>> >> vm/batch2: virtio_shutdown: waiting on device pid 35337
>> >> vm/batch2: virtio_dispatch_dev: pipe dead (EV_READ)
>> >> vm/batch2: virtio_shutdown: device for pid 35337 is stopped
>> >> vm/batch2: virtio_shutdown: waiting on device pid 64912
>> >> vm/batch2: virtio_shutdown: device for pid 64912 is stopped
>> >> vm/batch2: virtio_shutdown: waiting on device pid 34607
>> >> vm/batch2: virtio_shutdown: device for pid 34607 is stopped
>> >> vmm: vmm_sighdlr: handling signal 20
>> >> vmm: vmm_sighdlr: terminated vm batch2 (id 1)
>> >> vmm: vm_remove: vmm vmm_sighdlr removing vm 1 from running config
>> >> vmm: vm_stop: vmm vmm_sighdlr stopping vm 1
>> >> vmd: vm_stop: vmd vmd_dispatch_vmm stopping vm 1
>> >>
>> >> The three "vcpu_exit_eptviolation: fault already handled" lines seemed
>> >> to happen continuously during run time for the guest.
>> >
>> > harmless
>> >
>> >>
>> >> Is there some kind of configuration that I'm missing? I read the vmctl,
>> >> and vm.conf man pages. I also looked at the examples in
>> >> /etc/examples. Nothing stood out, so far.
>> >>
>> >> I'm running OpenBSD 7.4 on the hypervisor and guests. Any suggestions?
>> >>
>> >> PS: Overall, using vmm has been a good experience. I'm pretty happy with
>> >> it.
>> >>
>> >
>> > amd64 guest or i386?
>>
>> The guests are amd64. Here's a transcript, including a pause to allow
>> the boot reordering to finish:
>>
>> === start transcript ===
>> athena$ doas vmctl start batch2
>> vmctl: started vm 1 successfully, tty /dev/ttyp2
>> athena$ doas vmctl console batch2
>> Connected to /dev/ttyp2 (speed 115200)
>>
>>
>> OpenBSD/amd64 (batch2.rbcarleton.net) (tty00)
>>
>> login: root
>> Password:
>> Last login: Sun Dec 10 14:58:05 on tty00
>> OpenBSD 7.4 (GENERIC) #2: Fri Dec  8 15:38:40 MST 2023
>>
>> 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.
>> batch2# shutdown -r now
>> Shutdown NOW!
>> shutdown: [pid 47954]
>>
>> *** FINAL System shutdown message from r...@batch2.rbcarleton.net ***
>> System going down IMMEDIATELY
>>
>>
>> batch2#
>> System shutdown time has arrived
>>
>> batch2# syncing disks... done
>> vmmci0: powerdown
>> rebooting...
>>
>> [EOT]
>> athena$
>> === end transcript ===
>>
>> A note I'll add is that I don't recall getting the EOT at the end of the 
>> transcript
>> until I hit the enter key.
>>
>
> I don't think it will matter much but can you send a host dmesg? Either reply
> here or use sendbug.

I sent the dmesg off the mailing list. Thanks for taking a look.

Reply via email to