Advertisement
Guest User

Untitled

a guest
Nov 19th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. vrk@zen:~/vagrant/laxrac$ vagrant validate
  2. Vagrantfile validated successfully.
  3. vrk@zen:~/vagrant/laxrac$ vagrant up
  4. Bringing machine 'laxrac1' up with 'virtualbox' provider...
  5. Bringing machine 'laxrac2' up with 'virtualbox' provider...
  6. ==> laxrac1: Importing base box 'rhel7_20201117'...
  7. ==> laxrac1: Matching MAC address for NAT networking...
  8. ==> laxrac1: Setting the name of the VM: laxrac1
  9. ==> laxrac1: Clearing any previously set network interfaces...
  10. ==> laxrac1: Preparing network interfaces based on configuration...
  11. laxrac1: Adapter 1: nat
  12. ==> laxrac1: Forwarding ports...
  13. laxrac1: 22 (guest) => 2222 (host) (adapter 1)
  14. ==> laxrac1: Running 'pre-boot' VM customizations...
  15. ==> laxrac1: Booting VM...
  16. ==> laxrac1: Waiting for machine to boot. This may take a few minutes...
  17. laxrac1: SSH address: 127.0.0.1:2222
  18. laxrac1: SSH username: vagrant
  19. laxrac1: SSH auth method: private key
  20. laxrac1:
  21. laxrac1: Vagrant insecure key detected. Vagrant will automatically replace
  22. laxrac1: this with a newly generated keypair for better security.
  23. laxrac1:
  24. laxrac1: Inserting generated public key within guest...
  25. laxrac1: Removing insecure key from the guest if it's present...
  26. laxrac1: Key inserted! Disconnecting and reconnecting using new SSH key...
  27. ==> laxrac1: Machine booted and ready!
  28. ==> laxrac1: Checking for guest additions in VM...
  29. ==> laxrac1: Setting hostname...
  30. ==> laxrac2: Importing base box 'rhel7_20201117'...
  31. ==> laxrac2: Matching MAC address for NAT networking...
  32. ==> laxrac2: Setting the name of the VM: laxrac2
  33. ==> laxrac2: Fixed port collision for 22 => 2222. Now on port 2200.
  34. ==> laxrac2: Clearing any previously set network interfaces...
  35. ==> laxrac2: Preparing network interfaces based on configuration...
  36. laxrac2: Adapter 1: nat
  37. ==> laxrac2: Forwarding ports...
  38. laxrac2: 22 (guest) => 2200 (host) (adapter 1)
  39. ==> laxrac2: Running 'pre-boot' VM customizations...
  40. A customization command failed:
  41.  
  42. ["createhd", "--filename", "/home/vrk/virtualboxes/shared_disks/laxrac_asm_disk1.vdi", "--size", 16384, "--format", "VDI", "--variant", "Fixed"]
  43.  
  44. The following error was experienced:
  45.  
  46. #<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
  47. for controlling VirtualBox. The command and stderr is shown below.
  48.  
  49. Command: ["createhd", "--filename", "/home/vrk/virtualboxes/shared_disks/laxrac_asm_disk1.vdi", "--size", "16384", "--format", "VDI", "--variant", "Fixed"]
  50.  
  51. Stderr: 0%...
  52. Progress state: VBOX_E_FILE_ERROR
  53. VBoxManage: error: Failed to create medium
  54. VBoxManage: error: Could not create the medium storage unit '/home/vrk/virtualboxes/shared_disks/laxrac_asm_disk1.vdi'.
  55. VBoxManage: error: VDI: cannot create image '/home/vrk/virtualboxes/shared_disks/laxrac_asm_disk1.vdi' (VERR_ALREADY_EXISTS)
  56. VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
  57. VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 510 of file VBoxManageDisk.cpp
  58. >
  59.  
  60. Please fix this customization and try again.
  61. vrk@zen:~/vagrant/laxrac$ ls -ltr /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk*
  62. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk4.vdi
  63. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk5.vdi
  64. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk6.vdi
  65. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk1.vdi
  66. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk3.vdi
  67. -rw------- 1 vrk vrk 17181966336 Nov 19 12:59 /home/vrk/virtualboxes/shared_disks/laxrac_asm_disk2.vdi
  68. vrk@zen:~/vagrant/laxrac$ cat Vagrantfile
  69. # encoding: utf-8
  70. # -*- mode: ruby -*-
  71. # vi: set ft=ruby :
  72.  
  73. # -- define the number of nodes to spin --
  74.  
  75. N=2
  76. cname="laxrac"
  77.  
  78. Vagrant.configure("2") do |config|
  79. #Iterate over the nodes
  80. (1..N).each do |node_id|
  81. nid=(node_id)
  82. nodename=("#{cname}#{nid}")
  83. config.vm.define "#{cname}#{nid}" do |node|
  84. node.vm.box = "rhel7_20201117"
  85. node.vm.hostname = "#{nodename}"
  86. node.vm.synced_folder ".", "/vagrant", disabled:true
  87. node.vm.provider :virtualbox do |v|
  88. v.memory = 4096
  89. v.cpus = 2
  90. v.name = "#{nodename}"
  91. (1..6).each do |dnum|
  92. asmdisk = ("/home/vrk/virtualboxes/shared_disks/#{cname}_asm_disk#{dnum}.vdi")
  93. unless File.exist?("#{asmdisk}")
  94. v.customize ['createhd', '--filename', ("#{asmdisk}") , '--size', 16384, '--format', 'VDI', '--variant', 'Fixed']
  95. end
  96. v.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', ("#{dnum}"), '--device', 0, '--type', 'hdd', '--medium', ("#{asmdisk}"), '--mtype', 'shareable', '--nonrotational', 'on']
  97. end # eof dnum
  98. end # eof v
  99. end # eof node
  100. end # eof node_id
  101. end # eof config
  102. vrk@zen:~/vagrant/laxrac$
  103.  
  104.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement