Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Boris Samorodov
09.07.2017 19:08, Benjamin Kaduk пишет:

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

As a side note: I used the process written at TH...

-- 
WBR, bsam
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Boris Samorodov
09.07.2017 19:08, Benjamin Kaduk пишет:
> 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  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  10241  freebsd-boot  (512K)
>>   1064   984   - free -  (492K)
>>   2048   41943042  freebsd-swap  (2.0G)
>>4196352  125788163  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.)

OK, normal bhyveload/bhyve ended up at a successful boot.
Benjamin, thank you for your comments and help!

-- 
WBR, bsam
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Benjamin Kaduk
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  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  10241  freebsd-boot  (512K)
>   1064   984   - free -  (492K)
>   2048   41943042  freebsd-swap  (2.0G)
>4196352  125788163  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
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Boris Samorodov
09.07.2017 18:48, Boris Samorodov пишет:
> 09.07.2017 18:37, Benjamin Kaduk пишет:
>> On Sun, Jul 09, 2017 at 01:02:26PM +0300, Boris Samorodov wrote:
>>> Hi All,
>>>
>>> I try to create a FreeBSD guest as per TH, section "21.7.2. Creating
>>> a FreeBSD Guest". All is good up until the last command at the section.
>>> When I try to launch the installed client, I get:
>>> -
>>> # sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d
>>> guest.img guestname
>>> Launching virtual machine "guestname" ...
>>> Installation CDROM image "./release.iso" is not readable
>>>
>>> % uname -a
>>> FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #14 r320821: Sun
>>> Jul  9 07:10:56 MSK 2017
>>> bsam@builder.bsnet:/usr/obj/usr/src/sys/PKG64X  amd64
>>> -
>>>
>>> Is it a bug at vmrun.sh or documentation?
>>
>> Documentation looks okay, as -I  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  10241  freebsd-boot  (512K)
  1064   984   - free -  (492K)
  2048   41943042  freebsd-swap  (2.0G)
   4196352  125788163  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

-- 
WBR, bsam
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Boris Samorodov
09.07.2017 18:37, Benjamin Kaduk пишет:
> On Sun, Jul 09, 2017 at 01:02:26PM +0300, Boris Samorodov wrote:
>> Hi All,
>>
>> I try to create a FreeBSD guest as per TH, section "21.7.2. Creating
>> a FreeBSD Guest". All is good up until the last command at the section.
>> When I try to launch the installed client, I get:
>> -
>> # sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d
>> guest.img guestname
>> Launching virtual machine "guestname" ...
>> Installation CDROM image "./release.iso" is not readable
>>
>> % uname -a
>> FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #14 r320821: Sun
>> Jul  9 07:10:56 MSK 2017
>> bsam@builder.bsnet:/usr/obj/usr/src/sys/PKG64X  amd64
>> -
>>
>> Is it a bug at vmrun.sh or documentation?
> 
> Documentation looks okay, as -I  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.

-- 
WBR, bsam
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Benjamin Kaduk
On Sun, Jul 09, 2017 at 01:02:26PM +0300, Boris Samorodov wrote:
> Hi All,
> 
> I try to create a FreeBSD guest as per TH, section "21.7.2. Creating
> a FreeBSD Guest". All is good up until the last command at the section.
> When I try to launch the installed client, I get:
> -
> # sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d
> guest.img guestname
> Launching virtual machine "guestname" ...
> Installation CDROM image "./release.iso" is not readable
> 
> % uname -a
> FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #14 r320821: Sun
> Jul  9 07:10:56 MSK 2017
> bsam@builder.bsnet:/usr/obj/usr/src/sys/PKG64X  amd64
> -
> 
> Is it a bug at vmrun.sh or documentation?

Documentation looks okay, as -I  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?)

-Ben
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


[bhyve] FreeBSD guest, Handbook, vmrun.sh

2017-07-09 Thread Boris Samorodov
Hi All,

I try to create a FreeBSD guest as per TH, section "21.7.2. Creating
a FreeBSD Guest". All is good up until the last command at the section.
When I try to launch the installed client, I get:
-
# sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d
guest.img guestname
Launching virtual machine "guestname" ...
Installation CDROM image "./release.iso" is not readable

% uname -a
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #14 r320821: Sun
Jul  9 07:10:56 MSK 2017
bsam@builder.bsnet:/usr/obj/usr/src/sys/PKG64X  amd64
-

Is it a bug at vmrun.sh or documentation?

-- 
WBR, bsam
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"