Solved Simple questions on VirtualBox

Hi All,
Sorry, no details yet:
I want to be able to use VM for FreeBSD 12.0 (host and guests) and connecting with ssh (mode headless) for --nic1 bridged --bridgeadapter re0 (..).
So far without success and I have a lot of questions. The very first question: I don't see my VBOXNET0 after command "ifconfig -a" in host. VM most by in list?
 
It depends on how the VM was set up on VirtualBox. By default an Intel Pro/1000 adapter is emulated, which shows up as em(4). If you set the adapter type to "Paravirtualized Network" it will show up as vtnet(4).
 
I expected, it to work out, but ... I have running VM (nox11, headless, vrde no. VNC no), (...--type dvddrive --medium FreeBSD.iso), (...--boot1 dvd).
ifconfig: re0 inet 192.168.0.10.
I expected that during the first visit on running VM: ssh vuser@192.168.0.10 it to start installBSD for VM guest.
1.where did I go after ssh vuser@192.168.0.10?
2.how to make install guest OS (headless)?
I suspect everyone knows it except me. Sorry
 
Very likely vboxnet* modules are not loaded on host. Verify with kldstat | grep -i vbox on host. If not, start by /usr/local/etc/rc.d/vboxnet start. You do need to have
vboxnet_enable="YES"
in your /etc/rc.conf. Alternatively you can use onestart to test things.

To check the VM settings login (su) to the user you're using to launch VMs under. Check VM properties by: VBoxManage showvminfo <VM> where VM is your name of the VM.

Note if VM doesn't support headless install you can't install it headless. You need to install it by connecting to its console somehow (e.g. VNC) and then afterinstall set all necessary stuff so it boots headless. Even FreeBSD doesn't support 100% headless installation without small modification (you can google how to boot FreeBSD headless, or via serial port, etc..).
 
sesem , as a new member perhaps you do not know yet there is a very good
resource for FreeBSD: the Handbook, here the link.

The Handbook can get you started on many subjects. I used it to start with VirtualBox,
about 2 months ago.

Hope it can help for future;)

bye
n.
 
I hope you help me to understand what it means "Note if VM doesn't support headless install you can't install it headless. " I want to avoid X11, VNC ...
Code:
    pkg info | grep virt
virtualbox-ose-additions-nox11-5.2.22_1 VirtualBox additions for FreeBSD guests
virtualbox-ose-kmod-5.2.22     VirtualBox kernel module for FreeBSD
virtualbox-ose-nox11-5.2.22_1  General-purpose full virtualizer for x86 hardware


    /boot/loader.conf
...
vboxdrv_load="YES"

if_bridge_load="YES"    
bridgestp_load="YES"
if_tap_load="YES" 

   /etc/rc.conf
vboxnet_enable="YES"
vboxwatchdog_enable="YES"
vboxwatchdog_user="vusr"

vboxwebsrv_enable="YES"
vboxwebsrv_user="vusr"

vboxguest_enabled="YES"
vboxservice_enable="YES"

cloned_interfaces="tap 0 tap1 bridge0"
ifconfig_bridge0="addm re0 addm tap0 addm tap1 up"
ifconfig_tap0="up"
ifconfig_tap1="up"

vboxheadless_enable="YES"
vboxheadless_user="vusr"
vboxheadless_delay="1"
vboxless_stop="acpipowerbutton"
vboxheadless_machines="free4"
vboxheadless_stop="savestate"
vboxheadless_free4_delay="60"


   showvminfo free4
