1
00:00:03,310 --> 00:00:09,190
I want to go over some common issues that might arise when working with vagrant and virtual box.

2
00:00:09,190 --> 00:00:12,790
The first issue I want to talk about is anti-virus software.

3
00:00:12,910 --> 00:00:18,640
Some windows anti-virus software such as Vira EVGA and others have been known to interfere with the

4
00:00:18,640 --> 00:00:20,420
operation of virtual box.

5
00:00:20,610 --> 00:00:25,250
I have listed some errors on your screen here that can be associated with this type of issue.

6
00:00:25,450 --> 00:00:31,000
If you get such an error when starting a virtual machine try disabling your anti-virus software and

7
00:00:31,000 --> 00:00:32,420
rebooting your system.

8
00:00:32,770 --> 00:00:35,360
Here's a screenshot of one such error.

9
00:00:35,470 --> 00:00:40,480
Even if you're using vagrant to control your virtual machines it can be helpful to start the virtual

10
00:00:40,480 --> 00:00:46,090
box application to get a better idea of what is happening with your virtual machines.

11
00:00:46,090 --> 00:00:52,510
Again the workaround for this is to simply disable the anti-virus software or switch to another anti-virus

12
00:00:52,510 --> 00:00:55,780
software that doesn't interfere with virtual box.

13
00:00:55,960 --> 00:01:01,030
If you happen to have a Mac you could use it for your coursework as most of the issues we'll be talking

14
00:01:01,030 --> 00:01:08,840
about here are Windows related in some way another issue you might encounter is that your virtual machines

15
00:01:08,840 --> 00:01:12,680
virtual network cable may be disconnected on boot.

16
00:01:12,830 --> 00:01:16,170
You'll see the message on your screen after you run vagrant up.

17
00:01:16,190 --> 00:01:22,070
If that's the case if you were to open up the virtual box application you would find that the virtual

18
00:01:22,070 --> 00:01:23,290
machine is running.

19
00:01:23,300 --> 00:01:28,820
Also if you were to go to the settings of that virtual machine and click on network and finally click

20
00:01:28,850 --> 00:01:35,480
on advanced you would see that the check box next to cable connected is unchecked.

21
00:01:35,480 --> 00:01:39,980
We want to make sure that this box is checked and we can tell vagrant to do that for us.

22
00:01:39,980 --> 00:01:46,450
Here's how you add an additional stanza to your vagrant file which is highlighted on your screen.

23
00:01:46,610 --> 00:01:50,160
This tells vagrant to make sure that the virtual cable is connected.

24
00:01:50,210 --> 00:01:55,700
For that virtual machine when it is started once you've added this additional configuration you can

25
00:01:55,700 --> 00:02:01,910
run vagrant to reload which will restart the virtual machine this time with a network interface enabled

26
00:02:02,930 --> 00:02:08,400
this brings me to another issue I've seen before and that's not editing the correct vagrant file.

27
00:02:08,540 --> 00:02:13,370
Sometimes we're working with multiple virtual machines and we think we're editing one file when we're

28
00:02:13,370 --> 00:02:15,430
actually editing another one.

29
00:02:15,530 --> 00:02:19,900
I suggest starting your editor from the command line in the directory that you're running your vigorish

30
00:02:19,910 --> 00:02:25,130
commands in one editor that I like and recommend is called Adam.

31
00:02:25,190 --> 00:02:29,800
It has syntax highlighting so it makes spotting some typing mistakes easier.

32
00:02:29,810 --> 00:02:36,500
Also it works on Windows Mac and Linux to edit the vagrant file in your current directory simply execute

33
00:02:36,580 --> 00:02:40,340
atom space vagrant file with a capital V.

34
00:02:40,340 --> 00:02:44,120
Another reason you might see the previous error message about the config.

35
00:02:44,150 --> 00:02:50,300
VM that boot underscore timeout setting is because the virtualization settings for your processor haven't

36
00:02:50,300 --> 00:02:52,340
been enabled in your BIOS.

37
00:02:52,460 --> 00:02:56,550
You can confirm this by looking at the Virtual Box window for your virtual machine.

38
00:02:56,570 --> 00:02:59,510
Also known as the Gooley or graphical user interface.

39
00:02:59,600 --> 00:03:05,840
The easiest way to do that is to add the configuration on your screen to the vagrant file and then run

40
00:03:05,840 --> 00:03:07,250
vagrant to reload.

41
00:03:07,610 --> 00:03:12,920
If you see an error in your virtual machine window that says something along the lines of this kernel

42
00:03:12,920 --> 00:03:17,180
requires an X 86 64 CPQ but only detected it.

43
00:03:17,200 --> 00:03:18,880
I 686 EPU.

44
00:03:19,040 --> 00:03:23,060
Then you need to enable the virtualization options in your BIOS.

45
00:03:23,060 --> 00:03:31,510
This means making sure that you have VTX for Intel processors and am divi for A&amp;E processors enabled.

46
00:03:31,670 --> 00:03:37,280
This varies from manufacturer to manufacturer so you might have to look up the documentation for your

47
00:03:37,280 --> 00:03:39,190
specific computer.

48
00:03:39,280 --> 00:03:44,650
Really one of the most common issues I see when working with configuration files including the vagrant

49
00:03:44,650 --> 00:03:47,320
file are simple typing mistakes.

50
00:03:47,320 --> 00:03:51,040
A very common one that I see a lot that is specific to vagrant files.

51
00:03:51,040 --> 00:03:55,850
Is using an equal sign in the config that VM dot network line.

52
00:03:55,900 --> 00:03:57,790
It looks correct but it isn't.

53
00:03:57,820 --> 00:04:04,300
You see config that VM dot box followed by an equal sign you also see configure VM hostname followed

