¡¼«Æ°¤Ç¡¢Linux ¥Þ¥·¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë ¢¥¤¥ó¥¹¥È¡¼¥ë¸å¡¢¼«Æ°¤Ç¡¢¤½¤Î Linux ¥Þ¥·¥ó¤Ë SSH ¥í¥°¥¤¥ó¤·¤Æ¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¤¥ó¥¹¥È¡¼¥ë¤äÀßÄê¤ò¹Ô¤¤¤¿¤¤
[/Library/Preferences/VMware Fusion/vmnet8]$ cat dhcpd.conf ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" ##### (ÃæÎ¬) allow unknown-clients; default-lease-time 1800; # default is 30 minutes max-lease-time 7200; # default is 2 hours subnet 192.168.38.0 netmask 255.255.255.0 { range 192.168.38.128 192.168.38.254; option broadcast-address 192.168.38.255; option domain-name-servers 192.168.38.2; option domain-name localdomain; default-lease-time 1800; # default is 30 minutes max-lease-time 7200; # default is 2 hours option netbios-name-servers 192.168.38.2; option routers 192.168.38.2; } host vmnet8 { hardware ethernet 00:50:56:C0:00:08; fixed-address 192.168.38.1; option domain-name-servers 0.0.0.0; option domain-name ""; option routers 0.0.0.0; } ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### host melody { hardware ethernet F0:FA:25:00:00:00; fixed-address 192.168.38.100; }
[~/Documents/Virtual Machines.localized/Scientific Linux 6.4.vmwarevm]$ cat Scientific\ Linux\ 6.4.vmx | grep ethernet0 ethernet0.present = "TRUE" ethernet0.connectionType = "nat" ethernet0.virtualDev = "e1000" ethernet0.wakeOnPcktRcv = "FALSE" ethernet0.addressType = "generated" ethernet0.linkStatePropagation.enable = "TRUE" ethernet0.pciSlotNumber = "33" ethernet0.generatedAddress = "00:0c:29:1d:da:3f" ethernet0.generatedAddressOffset = "0"
config.vm.provider :vmware_fusion do |vm| # vm.gui=true config.vm.network :public_network # Bridged network, default is the host-only network. vm.vmx["ethernet1.present"] = "TRUE" vm.vmx["ethernet1.connectionType"] = "nat" vm.vmx["ethernet1.addressType"] = "static" vm.vmx["ethernet1.address"] = "F0:FA:25:00:00:00" vm.vmx["ethernet1.generatedAddress"] = nil # Clear MAC Address, if generated end
[~/chef-test]$ vagrant up --provider=vmware_fusion Bringing machine 'default' up with 'vmware_fusion' provider... [default] Verifying vmnet devices are healthy... [default] Preparing network adapters... [default] Starting the VMware VM... [default] Waiting for the VM to finish booting... [default] The machine is booted and ready! [default] Forwarding ports... [default] -- 22 => 2222 [default] Configuring network adapters within the VM... [default] Waiting for HGFS kernel module to load... [default] Enabling and configuring shared folders... [default] -- /Users/atsushi/chef-test: /vagrant [~/chef-test]$ vagrant ssh Last login: Sun Feb 2 13:25:20 2014 from 192.168.38.1 [vagrant@vagrant-centos-6 ~]$ ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:1F:64:D6 inet addr:192.168.38.129 Bcast:192.168.38.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe1f:64d6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:436 errors:0 dropped:0 overruns:0 frame:0 TX packets:273 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:51518 (50.3 KiB) TX bytes:41340 (40.3 KiB) eth1 Link encap:Ethernet HWaddr F0:FA:25:00:00:00 inet addr:192.168.38.100 Bcast:192.168.38.255 Mask:255.255.255.0 inet6 addr: fe80::f2fa:25ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:20 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1668 (1.6 KiB) TX bytes:2472 (2.4 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) [vagrant@vagrant-centos-6 ~]$ exit logout Connection to 192.168.38.129 closed. [~/chef-test]$ ssh vagrant@192.168.38.100 vagrant@192.168.38.100's password: Last login: Sun Feb 2 14:37:19 2014 from 192.168.38.1 [vagrant@vagrant-centos-6 ~]$ uname -a Linux vagrant-centos-6 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [vagrant@vagrant-centos-6 ~]$ exit logout Connection to 192.168.38.100 closed. [~/chef-test]$ vagrant halt [default] Attempting graceful shutdown of VM... [~/chef-test]$
I got it.