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

10-stable / vmrc snapshot: installing centos does not quite work #7

Closed
mathiasp opened this issue Aug 19, 2014 · 4 comments
Closed

Comments

@mathiasp
Copy link

Hi Michael,

thanks for vmrc.

I'm a first-time user of vmrc and bhyve ;) , and try to set up a centos image.

Choosing the centos65amd64iso, creating configuration and directories seems to work fine.

I'm dropped into the shell with a notice like
use /usr/local/etc/rc.d/vm onestart zimbra-centos2 to start your image...

Sadly, that drops me into a blank grub window...

Looking at the config file, it seems the machine is not started as iso.

So either the installation did not happen before, or the notice forgets to tell me how to boot the cdrom.

I'm now fumbling with booting manually - have to google a bit about grub...

Ask away if you need more information.

Cheers, Mathias

@mathiasp
Copy link
Author

Oh, the notice told me to use

/usr/local/etc/rc.d/vm oneiso zimbra-centos2

which I did. Guess something is not working after all ;)

/ Mathias

@mathiasp
Copy link
Author

I could install it, just using the grub commands from the config file.
BTW: the ascii graphics where horrible, I could just barely make it through the installer. I'm using tmux via ssh, and tips on how one could get the correct chars?

It still doesn't boot with service vm onestart,
It starts and works with manual grub commands

This is the commandline I'm seeing with ps auxwww:

root   8940    0.0  0.0 2123872   4372  3  S+    5:53PM    0:00.01 /usr/local/sbin/grub-bhyve -d /usr/local/vmrc/vm//zimbra-centos-six.five0 -m /usr/local/vmrc/vm//zimbra-centos-six.five0/device.map -r host -M 2048 zimbra-centos-six.five0

Here is the vmrc output as far as I can see:

            Setting the vm_device variable

                                           Determining if fsck should be run

                                                                            Determining whether to use bhyveload or grub-bhyve

                  Using grub-bhyve and checking if installed

                                                            Creating /usr/local/vmrc/vm//zimbra-centos-six.five0/device.map

               Checking if we are in ISO boot mode

                                                  Using the device.map:
                                                                       (hd0) /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.img
                                        (cd0) /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.iso

         Generating the zimbra-centos-six.five0 grub.cfg

sr/local/sbin/grub-bhyve -d /usr/local/vmrc/vm//zimbra-centos-six.five0 -m /usr/local/vmrc/vm//zimbra-centos-six.five0/device.map -r host -M 2048 zimbra-centos-six.five0
VM zimbra-centos-six.five0 appears to have loaded successfully

                                                              Reading the /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.conf config file
                                                  /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.conf: /vmlinuz-2.6.32-431.el6.x86_64: not found

                                                         Checking for /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.img and initializing vm_device

                                                            Starting VM Networking

                                                                                  Verifying if tap8000 already exists

         Running ifconfig tap8000 create

                                        Running ifconfig bridge0 addm tap8000 up

                                                                                Checking for preflight script /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.preflight.sh

                                                                                  Running the bhyve command with stdio console:
                   /usr/sbin/bhyve -c 1 -m 2048 -A -H -W -s 0,hostbridge -s 2,ahci-hd,/usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.img -s 3:0,virtio-net,tap8000 -s 5,lpc -l com1,stdio zimbra-centos-six.five0
              Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-431.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013

grub.cfg is empty:

# ll grub.cfg 
-rw-r--r--  1 root  wheel  1 Aug 19 17:57 grub.cfg

The device map:

# cat device.map 
(hd0) /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.img
(cd0) /usr/local/vmrc/vm//zimbra-centos-six.five0/zimbra-centos-six.five0.iso

my system is current as of today:

# uname -a
FreeBSD twin 10.0-STABLE FreeBSD 10.0-STABLE #2 r270167: Tue Aug 19 15:46:15 CEST 2014     root@twin:/usr/obj/usr/src/sys/GENERIC  amd64

Is it intended that there is only a loopback device?

[root@localhost ~]# ifconfig
lo        Link encap:Lokale Schleife  
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 Gü ltigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenl��nge:0 
          RX bytes:600 (600.0 b)  TX bytes:600 (600.0 b)

Shouldn't this bridged device show up somewhere?

# cat ifconfig_cmd.sh 
ifconfig tap8000 create
ifconfig bridge0 addm tap8000 up

Seems I have to learn more about bhyve - I had hoped vmrc would hand hold me a bit more :)

Lazy me :)

Cheers, Mathias

@mathiasp
Copy link
Author

OK, the grub / booting issue is documented in #8, and I now know that I do have a network card, I just needed ifconfig -a, linux doesn't show network cards that are down by default, duh... Maybe something worth documenting for linux noobs like me ;)

And giving tips how to configure bridged networking might also be helpful - it's my first time, and currently I have no idea how to give this virtual machine it's own ip ;)

@michaeldexter
Copy link
Owner

Were you able to put the full GRUB command in the configuration file? I
got a complaint about unmatched )'s and hope to experiment later today.

Any chance you are on the bhyve IRC channel?

I may have questions as I read through your work.

Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants