# Moving from FreeBSD VM to physical machine



## russelld (Jan 20, 2019)

Hi all, I've spent the last weekend having a go at building up a FreeBSD-12 desktop running ZFS in a qemu virtual machine hosted on Gentoo.

Now I'm a happy with how its running, what would the steps be to duplicate this FreeBSD VM to a physical machine?

So far I have been able to make a list of list of the packages installed with pkg with this simple one liner:

```
pkg info | cut -f1 -d" ""
```
 
However, this still has the version numbers, and I'm really at sea with how to admin FreeBSD so appreciate your help in getting this done as easily as possible!

thanks in advance!


----------



## rigoletto@ (Jan 20, 2019)

You could stream your current install to some ZFS disk using the `zfs send | zfs recv` feature, and later install FreeBSD and stream that back to it. Or just install it in another disk, and then stream your changes directly to that.

If you wanna just reinstall the same packages:

`pkg prime-list > pkglist`
then
`pkg install `cat pkglist``

Also, `pkg alias`.


----------



## russelld (Jan 20, 2019)

hi rigoletto,
Thanks, that's exactly what I'm looking for!

BTW, where this command documented in the installed man files?
`pkg prime-list`

I couldn't find it with the usual 
`man pkg`

eventually I found it with a google search that ended up at online manual for FreeBSD Chapter 4.4
which puts it here:
`/usr/local/etc/pkg.conf`

Seems a bit obscure for such a useful command sequence.

Thanks again, 
- Russell


----------



## russelld (Jan 21, 2019)

woops, just caught up with your final comment!

`pkg alias`

please excuse my noob-ness


----------

