From owner-freebsd-virtualization@freebsd.org Tue Dec 17 11:01:46 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7526B1E3DC6 for ; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47cZvt2YW1z4Bf3 for ; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 57B591E3DC5; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 577CB1E3DC4 for ; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cZvt1h8mz4Bf2 for ; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34D6CCEE0 for ; Tue, 17 Dec 2019 11:01:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xBHB1k8q080227 for ; Tue, 17 Dec 2019 11:01:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xBHB1kjW080226 for virtualization@FreeBSD.org; Tue, 17 Dec 2019 11:01:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 242666] Stopped VM cant restart again Date: Tue, 17 Dec 2019 11:01:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: bhyve X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bernhard@blberger.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 11:01:46 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242666 --- Comment #4 from Bernhard Berger --- (In reply to Aleksandr Fedorov from comment #1) root@superserver:/data/bhyve # bhyvectl --get-exit-reason --vm test-pc VM:test-pc is not created. root@superserver:/data/bhyve # bhyvectl --destroy --vm test-pc VM:test-pc is not created. root@superserver:/data/bhyve # vm start test-pc Starting test-pc * found guest in /data/bhyve/test-pc ! guest appears to be running already root@superserver:/data/bhyve # ls /dev/vmm nextcloud samba test-pc unifi root@superserver:/data/bhyve # ls test-pc disk0.img test-pc.conf root@superserver:/data/bhyve # vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE nextcloud default bhyveload 2 2G - Yes [3] Running (8638= 3) samba default bhyveload 2 2G - Yes [2] Running (1562= 1) test-pc default bhyveload 2 2G - No Stopped unifi default grub 1 2G - Yes [1] Running (1560= 1) root@superserver:/data/bhyve # ps xaf | grep bhyve 86383 0- SC 450:08.40 bhyve: nextcloud (bhyve) 15601 2- SC 53:29.89 bhyve: unifi (bhyve) 15621 2- IC 207:39.88 bhyve: samba (bhyve) root@superserver:/data/bhyve # ls /dev | grep nmdm nmdm-nextcloud.1A nmdm-nextcloud.1B nmdm-samba.1A nmdm-samba.1B nmdm-unifi.1A nmdm-unifi.1B Definitely the VM "test-pc" is not started and cannot be started because: /dev/vmm/test-pc still exists.=20 There must be a way to remove the /dev/vmm/test-pc device. Just to understand, this is not the first time this problem has occurred, b= ut since I've been working with bhyve since FreeBSD 11, it's very off.=20 It often happens that if you type "reboot" in the guest system (FreeBSD), t= his is exactly what happens. If you enter "shutdown -p now" in the guest system (FreeBSD), it may also happen that the VM cannot be started afterwards.=20 I think it has to do with a non-closed console. In the past, I solved this by rebooting the host system. But that can't be = the solution and that's why I opened this ticket. VM list apparently only checks if the process bhyve exists bhyveload seems to only check if the device /dev/vmm/ exists.=20 bhyvectl A process "bhyve " must also exist for /dev/vm/.= If the process does not exist, the device must be removed. This should not be = so difficult to program. Yours sincerely There is another problem which has to do with VM-BHYVE but how to set a tic= ket --=20 You are receiving this mail because: You are the assignee for the bug.=