Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD guest ZFS install #65

Closed
Johanhen opened this issue Nov 7, 2015 · 11 comments
Closed

FreeBSD guest ZFS install #65

Johanhen opened this issue Nov 7, 2015 · 11 comments
Labels

Comments

@Johanhen
Copy link

Johanhen commented Nov 7, 2015

Hello all.
I did try to install FreeBSD-10.2 from the bootonly.iso as a guest and with the installer select ZFS.
The reason I want ZFS inside the virtual machine is because I would like to snapshot some data when i need to update some stuff. I know I can snapshot the whole machine, but that is more painful when i need to rollback.

If I select zfs on root when istalling, the installer errors out with a out of swap message.
Then after a reboot of the guest, it can not boot!, and is also almost unkillable.
Is this a bhyve thing or something else.

@pr1ntf pr1ntf added the bug label Nov 7, 2015
@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

Are you giving the VM an adequate amount of RAM?
ZFS likes RAM, but iohyve gives the VM 256M by default.

Try something like iohyve set guestname ram=2048M or more and see if that helps.

@pr1ntf pr1ntf closed this as completed Nov 7, 2015
@Johanhen
Copy link
Author

Johanhen commented Nov 7, 2015

Op 07/11/15 om 17:36 schreef pr1ntf:

Are you giving the VM an adequate amount of RAM?
ZFS likes RAM, but iohyve gives the VM 256M by default.

Try something like |iohyve set guestname ram=2048M| or more and see if
that helps.


Reply to this email directly or view it on GitHub
#65 (comment).

Thank you for your quick responce.
I did give the machine some extra mem 2048 to be exact.
And this way the server installs. But now (I probably do something wrong
) I have a machine that is unstop able.

When the installer is finished it asks me if I want to reboot.
I selected YES.
Then the last line on the console (iohyve console) is
All buffers synced.
Uptime: 10m14s

I can not escape from the machine.
So I try to stop the machine from the second console on the host

iohyve stop bsdguest1

Stopping bsdguest.mydomein.com...
usage: kill [-s signal_name] pid ...
kill -l [exit_status]
kill -signal_name pid ...
kill -signal_number pid ...
root@host:~ #

What can I do?

@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

I can not escape from the machine.

Check out the man page on how to escape from the iohyve console. It uses cu to console into the guest. [RETURN][RETURN]~~. You can also stop all iohyve consoles at once by running iohyve conreset from another console on the host.
https://github.com/pr1ntf/iohyve/blob/master/iohyve.8.txt#L260

iohyve stop bsdguest1
Stopping bsdguest.mydomein.com...
usage: kill [-s signal_name] pid ...
kill -l [exit_status]

That last error when you stop the guest is indeed strange, does the guest show up as running when you run iohyve list? That behavior should not be happening with the new pgrep fixes.
https://github.com/pr1ntf/iohyve/blob/master/iohyve.8.txt#L260

Running iohyve version should tell you what version you are running.

I should also note that after the guest is shut down:

All buffers synced.
Uptime: 10m14s

There is no longer a running guest. So that is why you are seeing the error from iohyve stop bsdguest1 in the first place. You cannot stop a guest that does not exist.

If you want to destroy the guest's resources in vmm you can run iohyve destroy bsdguest1

@pr1ntf pr1ntf added question and removed bug labels Nov 7, 2015
@Johanhen
Copy link
Author

Johanhen commented Nov 7, 2015

Op 07/11/15 om 21:53 schreef pr1ntf:

I can not escape from the machine.

Check out the man page on how to escape from the iohyve console. It
uses |cu| to console into the guest. |[RETURN][RETURN]~~.| You can
also stop all iohyve consoles at once by running |iohyve conreset|
from another console on the host.

iohyve conreset did give back my console

https://github.com/pr1ntf/iohyve/blob/master/iohyve.8.txt#L260

iohyve stop bsdguest1
Stopping bsdguest.mydomein.com...
usage: kill [-s signal_name] pid ...
kill -l [exit_status]

That last error when you stop the guest is indeed strange, does the
guest show up as running when you run |iohyve list|? That behavior
should not be happening with the new |pgrep| fixes.
https://github.com/pr1ntf/iohyve/blob/master/iohyve.8.txt#L260

Running |iohyve version| should tell you what version you are running.

iohyve list indeed tells me the host is not running.
iohyve list
Guest VMM? Running? rcboot? Description
bsdguest1 YES NO NO
Sat_Nov__7_21:08:32_CET_2015

I am running the ports version
iohyve v0.7 2015/10/27 Im Here for the Party Edition

I should also note that after the guest is shut down:

All buffers synced.
Uptime: 10m14s

There is no longer a running guest. So that is why you are seeing the
error from |iohyve stop bsdguest1| in the first place. You cannot stop
a guest that does not exist.

If you want to destroy the guest's resources in |vmm| you can run
|iohyve destroy bsdguest1|

Iohyve destroy bsdguest1 did set VMM on NO also.

So all in all it works. Now I need to read more and try to understand
VMM and the likes.

Thank you for your time and patience.
regards
Johan


Reply to this email directly or view it on GitHub
#65 (comment).

@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

No problem, I'm here to help 😄

Feel free to ask more questions as they arise!

