Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2014 17:12:44 -0700
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        Kurt Lidl <lidl@pix.net>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: Problem with ZFS userboot changes r262331 and VM with mixed partitions
Message-ID:  <CAG=rPVfkNNtKD1BF9OR-D9SNJg0obV4GApXoM-2e3J=d4tNWOQ@mail.gmail.com>
In-Reply-To: <53174140.5040004@pix.net>
References:  <CAG=rPVd5OQ1Gw6q-e94Ffnk_zPxkFvjaR5bpOOjMg7j-9AvSdw@mail.gmail.com> <53174140.5040004@pix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 5, 2014 at 7:22 AM, Kurt Lidl <lidl@pix.net> wrote:
>
>
> I ran into this same problem a couple of weeks ago when I first played
> with the ZFS boot support in userboot.so.
>
> The following set of operations on the hypervisor can be used to add
> bootable support to your zfs installation.
>
> (I don't know what the name of your zpool is on the emulated host.
> If the name of that zpool is the same as the zpool on your hypervisor
> host, you might have to go at this a different way.)  I have taken
> to naming the zpool for the any clients to be the same as the name
> of the virtual machine, so I can easily mount it on the host running
> the hypervisor and fiddle with it.
>
> For the purposes of this example, my virtual machine is called "vm0".
> The zpool for that host lives in a zpool called "zdata" on my
> hypervisor machine.  In my case, my /boot was a symlink that
> pointed to /bootdir/boot, so you might need to adjust the
> following slightly.
>
> zfs import -f -R /mnt vm0
>
> fsck_ufs /dev/zvol/zdata/vm0p2
> mount /dev/zvol/zdata/vm0p2 /mnt/bootdir
> cd /mnt
> chflags -h nosunlink boot
> rm boot
> cp -R bootdir/* .
> umount /mnt/bootdir
> cd /
> zpool export vm0
>
> Good luck.

Hi,

Thanks for breaking down the steps so nicely!  I followed similar
steps and got my VM to
boot with the latest userboot.

--
Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVfkNNtKD1BF9OR-D9SNJg0obV4GApXoM-2e3J=d4tNWOQ>