config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "1024"
end
[root@localhost ~]# vagrant reload
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: <provider config: libvirt>
Line number: 60
Message: NameError: undefined local variable or method `v' for main:Object
[root@localhost ~]# vi Vagrantfile
[root@localhost ~]# ssh 192.168.45.136
Last login: Wed Sep 4 09:25:51 2019 from 192.168.45.156
[root@localhost ~]# vi Vagrantfile
[root@localhost ~]# vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'generic/centos7' version '1.9.24' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.32 running --- OK.
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
[root@localhost ~]# vagrant ssh
Last login: Wed Sep 4 05:32:55 2019 from 10.0.2.2
[vagrant@centos7 ~]$ free
total used free shared buff/cache available
Mem: 1014804 109276 720664 6828 184864 736484
Swap: 2097148 0 2097148
[vagrant@centos7 ~]$ exit
config.vm.provider "libvirt" do |vb|
# # Display the VirtualBox GUI when booting the machine
#
# # Customize the amount of memory on the VM:
vb.memory = "512"
[root@localhost ~]# vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Halting domain...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
==> default: Creating shared folders metadata...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
[root@localhost ~]# vagrant ssh
Last login: Wed Sep 4 05:20:04 2019 from 192.168.121.1
[vagrant@centos7 ~]$ free
total used free shared buff/cache available
Mem: 498764 167364 171552 8612 159848 285936
Swap: 2097148 0 2097148
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "1024"
end
[root@localhost ~]# vagrant reload
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: <provider config: libvirt>
Line number: 60
Message: NameError: undefined local variable or method `v' for main:Object
[root@localhost ~]# vi Vagrantfile
[root@localhost ~]# ssh 192.168.45.136
Last login: Wed Sep 4 09:25:51 2019 from 192.168.45.156
[root@localhost ~]# vi Vagrantfile
[root@localhost ~]# vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'generic/centos7' version '1.9.24' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 5.2.32 running --- OK.
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
[root@localhost ~]# vagrant ssh
Last login: Wed Sep 4 05:32:55 2019 from 10.0.2.2
[vagrant@centos7 ~]$ free
total used free shared buff/cache available
Mem: 1014804 109276 720664 6828 184864 736484
Swap: 2097148 0 2097148
[vagrant@centos7 ~]$ exit
config.vm.provider "libvirt" do |vb|
# # Display the VirtualBox GUI when booting the machine
#
# # Customize the amount of memory on the VM:
vb.memory = "512"
[root@localhost ~]# vagrant reload
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Halting domain...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
==> default: Creating shared folders metadata...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
[root@localhost ~]# vagrant ssh
Last login: Wed Sep 4 05:20:04 2019 from 192.168.121.1
[vagrant@centos7 ~]$ free
total used free shared buff/cache available
Mem: 498764 167364 171552 8612 159848 285936
Swap: 2097148 0 2097148
Comments
Post a Comment