Name:            free4
Groups:          /
Guest OS:        FreeBSD (64-bit)
UUID:            6caf800d-4e60-4771-8601-fcde6538265e
Config file:     /usr/home/vusr/vm_machines/free4/free4.vbox
Snapshot folder: /usr/home/vusr/vm_machines/free4/Snapshots
Log folder:      /usr/home/vusr/vm_machines/free4/Logs
Hardware UUID:   6caf800d-4e60-4771-8601-fcde6538265e
Memory size:     512MB
Page Fusion:     off
VRAM size:       1MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             on
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: None
State:           running (since 2018-12-26T16:24:03.820000000)
Monitor count:   1
3D Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            ide-controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            sata-controller
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      30
Storage Controller Bootable (1):        on
ide-controller (0, 0): /usr/home/vusr/iso/FreeBSD.iso (UUID: 500dc632-eecf-4aae-80be-a78a59f47136)
sata-controller (0, 0): /usr/home/vusr/hdd/disk1.vdi (UUID: a351c85a-13a1-46ac-b617-7988999e2d19)
NIC 1:           MAC: 080027FE429F, Attachment: Bridged Interface 're0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           disabled
Audio playback:  disabled
Audio capture: disabled
Clipboard Mode:  disabled
Drag and drop Mode: disabled
Session name:    headless
Video mode:      720x400x0 at 0,0 enabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
OS type:                             FreeBSD_64
Additions run level:                 0

Guest Facilities:

No active facilities.

who after: ssh user@ip i get home dir user? But after "exit" (from VM?) i see "connected to 192.168.0.10 closed". Accordingly no download guest system, and so wanted it.
 
Note if VM doesn't support headless install you can't install it headless. You need to install it by connecting to its console somehow (e.g. VNC) and then afterinstall set all necessary stuff so it boots headless.
Can't imagine that FreeBSD doesn't support headless install, i got even win7 headless in virtualbox once..
 
Can't imagine that FreeBSD doesn't support headless install,
Easy to test - insert FreeBSD install ISO to a headless VM and try to install it. I don't mean unattended installation though.
I vaguely recall you need to recompile bootloader or some part of it to default its output to comconsole (serial port). It was some time ago, so I don't know.
 
sesem If guest doesn't support headless installation you can't install it headless (to some extreme: you can't install MS-DOS by default headless). We are talking about installation, not running VM headless though.

You are mixing two things here: 1) bridged interface 2) vboxnetX interace. The later is used for host-only interfaces.

Your questions are a bit hard for me to understand:

who after: ssh user@ip i get home dir user? But after "exit" (from VM?) i see "connected to 192.168.0.10 closed". Accordingly no download guest system, and so wanted it.

What do you mean by this? It seems like expected behavior. You've SSH to your FreeBSD VM - 192.168.0.10 - and then you exited it.
It seems you've already installed FreeBSD. You can setup the serial console on this VM and modify configuration files in VM so you can see booting on serial console too (very handy when you have headless VMs).
 
Thank you for supporting me. I expected that after - ssh user@ip - something similar will begin "installBSD" (from properties VM: storagectl ide-controller ...
--type dvddrive --medium FreeBSD.iso; modifyvm VMname --boot1 dvd. ) - auto start install OS on first visit in VM then my modify configurations. It was not.
How to make sure that I visited guest FreeBSD?
 
I have a simple situation - development laptop with VM. I deliberately left Windows. Really my way serial console? Easier to return X11, VNC?
 
FreeBSD doesn't support headless installation by default. Also, sshd is not running by default when you boot off the ISO image. Hence you can't connect to it.

You now mentioned autoinstall and modified configuration. I don't know what you mean by this. Did you modify the installation medium ? There is a docs in older handbook: advanced installation guide that guides you how to prepare this.

You have several ways of doing installations:
- have GUI and install it 'classic' way
- connect to it via VNC (you can even tunnel guest port outside to a windows/X client)
- use a serial console (FreeBSD requires small modification of installation medium )
- prepare an autoinstall profile, boot from PXE and do the automatic installation + guest customization (i.e. known IP, sshd_enable in rc.conf, etc..)
 
I install xorg, but after
Code:
xorg -configure; startx
message "...fatal server error... ". This is an old problem (but not for me ). Сan i hope they watch mine logs files? In this topic or create new?
 
I think i got running VM. This post solved. I want to thank member _martin, but I don’t know how? Whether to publish script (bash) for work with VM (there are so many)?
 
Back
Top