@Johanhen
Copy link
Author

Johanhen commented Nov 7, 2015

Op 07/11/15 om 22:22 schreef pr1ntf:

No problem, I'm here to help 😄

Feel free to ask more questions as they arise!


Reply to this email directly or view it on GitHub
#65 (comment).

Well you asked for it. :D

If I add a disk to a running guest, It will not show up in the guest, I
need to reboot the guest for that, is this a bhyve thing, or is there an
option or command that I can run
Also camcontrol rescan does not bring up the disk.

If I do a iohyve list i suspected to see al the running guests, not disks.

iohyve disks

disk0 10G
disk1 30G
disk2 25G
disk0 10G
disk1 30G

iohuve list

Guest VMM Running rcboot Desciption
bsdguest0 YES YES NO description
bsdguest0 YES YES NO description
bsdguest0 YES YES NO description
bsdguest1 YES YES NO description
bsdguest1 YES YES NO description

This looks a little strange, It looks like I have duplicate machines
running.
Maybe you can add an option to iohyve list like iohyve list all that
will show all disks running, and iohyve list only displaying the actual
machine running (disk0).

regards
Johan

@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

If I add a disk to a running guest, It will not show up in the guest, I need to reboot the guest for that, is this a bhyve thing, or is there an option or command that I can run Also camcontrol rescan does not bring up the disk.

That is to be expected. There is currently no way to "hot add" a disk to bhyve.

iohyve disks
disk0 10G
disk1 30G
disk2 25G
disk0 10G
disk1 30G

iohyve disks is supposed to have a syntax of iohyve disks guestname nice bug catch there.
If you want all the disks shown in iohyve, run iohyve info.

This brings me to your next bug catch:
That is not the expected output of iohyve list
That has to do with changes in regards to multiple pool support.

I have opened issues for those two bugs.

Thank you for your help!

@Johanhen
Copy link
Author

Johanhen commented Nov 7, 2015

Op 07/11/15 om 22:22 schreef pr1ntf:

No problem, I'm here to help 😄

Feel free to ask more questions as they arise!


Reply to this email directly or view it on GitHub
#65 (comment).

One more thing.

iohyve info gives me the following output.

Name Size RAM CPU OS Loader
bsdguest0 - 256 1 default bhyveload
bsdguest0 10G 256 1 default bhyveload
bsdguest0 30G 256 1 default bhyveload
bsdguest0 25G 256 1 default bhyveload
bsdguest1 - 2048 1 default bhyveload
bsdguest1 10G 2048 1 default bhyveload
bsdguest1 30G 2048 1 default bhyveload

This looks also a little strange.
I think iohyve info does not need to put the RAM, CPU, OS and loader
values at the disks as they are machine values and not disk values this
can confuse some users.

I think a nicer output would be

Name Total Size Disks RAM CPU OS
Loader
bsdguest0 Sum of disks(65G) 3 256 1 default
bhyveload
bsdguest1 40G 2 2048 1
default bhyveload

regards
Johan

@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

Thank you for your input, but I will probably keep it the way it is for the time being and continue to squash bugs and add new features.

I will possibly add the ability to see the disks, like:

bsdguest1
bsdguest1/disk0
bsdguest1/disk1

The purpose of iohyve info is to give basic information about all of the guests in iohyve, including disks, ram, cpu, os, and loader. You can optionally run iohyve info -d if you have enough real estate for the description on your console.

@Johanhen
Copy link
Author

Johanhen commented Nov 7, 2015

Op 07/11/15 om 23:40 schreef pr1ntf:

Thank you for your input, but I will probably keep it the way it is
for the time being and continue to squash bugs and add new features.

I will possibly add the ability to see the disks, like:

|bsdguest1 bsdguest1/disk0 bsdguest1/disk1 |

The purpose of |iohyve info| is to give basic information about all of
the guests in iohyve, including disks, ram, cpu, os, and loader. You
can optionally run |iohyve console -d| if you have enough real estate
for the description on your console.


Reply to this email directly or view it on GitHub
#65 (comment).

I understand, If you show the disks, maybe turn it into something like this.

Name Size Ram CPU OS loader
bsdguest0 - 256 1 default
bhyveloader
bsdguest0/disk0 10G - - - -
bsdguest0/disk1 30G - - - -
bsdguest0/disk2 25G - - - -
bsdguest1 - 1024 1 default bhyveloader
bsdguest1/disk0 10G - - - -
bsdguest1/disk1 30G - - - -

So one can see in one look what is the guest and what are the disks.

And maybe the first - after the guest itself could be the total sum of
all disks, it would look like the following.
Name Size Ram CPU OS loader
bsdguest0 65G 256 1 default bhyveloader
bsdguest0/disk0 10G - - - -
bsdguest0/disk1 30G - - - -
bsdguest0/disk2 25G - - - -
bsdguest1 40G 1024 1 default bhyveloader
bsdguest1/disk0 10G - - - -
bsdguest1/disk1 30G - - - -

Thanks again for your time.

@pr1ntf
Copy link
Owner

pr1ntf commented Nov 7, 2015

That is a fantastic idea.

That's going in the notebook. Thanks!

pr1ntf pushed a commit that referenced this issue Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants