How do you access headless vm?

Discussions related to using VirtualBox on Linux hosts.
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

How do you access headless vm?

Post by ITSM Guy »

I am trying to install an os on this vm but I can't access it. The server that hosts the vms is headless.

I used these instructions:
https://websiteforstudents.com/create-v ... -headless/

I am trying to create vms on a headless server.

# VBoxManage showvminfo DC02
Name: DC02
Groups: /
Guest OS: Fedora (64-bit)
UUID: 9db6dbce-62db-4a9c-a1a2-f703972a7d0c
Config file: /root/VirtualBox VMs/DC02/DC02.vbox
Snapshot folder: /root/VirtualBox VMs/DC02/Snapshots
Log folder: /root/VirtualBox VMs/DC02/Logs
Hardware UUID: 9db6dbce-62db-4a9c-a1a2-f703972a7d0c
Memory size: 6144MB
Page Fusion: disabled
VRAM size: 128MB
CPU exec cap: 100%
HPET: disabled
CPUProfile: host
Chipset: piix3
Firmware: BIOS
Number of CPUs: 6
PAE: enabled
Long Mode: enabled
Triple Fault Reset: disabled
APIC: enabled
X2APIC: enabled
Nested VT-x/AMD-V: disabled
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
Boot Device 1: DVD
Boot Device 2: HardDisk
Boot Device 3: Not Assigned
Boot Device 4: Not Assigned
ACPI: enabled
IOAPIC: enabled
BIOS APIC mode: APIC
Time offset: 0ms
RTC: local time
Hardware Virtualization: enabled
Nested Paging: enabled
Large Pages: disabled
VT-x VPID: enabled
VT-x Unrestricted Exec.: enabled
Paravirt. Provider: Default
Effective Paravirt. Prov.: KVM
State: running (since 2021-10-05T19:10:07.648000000)
Graphics Controller: VMSVGA
Monitor count: 1
3D Acceleration: disabled
2D Video Acceleration: disabled
Teleporter Enabled: disabled
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: disabled
Allow Tracing to Access VM: disabled
Tracing Configuration:
Autostart Enabled: disabled
Autostart Delay: 0
Default Frontend:
VM process priority: default
Storage Controller Name (0): SATA Controller
Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 30
Storage Controller Port Count (0): 30
Storage Controller Bootable (0): on
Storage Controller Name (1): IDE Controller
Storage Controller Type (1): PIIX4
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 2
Storage Controller Port Count (1): 2
Storage Controller Bootable (1): on
SATA Controller (0, 0): /root/VirtualBox VMs/DC02/DC02_DISK.vdi (UUID: 1f5413e3-5bb8-43d7-9c43-09b7a44f9316)
IDE Controller (1, 0): /root/Downloads/fedora_server.iso (UUID: f1043daf-42c6-4027-b5de-683cf886d608)
NIC 1: MAC: 0800273E09D9, Attachment: Bridged Interface 'enp5s0', 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: enabled (Driver: ALSA, Controller: AC97, Codec: STAC9700)
Audio playback: disabled
Audio capture: disabled
Clipboard Mode: disabled
Drag and drop Mode: disabled
Session name: headless
Video mode: 800x600x32 at 0,0 enabled
VRDE: enabled (Address 10.0.0.248, Ports 5001, MultiConn: off, ReuseSingleConn: off, Authentication type: guest)
Video redirection: disabled
OHCI USB: disabled
EHCI USB: disabled
xHCI USB: 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

Capturing: not active
Capture audio: not active
Capture screens: 0
Capture file: /root/VirtualBox VMs/DC02/DC02.webm
Capture dimensions: 1024x768
Capture rate: 512kbps
Capture FPS: 25kbps
Capture options:

Guest:

Configured memory balloon size: 0MB
OS type: Linux26_64
Additions run level: 1
Additions version: 6.0.0 r127566

Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2021/10/05 19:11:40 UTC)
Facility "Seamless Mode": not active (last update: 2021/10/05 19:11:40 UTC)
Facility "Graphics Mode": not active (last update: 2021/10/05 19:11:40 UTC)

None of these connections will connect. The default remote desktop that came withe fedora keeps crashing when I try.
Attachments
Screenshot from 2021-10-05 16-15-53.png
Screenshot from 2021-10-05 16-15-53.png (61.7 KiB) Viewed 8052 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do you access headless vm?

