You are not logged in.

#1 2015-08-10 13:41:08

gry0
Member
Registered: 2015-08-10
Posts: 8

[SOLVED]Arch on guest Virtualbox and no internet connection

I was able to get Arch to boot up on my Macbook as a guest in Virtualbox (64-bit, MBR/GRUB/BIOS setup w/ 4 partitions: /, /boot, /home, and a swap). I thought the install went really smoothly, but I did kind of breeze by the "Configure the Network" section of the Beginners Guide (the 2nd one right before reboot). This is my first successful bootable install, and I had a wireless internet connection on my host throughout the entire install (wifi only, did not connect with an ethernet cord). I may have received some sort of error or failure message during part of the network configuration portion, but stupidly didn't note it and can't remember now. I did follow both the Wired and Wireless steps before understanding that Virtualbox virtualized a wired Ethernet connection.

Now that I'm in my system I can't ping anything - I just get a ping: unknown host www.google.com or 8.8.8.8. I've Googled for hours, and I've tried suggestions from every post that I could find about the topic, including:

gry0 wrote:

systemctl enable dhcpcd

systemctl enable dhcpcd@enp0s3.service

dhcpcd

ip link set enp0s3 up

I also tried looking for files to edit in /etc to no avail - I'm not really sure what to look for, to be honest.

My ethernet controller is type e1000. greping this gives me a good message (I can type it out if needed). ip link on the other hand gives me:

gry0 wrote:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc no queue state UNKNOWN mode DEFAULT group default link/loopbak 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <NO-CARRIER,BROADCAST,MULTICAST,UP ,LOWER_UP> mtu 1500 qdisc fq_code state DORMANT mode DORMANT group default glen 1000 link/ether 08:00:27:88:02:98 brd ff:ff:ff:ff:ff:ff

In Virtualbox network settings NAT was left as the default option and the enable connection box is checked.

Is it possible to screw up the network config from the install on a VM? Would I need to boot up from the .iso again and configure something?

Last edited by gry0 (2015-08-11 13:17:51)

Offline

#2 2015-08-10 14:26:49

Rethil
Member
Registered: 2014-08-21
Posts: 83

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

Change NAT to Bridged networking.

Offline

#3 2015-08-10 14:46:22

ayekat
Member
Registered: 2011-01-17
Posts: 1,592

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

Welcome to the Arch Linux forum!

Your network interface seems to be up.
What is the output of

journalctl -rbu dhcpcd

and

journalctl -rbu dhcpcd@enp0s3

Also what is the output of this?

dhcpcd enp0s3

@Rethil: I'm not sure switching to bridged networking will really simplify solving the problem in this case. NAT is a perfectly fine default, and unless there are specific demand it should work fine.

Last edited by ayekat (2015-08-10 14:50:02)


pkgshackscfgblag

Offline

#4 2015-08-10 14:48:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

What are you using to control the ethernet link?  I find that in VirtualBox, all I need is dhcpcd service.  And I almost always use NAT.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2015-08-10 15:06:28

gry0
Member
Registered: 2015-08-10
Posts: 8

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

@ayecat Thanks!  Happy to be here.  At work right now without access to my laptop, but I'll post the output of the commands you listed tonight when I get home. 

@ewaller Not 100% sure what you are asking (hence the noob forum).  When following the Beginners' Guide (network config section) I pretty much just went with the commands that it recommended - so I used dhcpcd

systemctl enable dhcpcd@enp0s3.service

...and also installed the wireless packages (iw, wpa_supplicant, dialog, wpa_actiond). 

Now that I'm going through my install again in my head, I may have tried to install netctl as well.  Could this be interfering with dhcpcd?

Offline

#6 2015-08-10 15:12:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

gry0 wrote:

...and also installed the wireless packages (iw, wpa_supplicant, dialog, wpa_actiond).

As you realized, none of that needs to be installed in the virtual machine.  (except, perhaps, dialog)

Now that I'm going through my install again in my head, I may have tried to install netctl as well.  Could this be interfering with dhcpcd?

Yes.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2015-08-10 15:36:35

gry0
Member
Registered: 2015-08-10
Posts: 8

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

ewaller wrote:

Now that I'm going through my install again in my head, I may have tried to install netctl as well.  Could this be interfering with dhcpcd?

Yes.

Would it be possible to just disable netctl using:

systemctl disable netctl-auto@enp0s3.service

I can try it when I get home, but just wondering if that is a valid command that could clear things up potentially while I sit here at work thinking about it...

Offline

#8 2015-08-10 15:52:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

gry0 wrote:

Would it be possible to just disable netctl using:

systemctl disable netctl-auto@enp0s3.service

Yes.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2015-08-11 01:07:59

gry0
Member
Registered: 2015-08-10
Posts: 8

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

OK, so I ran

journalctl -rb dhcpcd and journalctl -rb dhcpcd@enp0s3

and I got an error message: "Failed to add match 'dhcpcd': Invalid argument" and "Failed to add match 'dhcpcd@enp0s3': Invalid argument"

journalctl -rb (wouldn't let me add u as an argument - Failed to parse boot descriptor 'u') gave me over 1,000 lines of messages.  Some of them were highlighted in white or red and did refer to enp0s3, dhcpcd, and netctl.  I don't have any way to copy and paste all these lines though.  If there is a way to copy and paste this from a virtual machine without internet access please let me know and I'll paste here.  Some of the entries were "systemd[1]: dhcpcd@enp-s3.service: Failed with result 'resources'.", "systemd[1]: dhcpcd@enp-s3.service: Unit entered failed state.", and "system[1]: Failed to start dhcpcd on en0s3."  I get similar messages when I run

systemctl status dhcpcd@enp0s3.service

When I run

systemctl start dhcpcd@enp0s3.service

I get an error message saying "Job for dhcpcd@enp0s3.service failed because a configured resource limit was exceeded.  See "systemctl status dhcpcd@enp0s3.service" and "journalctl -xe" for details

Any ideas on what I can do or what's going on?

Offline

#10 2015-08-11 01:26:46

gry0
Member
Registered: 2015-08-10
Posts: 8

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

I'm connected!  I ran:

systemctl --type=status

and saw that netctl-auto@enp0s3.service was enabled.  To stop it I used:

systemctl stop netctl-auto@enp0s3.service

and that did it.  I'm getting pings.

Going to try to download some packages, but think I can mark this solved.

Offline

#11 2015-08-11 10:17:07

ayekat
Member
Registered: 2011-01-17
Posts: 1,592

Re: [SOLVED]Arch on guest Virtualbox and no internet connection

I'm sorry, it should have been

journalctl -rb -u ...

I had it like this and forgot that -b takes an optional argument (this pretty unintuitive, though...)


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB