Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jul 2017 11:08:42 -0500
From:      Benjamin Kaduk <bjk@FreeBSD.org>
To:        Boris Samorodov <bsam@passap.ru>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh
Message-ID:  <20170709160841.GN80947@kduck.kaduk.org>
In-Reply-To: <8ac4e8a3-35c9-0054-0e5f-c663b80fd97b@passap.ru>
References:  <ea2abc9d-0b11-0944-f886-866e56f03663@passap.ru> <20170709153718.GM80947@kduck.kaduk.org> <0d526def-9e14-078a-5933-ab97cd643e8c@passap.ru> <8ac4e8a3-35c9-0054-0e5f-c663b80fd97b@passap.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 09, 2017 at 06:58:09PM +0300, Boris Samorodov wrote:
> 09.07.2017 18:48, Boris Samorodov пишет:
> > 09.07.2017 18:37, Benjamin Kaduk пишет:
> >>
> >> Documentation looks okay, as -I <installer-image> is documented during
> >> the install stage, and is not supposed to be needed during
> >> normal operation.
> >>
> >> The quoted error message from vmrun.sh happens when it thinks you
> >> need to install on the given filesystem image
> >> (if [ $force_install -eq 1 -o $need_install -eq 1 ];)
> >> so it might be worth checking that your guest.img contains a valid
> >> FFS filesystem on it.  (Hmm, maybe you used ZFS and vmrun.sh isn't
> >> prepared to handle that?)
> > 
> > Yes, I used AutoZFS installer function to install FreeBSD.
> 
> -----
> % sudo mdconfig -f quest.img
> mdo0
> 
> % gpart show md0
> =>      40  16777136  md0  GPT  (8.0G)
>         40      1024    1  freebsd-boot  (512K)
>       1064       984       - free -  (492K)
>       2048   4194304    2  freebsd-swap  (2.0G)
>    4196352  12578816    3  freebsd-zfs  (6.0G)
>   16775168      2008       - free -  (1.0M)
> -----
> 
> So, that seems the same bug as at my previous email:
> https://lists.freebsd.org/pipermail/freebsd-current/2017-July/066514.html

Is it?  I refer to this part of vmrun.sh:

	file -s ${first_diskdev} | grep "boot sector" > /dev/null
	rc=$?
	if [ $rc -ne 0 ]; then
		file -s ${first_diskdev} | grep ": Unix Fast File sys" > /dev/null
		rc=$?
	fi
	if [ $rc -ne 0 ]; then
		need_install=1
	else
		need_install=0
	fi

Which is not expected to be particularly robust.
(BTW, I think there is not agreement as to whether vmrun.sh should
be used in general use, or alternate solutions for VM managemnet.)

-Ben



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170709160841.GN80947>