Post by scottgus1 »

The VM setup has a couple options to remote into it: Virtualbox's VRDE Server, which allows remoting into the VM's 'monitor' (which still calculates even though the VM is running headless) like a remote-enabled KVM switch, and the VM OS's native remote sever.

Bridged receives IP from the physical LAN's DHCP server, if everything is working properly.
ITSM Guy wrote:NIC 1: MAC: 0800273E09D9, Attachment: Bridged Interface...
VRDE: enabled (Address 10.0.0.248, Ports 5001, MultiConn: off, ReuseSingleConn: off, Authentication type: guest)
If the reported IP address of 10.0.0.248 is the OS's received IP address then you can remote into the VM OS using 10.0.0.248, if the OS's firewall is open for remoting in, and you're using the correct remote protocol and the VM OS's required port number.

The port 5001 is for Virtualbox's VRDE 'monitor' remote service, not for the OS's built-in remote service. The protocol VRDE uses depends on the Extension Pack you installed in the host. You can set up RDP or VNC protocol. RDP comes automatically when you install Oracle's Extension Pack. VNC needs to be enabled but does not require Oracle's Extension Pack.

The 'monitor' that VRDE accesses is in the host, not the VM. So to access the VRDE 'monitor' you remote into the host using the correct protocol client and the port shown in the VRDE line above:
localhost:5001
127.0.0.1:5001

You might have to open port 5001 in the host's firewall.
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

I thought I could set a static IP but that isn't what setting --vrdeaddress does apparently. The OS isn't installed yet, that's what I'm trying to do. I guess I could let it start and wait until arp registers the mac but I don't know if there are firewall issues for the setup process. I did manually start installing using the gui on another server to test but even after identifying the ip address, I was not able to rdp to it using krdc. How do I access VirtualBox's VRDE 'monitor' remote service? Would that be the IP address of the server hosting the vms? What do I use for authentication?
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

I've opened port 5001 and 3389 on the server where the vms reside. When I krdc 10.0.0.251:5001 (and 3389) I get an authentication prompt and if I click OK or Cancel nothing happens.
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

[root@fedora ~]# xfreerdp /v:10.0.0.11:3389
[09:51:55:340] [373352:373353] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[09:51:55:340] [373352:373353] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[09:51:55:340] [373352:373353] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[09:51:55:340] [373352:373353] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[09:51:55:340] [373352:373353] [INFO][com.freerdp.client.x11] - No user name set. - Using login name: username
[09:51:56:649] [373352:373353] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[09:51:56:651] [373352:373353] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[09:51:56:651] [373352:373353] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[09:51:56:651] [373352:373353] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[09:51:56:651] [373352:373353] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[09:51:56:656] [373352:373353] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[09:51:56:656] [373352:373353] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[09:51:56:656] [373352:373353] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[09:51:56:656] [373352:373353] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[09:51:56:656] [373352:373353] [ERROR][com.freerdp.core] - freerdp_post_connect failed

VirtualBox is running on 10.0.0.10 and 10.0.0.11
The vm IPs are 10.0.0.251 for the one running on 10.0.0.11 and 10.0.0.248 for the one running on 10.0.0.10
I've tried port 3389 and 5001 and 5000 but get the same error.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do you access headless vm?

Post by scottgus1 »

ITSM Guy wrote:I get an authentication prompt
Oh, yes, I forgot about that.
ITSM Guy wrote:VRDE: enabled (Address 10.0.0.248, Ports 5001, MultiConn: off, ReuseSingleConn: off, Authentication type: guest)
Try changing the authentication type to Null.
ITSM Guy wrote:The OS isn't installed yet
Here is a discussion of authentication types: https://www.virtualbox.org/manual/ch07.html#vbox-auth
The guest authentication method performs authentication with a special component that comes with the Guest Additions. As a result, authentication is not performed on the host, but with the guest user accounts.

This method is currently still in testing and not yet supported.
Guest authentication requires a working guest (VM) OS and Guest Additions installed to have a chance at authenticating using the VM OS's accounts. Without an OS installed yet, the guest authentication won't work.

Null is the easiest (and so least secure). Security can be added after the VM is working. Set to Null and you should get in. Port 5001 is the one to use if the settings are still set as above. This goes into the VM "hardware" not into the OS inside the VM. So:

