Sziasztok,
Abszolut kezdo vagyok ebben a temaban, ugyhogy csak ismerkedek a rendszerrel.
Vmware alatt letrehoztam egy VM-et cegileg atalakitott ubuntu trusty -bol:
OS : Ubuntu 14.04.4 LTS
Architecture : x86_64
mint root:
feltettem ra a vagrant es virtualbox csomagokat:
#dpkg -l|grep vagrant
ii vagrant 1.4.3-1 all Tool for building and distributing virtualized development environments
#dpkg -l|grep virtualbox
ii virtualbox 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1 amd64 x86 virtualization solution - base binaries
ii virtualbox-dkms 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1 all x86 virtualization solution - kernel module sources for dkms
ii virtualbox-qt 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1 amd64 x86 virtualization solution - Qt based user interface
Mivel nem tudtam paranccsal webrol installalni a virtualbox-os csomagot, lehuztam a
CentOS-6.5-x86_64-v20140504.box fajlt es a kovetkezo parancsokkal felinstallaltam:
$mkdir -p /data/hands-on-ansible
$cd /data/hands-on-ansible
letrehoztam a kovetkezo Vagrantfile-t:
$vi Vagrantfile
$cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "acs1"
config.vm.define "acs1" do |acs1|
acs.vm.hostname = "acs1"
acs.vm.network "private_network", ip: "192.168.33.10"
end
end
$vagrant box add acs1 /data/CentOS-6.5-x86_64-v20140504.box
Downloading box from URL: file:/data/CentOS-6.5-x86_64-v20140504.box
Extracting box...te: 44.9M/s, Estimated time remaining: --:--:--)
Successfully added box 'acs1' with provider 'virtualbox'!
$vagrant up
Bringing machine 'acs1' up with 'virtualbox' provider...
[acs1] Importing base box 'acs1'...
[acs1] Matching MAC address for NAT networking...
[acs1] Setting the name of the VM...
[acs1] Clearing any previously set forwarded ports...
[acs1] Clearing any previously set network interfaces...
[acs1] Preparing network interfaces based on configuration...
[acs1] Forwarding ports...
[acs1] -- 22 => 2222 (adapter 1)
[acs1] Booting VM...
[acs1] Waiting for machine to boot. This may take a few minutes...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period. This can
mean a number of things.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
$vboxmanage list runningvms
vboxmanage list runningvms
"hands-on-ansible_acs1_1464334157765_29527" {368ddc0f-31ae-4ab5-bfc5-787c9bcc02c8}
$vagrant status
Current machine states:
acs1 running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
Nem tudok azonban bejelentkezni a boxra.
$ssh -p2222 vagrant@127.0.0.1 -vvv
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
ssh_exchange_identification: read: Connection reset by peer
Tudna valaki segiteni?
Koszonom a tippeket.
Ardi
- 3308 megtekintés
Hozzászólások
vagrant ssh acs1
lesz a barátod.
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
sajna, ugyanaz a helyzet:
$vagrant ssh acs1
ssh_exchange_identification: read: Connection reset by peer
Ardi
- A hozzászóláshoz be kell jelentkezni
ja várj, azt mondod, hogy a host OS (a cégileg custom Ubuntu) egy VMWare VM. Ebbe telepítettél VBox-ot és Vagrant-ot?
Ez így nem teljesen fain, mivel a Vagrant is virtualizál, így VM-a-VM-ben meg szerintem nem túl életképes szcenárió ez.
Hint: https://teamtreehouse.com/community/vagrant-ssh-sshexchangeidentificati…
itt a 4. válasz ütött szöget a fejembe.
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
Igen - a host egy VM Vmware alatt. Erre tettem fel a vagrant+virtualbox csomagokat.
Konkretan melyik valaszra gondoltal az altalad emlitett linkben?
UJ:
mellesleg ez van a .../Logs/VBox.log vegen:
00:00:00.230753 ******************** End of CPUID dump **********************
00:00:00.250485 VM: Halt method global1 (5)
00:00:00.250519 HaltedGlobal1 config: cNsSpinBlockThresholdCfg=2000
00:00:00.250528 Changing the VM state from 'CREATING' to 'CREATED'.
00:00:00.250961 SharedFolders host service: adding host mapping
00:00:00.250974 Host path '/data/hands-on-ansible', map name '/vagrant', writable, automount=false, create_symlinks=true, missing=false
00:00:00.251071 Changing the VM state from 'CREATED' to 'POWERING_ON'.
00:00:00.252693 NAT: set redirect TCP host 127.0.0.1:2222 => guest 10.0.2.15:22
00:00:00.253186 Changing the VM state from 'POWERING_ON' to 'RUNNING'.
00:00:00.260406 Guest Log: BIOS: VirtualBox 4.3.36
00:00:00.260843 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:00.281571 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1
00:00:00.373998 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:00.379578 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:00.380892 Guest Log: BIOS: ata0-0: PCHS=16383/16/63 LCHS=1024/255/63
00:00:00.382085 PIIX3 ATA: Ctl#0: RESET, DevSel=1 AIOIf=0 CmdIf0=0xec (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:00.382181 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:00.386087 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:00.391726 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=00007fa41c154000 w=640 h=480 bpp=32 cbLine=0xA00, flags=0x1
00:00:00.714967 NAT: old socket rcv size: 128KB
00:00:00.714999 NAT: old socket snd size: 128KB
00:00:02.860676 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.861232 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0032
00:00:02.862576 Guest Log: BIOS: Booting from Hard Disk...
00:00:02.871571 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1
00:00:02.873486 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0xc4 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:02.873528 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:02.879102 Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=81
00:00:02.879263 Guest Log: int13_harddisk: function 08, unmapped device for ELDL=81
00:00:02.921546 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=00007fa41c154000 w=640 h=480 bpp=0 cbLine=0x140, flags=0x1
00:00:07.261615 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1
Ardi
- A hozzászóláshoz be kell jelentkezni
Ahol 6 pontban felsorolja, hogyan kell bekapcsolni a BIOS-ban a virtualizáció támogatását. Most ilyen vak vezet világtalant szituációt érzek, de a "nested virtualization", amit keresel. Olvass utána. Elvileg működik, de a VBox nem támogatja a 3. szinten lévő hw-es virtualizációt.
https://www.virtualbox.org/ticket/4032
http://stackoverflow.com/questions/24620599/error-vt-x-not-available-fo…
http://events.linuxfoundation.org/sites/events/files/cojp13_nakajima.pdf
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
Ok - koszi a valaszt.
Utananezek, bar szerintem atterek klasszikus szerverre es ott probalolkozom.
Ardi
- A hozzászóláshoz be kell jelentkezni
Ennek a kimenete mit mutat?
# vagrant ssh-config acs1
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
# vagrant ssh-config acs1
Host acs1
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /root/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
- A hozzászóláshoz be kell jelentkezni
Akkor még nézd meg, hogy létezik-e a kulcsfájl a megadott helyen: /root/.vagrant.d/insecure_private_key
Mások már írtak lentebb, hogy ez jó ha van, a vagrant ssh ezzel a kulccsal lép be a VM-re "vagrant" user-ként. A box is Vagrant féle ugye?
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
Szepen konnectal ez csak a key exchange-nel leall az egesz. Ennek meg jo sok oka lehet, kezdve attol, hogy nem jok a jogosultsagok addig, hogy a chiper-ek nem stimmelnek.
- A hozzászóláshoz be kell jelentkezni
ez volt a baj: $vi Vagrantfile
ezzel tudod javítani:
- vagrant destroy
- vagrant init
- vagrant up
- vagrant ssh
ill a sajat boxodban gondolom van vagrant user a default insecure key-el:
https://github.com/mitchellh/vagrant/tree/master/keys
- A hozzászóláshoz be kell jelentkezni
Nos az az erdekes, hogy 32 bites boxokkal nincs eddig baj.
Siman letrehozom oket es az ssh is megy.
Csupan 64-bites gepek okoznak problemat.
1.pelda: 32bit -> OK
# VAGRANT_VAGRANTFILE=Vagrantfile.box5 vagrant up
Bringing machine 'box5-trusty32' up with 'virtualbox' provider...
[box5-trusty32] Importing base box 'box5-trusty32'...
[box5-trusty32] Matching MAC address for NAT networking...
[box5-trusty32] Setting the name of the VM...
[box5-trusty32] Clearing any previously set forwarded ports...
[box5-trusty32] Clearing any previously set network interfaces...
[box5-trusty32] Preparing network interfaces based on configuration...
[box5-trusty32] Forwarding ports...
[box5-trusty32] -- 22 => 2222 (adapter 1)
[box5-trusty32] Booting VM...
[box5-trusty32] Waiting for machine to boot. This may take a few minutes...
[box5-trusty32] Machine booted and ready!
[box5-trusty32] Setting hostname...
[box5-trusty32] Configuring and enabling network interfaces...
[box5-trusty32] Mounting shared folders...
[box5-trusty32] -- /vagrant
VAGRANT_VAGRANTFILE=Vagrantfile.box5 vagrant ssh box5-trusty32
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-86-generic i686)
* Documentation: https://help.ubuntu.com/
System information as of Mon May 30 07:13:29 UTC 2016
System load: 0.6 Memory usage: 5% Processes: 47
Usage of /: 33.4% of 3.90GB Swap usage: 0% Users logged in: 0
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
vagrant@vagrant-ubuntu-trusty-32:~$
2.pelda 64-bit -> NOK
VAGRANT_VAGRANTFILE=Vagrantfile.box6 vagrant up
Bringing machine 'box6-centos65-64bit' up with 'virtualbox' provider...
[box6-centos65-64bit] Importing base box 'box6-centos65-64bit'...
[box6-centos65-64bit] Matching MAC address for NAT networking...
[box6-centos65-64bit] Setting the name of the VM...
[box6-centos65-64bit] Clearing any previously set forwarded ports...
[box6-centos65-64bit] Clearing any previously set network interfaces...
[box6-centos65-64bit] Preparing network interfaces based on configuration...
[box6-centos65-64bit] Forwarding ports...
[box6-centos65-64bit] -- 22 => 2222 (adapter 1)
[box6-centos65-64bit] Booting VM...
[box6-centos65-64bit] Waiting for machine to boot. This may take a few minutes...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period. This can
mean a number of things.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
$ vboxmanage list runningvms
"hands-on-ansible_box6-centos65-64bit_1464594511232_95759" {f0724c68-875d-4404-b73f-8f9bb6ecabb1}
$ VAGRANT_VAGRANTFILE=Vagrantfile.box6 vagrant ssh box6-centos65-64bit
ssh_exchange_identification: read: Connection reset by peer
$
Megjegyzes: Amikor az otthoni gepemen 64bites box-ot installtam es vagran up-pal felhoztam ubuntu 12.04 LTS alatt, gui-ban inditottam es a kovetkezo
hibat kaptam:
VT-x/AMD-V hardware acceleration is not available on your system.
Your 64bit guest will fail to detect 64-bit CPU and will not be able to boot.
Megjegyzes2: persze - az otthoni gep egy oreg gep,Acer 5220, Intel Celeronnal es ezen mas vagrant es virtualbox verziok futnak.
Ardi
- A hozzászóláshoz be kell jelentkezni
Akkor esélyes, hogy a nested virt.-be szaladtál bele.
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
Tippre a nested virtualizacio / regi gep problema ugyanabbol fakad, hogy 64bites guesthez a virtualboxnak kell a a hardware virtualization support.
https://www.virtualbox.org/manual/ch03.html#intro-64bitguests
- A hozzászóláshoz be kell jelentkezni
Ez a valasz es a link most picit bezavart. :-)
akkor most melyik rendszeren es hol kell beallitani a hardware virtualization supportot?
Hiszen csupan egyetlen HW letezik, amelyen fut a VMware es ez alatt raktam fel az Ubuntu 14.04 LTS szervert es ebben pedig a boxokat.
Megjegyzes:
apt-get install xorg gnome-core gnome-system-tools gnome-app-install
paranccsal most mar GUI-ban is latom a VirtualBoxban a boxokat es a 64-bites box6-ot inditva ugyanazt a hibat kapom, mint a hazi gepen:
"VT-x/AMD-V hardware acceleration is not available on your system.
Your 64bit guest will fail to detect 64-bit CPU and will not be able to boot."
Ardi
- A hozzászóláshoz be kell jelentkezni
A VMWare használja a HW-s virtualizációs képességeket (elvileg ezeket ő tovább tudja dobni). Ebben fut egy Ubuntu VM, ő megkapja. Ha ide teszel egy VirtualBox-ot, amiben futnának a box-ok, az nem fog menni, ugyanis erre a szintre már nem tudod (fixme) delegálni a HW-s képességeket, így csak a 32bites dobozok fognak elindulni.
Szerk.: Ha van időd, akkor ezt még megnézheted: https://egustafson.github.io/esxi-nested-virtualbox.html
ssh gondolom nem kell az ESX-re, ha datastore-ból le tudod húzni/szerkeszteni/visszatölteni a leállított VM vmx fájlját...
--
A gyors gondolat többet ér, mint a gyors mozdulat.
- A hozzászóláshoz be kell jelentkezni
Koszi szepen a magyarazatot es az ujabb linket is.
Ugy latszik, tenyleg vmi vason kell probalkoznom ezekkel a 64-bites boxokkal.
Ardi
- A hozzászóláshoz be kell jelentkezni