54
00:04:04,300 --> 00:04:10,570
by an equal sign and if you continue with that pattern you'll actually use config that the M.Com network

55
00:04:10,570 --> 00:04:12,210
followed by an equal sign.

56
00:04:12,310 --> 00:04:16,000
But that is not the syntax that vagrant is expecting.

57
00:04:16,060 --> 00:04:21,320
The proper syntax is config dot VM dot network followed by a space.

58
00:04:21,340 --> 00:04:24,500
There is no equal sign on that line.

59
00:04:24,610 --> 00:04:29,880
If you are to run vagrant up with this configuration you'll get an error like the one on your screen.

60
00:04:29,890 --> 00:04:35,230
The good news is that the error message tells you what line the problem is on although it doesn't necessarily

61
00:04:35,230 --> 00:04:37,350
point to the proper place in the line.

62
00:04:37,420 --> 00:04:41,840
Again just remove the equal sign and when you run vagrant up you'll be all set.

63
00:04:41,860 --> 00:04:46,680
This simple mistake just goes to show you how important it is to pay attention to details.

64
00:04:46,870 --> 00:04:53,110
Every little character counts punctuation and capitalization included during this course you will be

65
00:04:53,110 --> 00:04:55,070
installing web applications.

66
00:04:55,090 --> 00:05:00,820
If you can pin your virtual machine but you can't get to it from your web browser it could be a couple

67
00:05:00,820 --> 00:05:02,350
of different things.

68
00:05:02,350 --> 00:05:08,020
First off if you're using Microsoft edge browser it has some additional security features that prevent

69
00:05:08,020 --> 00:05:11,930
you from connecting to a local IP address on your system.

70
00:05:12,160 --> 00:05:15,130
So the first thing to do is try a different web browser.

71
00:05:15,130 --> 00:05:20,980
I'm a big fan of Google's Chrome browser but there are other good choices as well such as Firefox.

72
00:05:20,980 --> 00:05:25,450
If you've tried another web browser and still can't connect to the web application then make sure the

73
00:05:25,450 --> 00:05:27,340
web server is running.

74
00:05:27,340 --> 00:05:35,340
Look at its status with System CDL is Dasch active h TPD or system CDL status.

75
00:05:35,350 --> 00:05:36,890
H t TPD.

76
00:05:36,970 --> 00:05:43,040
If it's stopped then started with Sardou system sitio start HTP D.

77
00:05:43,120 --> 00:05:50,470
Also make sure to enable it with sudo system CDL enable H.T. TPD if we forgot this step and rebooted

78
00:05:50,470 --> 00:05:51,730
our virtual machine.

79
00:05:51,760 --> 00:05:55,030
The web server will not start automatically on boot.

80
00:05:55,030 --> 00:05:58,300
This is a common reason why the web server isn't running.

81
00:05:58,540 --> 00:06:03,880
If the web server is running but you still can't access your application via a web browser the next

82
00:06:03,880 --> 00:06:08,890
thing to check is the Arab League do that by running SU to cat.

83
00:06:08,980 --> 00:06:16,650
Slash var Ford slash law Ford slash HDDVD forward slash error underscore log.

84
00:06:16,870 --> 00:06:22,720
There is another issue with the web server you'll almost always be able to determine what it is by looking

85
00:06:22,720 --> 00:06:24,990
at the error log file.

86
00:06:25,060 --> 00:06:29,740
By the way if you're ever prompted by windows with a question like do you want to allow this app to

87
00:06:29,740 --> 00:06:31,300
make changes to your computer.

88
00:06:31,300 --> 00:06:36,960
Answer Yes it's either a vagrant or a virtual box trying to configure your system for you.

89
00:06:37,150 --> 00:06:42,520
You might see a message about Hashi Corp which is associated with vagrant or Oracle which is associated

90
00:06:42,520 --> 00:06:43,760
with Virtual Box.

91
00:06:44,020 --> 00:06:48,630
It's perfectly fine to give those applications the ability to make changes on your system.

92
00:06:48,760 --> 00:06:51,060
Are known good applications.

93
00:06:51,130 --> 00:06:56,110
They aren't going to infect your system with a virus for example there's a chance you'll see something

94
00:06:56,110 --> 00:07:02,530
like this the first time you try to configure an IP address on one of your virtual machines for example.

95
00:07:02,530 --> 00:07:07,720
If you don't allow vagrant and virtual box to modify settings on your Windows system then they aren't

96
00:07:07,720 --> 00:07:13,220
going to function properly if you've tried several troubleshooting steps and nothing seems to work.

97
00:07:13,240 --> 00:07:19,360
I would suggest first taking a break and then starting all over start over with a fresh directory then

98
00:07:19,360 --> 00:07:25,780
run vagrant init in that new directory and try again all the way from the beginning of that project.

99
00:07:25,780 --> 00:07:31,000
Sometimes when we try a little bit of this and a little bit of that we can create new issues so it can

100
00:07:31,000 --> 00:07:34,150
be best just to start over again with a clean slate.

101
00:07:34,150 --> 00:07:39,010
Finally I want to leave you with one last troubleshooting step which is to simply reboot your physical

102
00:07:39,010 --> 00:07:40,920
computer and try again.

103
00:07:40,960 --> 00:07:46,260
There is a chance that something is not functioning properly that isn't immediately obvious to us.

104
00:07:46,330 --> 00:07:51,580
There could be a process or procedure that is hanging or a duplicate network configuration in use because

105
00:07:51,580 --> 00:07:53,790
of all of our troubleshooting steps.

106
00:07:53,950 --> 00:07:58,630
When it comes to troubleshooting our local systems this is a relatively quick and harmless thing to

107
00:07:58,630 --> 00:07:58,990
try.