localhost:5001 or 127.0.0.1:5001 has to be used if you're sitting at the headless server
host.LAN.IP.Address:5001 is used if you're on another computer on the LAN
Port 5001 needs to be open in the host OS firewall.
ITSM Guy wrote:VirtualBox is running on 10.0.0.10 and 10.0.0.11
Does this mean Virtualbox is running on the host, and the host uses 10.0.0.10 and 10.0.0.11?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How do you access headless vm?

Post by fth0 »

scottgus1 wrote:Null is the easiest (and so least secure). Security can be added after the VM is working.
I'd use RDP with Null authentication and tunnel it through SSH right from the beginning, with commands like:

Code: Select all

ssh -L 5002:10.0.0.10:5001 10.0.0.10 -N
rdesktop localhost:5002
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

Code: Select all

ITSM Guy wrote:
VirtualBox is running on 10.0.0.10 and 10.0.0.11

Does this mean Virtualbox is running on the host, and the host uses 10.0.0.10 and 10.0.0.11?
I have 2 hosts running VMs. 10.0.0.10 is the headless server and 10.0.0.11 has the gui. I'm testing on 10.0.0.11 using the 10.0.0.11 just to see it work but I ultimately only want 10.0.0.10 hosting vms.

10.0.0.11:
Right now, I have all my ports open.

Code: Select all

VRDE:                        enabled (Address 10.0.0.5, Ports 5001, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection:           disabled
VRDE property               : TCP/Ports  = "5001"
VRDE property               : TCP/Address = "10.0.0.5"
VRDE property               : VideoChannel/Enabled = <not set>
VRDE property               : VideoChannel/Quality = <not set>
VRDE property               : VideoChannel/DownscaleProtection = <not set>
VRDE property               : Client/DisableDisplay = <not set>
VRDE property               : Client/DisableInput = <not set>
VRDE property               : Client/DisableAudio = <not set>
VRDE property               : Client/DisableUSB = <not set>
VRDE property               : Client/DisableClipboard = <not set>
VRDE property               : Client/DisableUpstreamAudio = <not set>
VRDE property               : Client/DisableRDPDR = <not set>
VRDE property               : H3DRedirect/Enabled = <not set>
VRDE property               : Security/Method = <not set>
VRDE property               : Security/ServerCertificate = <not set>
VRDE property               : Security/ServerPrivateKey = <not set>
VRDE property               : Security/CACertificate = <not set>
VRDE property               : Audio/RateCorrectionMode = <not set>
VRDE property               : Audio/LogPath = <not set>
[username@fedora Downloads]$ rdesktop localhost:5002

Code: Select all

Autoselecting keyboard map 'en-us' from locale
Core(error): tcp_connect(), unable to connect to localhost
[username@fedora Downloads]$ rdesktop localhost:5001

Code: Select all

Autoselecting keyboard map 'en-us' from locale
Core(error): tcp_connect(), unable to connect to localhost
[username@fedora Downloads]$ rdesktop localhost:5000

Code: Select all

Autoselecting keyboard map 'en-us' from locale
Core(error): tcp_connect(), unable to connect to localhost
[username@fedora Downloads]$ rdesktop localhost

Code: Select all

Autoselecting keyboard map 'en-us' from locale
Core(error): tcp_connect(), unable to connect to localhost
[username@fedora Downloads]$ xfreerdp /v:localhost:5001

Code: Select all

[12:42:14:008] [877128:877129] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[12:42:14:008] [877128:877129] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[12:42:14:008] [877128:877129] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[12:42:14:008] [877128:877129] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[12:42:14:009] [877128:877129] [INFO][com.freerdp.client.x11] - No user name set. - Using login name: username
[12:42:14:316] [877128:877129] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[12:42:14:318] [877128:877129] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[12:42:14:318] [877128:877129] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[12:42:14:318] [877128:877129] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:42:14:318] [877128:877129] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:42:14:322] [877128:877129] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[12:42:14:322] [877128:877129] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[12:42:14:322] [877128:877129] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:42:14:322] [877128:877129] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:42:14:322] [877128:877129] [ERROR][com.freerdp.core] - freerdp_post_connect failed
[username@fedora Downloads]$ xfreerdp /v:10.0.0.11:5001

Code: Select all

[12:42:35:562] [877218:877219] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[12:42:35:562] [877218:877219] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[12:42:35:562] [877218:877219] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[12:42:35:562] [877218:877219] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[12:42:35:563] [877218:877219] [INFO][com.freerdp.client.x11] - No user name set. - Using login name: username
[12:42:35:870] [877218:877219] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[12:42:35:872] [877218:877219] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[12:42:35:872] [877218:877219] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[12:42:35:872] [877218:877219] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:42:35:872] [877218:877219] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:42:35:877] [877218:877219] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[12:42:35:877] [877218:877219] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[12:42:35:877] [877218:877219] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:42:35:877] [877218:877219] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:42:35:877] [877218:877219] [ERROR][com.freerdp.core] - freerdp_post_connect failed
Host 10.0.0.10:
I have passwordless ssh set up.
$ ssh -L 5002:10.0.0.10:5001 10.0.0.10 -N

Code: Select all

rdesktop localhost:5002
^C
Nothing happened.

logs from 10.0.0.10

Code: Select all

Oct  6 12:54:58 test-server audit[702994]: CRYPTO_KEY_USER pid=702994 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:03:c8:f9:9b:ab:00:ff:92:5e:18:40:44:87:99 direction=? spid=702994 suid=23  exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: CRYPTO_SESSION pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=start direction=from-server cipher=aes256-gcm@openssh.com ksize=256 mac=<implicit> pfs=curve25519-sha256 spid=702994 suid=74 rport=55144 laddr=10.0.0.10 lport=22  exe="/usr/sbin/sshd" hostname=? addr=10.0.0.11 terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: CRYPTO_SESSION pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=start direction=from-client cipher=aes256-gcm@openssh.com ksize=256 mac=<implicit> pfs=curve25519-sha256 spid=702994 suid=74 rport=55144 laddr=10.0.0.10 lport=22  exe="/usr/sbin/sshd" hostname=? addr=10.0.0.11 terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: USER_AUTH pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=pubkey_auth grantors=auth-key acct="username" exe="/usr/sbin/sshd" hostname=? addr=10.0.0.11 terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: CRYPTO_KEY_USER pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=negotiate kind=auth-key fp=SHA256:a3:26:fd:37:a6:69:78:6d:e8 exe="/usr/sbin/sshd" hostname=? addr=10.0.0.11 terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: USER_ACCT pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="username" exe="/usr/sbin/sshd" hostname=10.0.0.11 addr=10.0.0.11 terminal=ssh res=success'
Oct  6 12:54:58 test-server audit[702993]: CRYPTO_KEY_USER pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=session fp=? direction=both spid=702994 suid=74 rport=55144 laddr=10.0.0.10 lport=22  exe="/usr/sbin/sshd" hostname=? addr=10.0.0.11 terminal=? res=success'
Oct  6 12:54:58 test-server audit[702993]: CRED_ACQ pid=702993 uid=23 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_localuser,pam_unix acct="username" exe="/usr/sbin/sshd" hostname=10.0.0.11 addr=10.0.0.11 terminal=ssh res=success'
Oct  6 12:54:58 test-server audit[702993]: USER_ROLE_CHANGE pid=702993 uid=23 auid=2323 ses=13 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='pam: default-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 selected-context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 exe="/usr/sbin/sshd" hostname=10.0.0.11 addr=10.0.0.11 terminal=ssh res=success'
Oct  6 12:54:58 test-server systemd-logind[2343]: New session 13 of user username.
Oct  6 12:54:58 test-server systemd[1]: Started Session 13 of User username.
Oct  6 12:54:58 test-server audit[702993]: USER_START pid=702993 uid=23 auid=2323 ses=13 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_selinux,pam_loginuid,pam_selinux,pam_namespace,pam_keyinit,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="username" exe="/usr/sbin/sshd" hostname=10.0.0.11 addr=10.0.0.11 terminal=ssh res=success'
Oct  6 12:54:58 test-server audit[702996]: CRYPTO_KEY_USER pid=702996 uid=23 auid=2323 ses=13 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=SHA256:c8:f9:90::ff:4:87:99 direction=? spid=702996 suid=23  exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success'
Oct  6 12:54:58 test-server audit[702996]: CRED_ACQ pid=702996 uid=23 auid=2323 ses=13 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_localuser,pam_unix acct="username" exe="/usr/sbin/sshd" hostname=10.0.0.11 addr=10.0.0.11 terminal=ssh res=success'
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do you access headless vm?

Post by scottgus1 »

ITSM Guy wrote:10.0.0.11 has the gui. I'm testing on 10.0.0.11 using the 10.0.0.11 just to see it work
OK, I get it now.

Please run this command on the 10.0.0.11 GUI host's terminal and post the output:

VBoxManage list extpacks

Also, please right-click the VM in the main Virtualbox window's VM list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Please make sure all file extensions are shown, so you will be able to see the .vbox extension easier.)
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

$ VBoxManage list extpacks

Code: Select all

Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      6.1.26
Revision:     145957
Edition:      
Description:  Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do you access headless vm?

Post by scottgus1 »

Good, you have the official Extension Pack with RDP installed. (I'll assume you're also running Virtualbox 6.1.26. Virtualbox version and EP version have to match.)

While you're hunting up the .vbox file, did you ever try RDPing to 127.0.0.1:5001? Maybe "localhost" is not set up in your host's HOSTS file.
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

6.1.26_RPMFusionr145957
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

Yes. I tried 127.0.0.1, localhost, 10.0.0.10 and 10.0.0.11. I tried from both 10.0.0.10 and 10.0.0.11.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do you access headless vm?

Post by scottgus1 »

OK. Still awaiting the .vbox file.

And a silly question, just to cover all bases, sorry for having to ask :oops: : The VM is running while you're trying to RDP into it?
ITSM Guy
Posts: 13
Joined: 3. Oct 2021, 23:39

Re: How do you access headless vm?

Post by ITSM Guy »

.vbox

Code: Select all

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
  <Machine uuid="{8d9deeac-794c-4cc4-ba5f-2e715259e319}" name="USDC01" OSType="Debian_64" stateFile="Snapshots/2021-10-06T19-06-09-722505000Z.sav" snapshotFolder="Snapshots" lastStateChange="2021-10-06T19:06:14Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{cde3255d-029c-48aa-a58e-284743c728e5}" location="USDC01_new-disk001.vmdk" format="VMDK" type="Normal"/>
      </HardDisks>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="2840,232,800,653"/>
    </ExtraData>
    <Hardware>
      <CPU count="6">
        <PAE enabled="true"/>
        <LongMode enabled="true"/>
        <X2APIC enabled="true"/>
        <HardwareVirtExLargePages enabled="false"/>
      </CPU>
      <Memory RAMSize="6144"/>
      <Boot>
        <Order position="1" device="DVD"/>
        <Order position="2" device="HardDisk"/>
        <Order position="3" device="None"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display controller="VMSVGA" VRAMSize="128" monitorCount="2" accelerate3D="true"/>
      <VideoCapture screens="3" file="." fps="25"/>
      <RemoteDisplay enabled="true">
        <VRDEProperties>
          <Property name="TCP/Address" value="10.0.0.5"/>
          <Property name="TCP/Ports" value="5001"/>
        </VRDEProperties>
      </RemoteDisplay>
      <BIOS>
        <IOAPIC enabled="true"/>
        <SmbiosUuidLittleEndian enabled="true"/>
      </BIOS>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027AC46E5" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="enp5s0"/>
        </Adapter>
      </Network>
      <AudioAdapter driver="Pulse" enabled="true" enabledIn="false" enabledOut="false"/>
      <Clipboard mode="Bidirectional"/>
      <DragAndDrop mode="Bidirectional"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1633537555304022000" flags="RDONLYGUEST"/>
        <GuestProperty name="/VirtualBox/HostInfo/VBoxRev" value="145957" timestamp="1633544655816889002" flags="TRANSIENT, RDONLYGUEST"/>
        <GuestProperty name="/VirtualBox/HostInfo/VBoxVer" value="6.1.26" timestamp="1633544655816889000" flags="TRANSIENT, RDONLYGUEST"/>
        <GuestProperty name="/VirtualBox/HostInfo/VBoxVerExt" value="6.1.26" timestamp="1633544655816889001" flags="TRANSIENT, RDONLYGUEST"/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="SATA Controller" type="AHCI" PortCount="30" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
          <Image uuid="{cde3255d-029c-48aa-a58e-284743c728e5}"/>
        </AttachedDevice>
      </StorageController>
      <StorageController name="IDE Controller" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>
The vm is running.
Post Reply