User Tools

Site Tools


network_stuff:juniper:vmx:step-by-step

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_stuff:juniper:vmx:step-by-step [2020/12/14 21:07] jotasandokunetwork_stuff:juniper:vmx:step-by-step [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 16: Line 16:
  
   mv vmx-18.2R1.9 vmx   mv vmx-18.2R1.9 vmx
-  cp vmx/images/junos-vmx-x86-64-17.1R1.8.qcow2 vcp-hda.qcow2+  cp vmx/images/junos-vmx-x86-64-18.2R1.9.qcow2 vcp-hda.qcow2
   cp vmx/images/vmxhdd.img vcp-hdb.qcow2   cp vmx/images/vmxhdd.img vcp-hdb.qcow2
   cp vmx/images/metadata-usb-re.img  vcp-hdc.img   cp vmx/images/metadata-usb-re.img  vcp-hdc.img
-  cp vmx/images/vFPC-20170216.img  vfp-hda.img+  cp vmx/images/vFPC-20180605.img vfp-hda.img 
 +  
   virsh net-destroy vmx-int   virsh net-destroy vmx-int
   virsh net-undefine vmx-int   virsh net-undefine vmx-int
-   +  cat << EOF > vmx-int.xml
-  cat > vmx-int.xml+
   <network>   <network>
     <name>vmx-int</name>     <name>vmx-int</name>
Line 29: Line 29:
     <mac address='52:54:00:0c:9f:5c'/>     <mac address='52:54:00:0c:9f:5c'/>
   </network>   </network>
 +  EOF
 +  #
  
 \\ \\
Line 41: Line 43:
  
  
-\\+Open the two virt-install blocks below in two different sessions
  
   cd ~/vagrant/boxes/juniper/vmx   cd ~/vagrant/boxes/juniper/vmx
Line 83: Line 85:
   #VCP   #VCP
   root   root
-  edit 
   cli   cli
 +  edit
   delete chassis auto-image-upgrade   delete chassis auto-image-upgrade
   set system services ssh root-login allow   set system services ssh root-login allow
Line 103: Line 105:
 \\ \\
  
-  ssh root@192.168.121.179+  ssh root@192.168.121.75 
 +  cli 
 +  edit
   set system login user vagrant uid 2000   set system login user vagrant uid 2000
   set system login user vagrant class super-user   set system login user vagrant class super-user
Line 117: Line 121:
 \\ \\
  
-  ssh vagrant@192.168.121.179 -i ~/.vagrant.d/insecure_private_key+  ssh vagrant@192.168.121.75 -i ~/.vagrant.d/insecure_private_key
   show chassis fpc   show chassis fpc
   request system power-off   request system power-off
Line 134: Line 138:
 \\ \\
  
-  ssh root@192.168.121.233+  ssh root@192.168.121.12
   sed -i  's/root:x:0:0:root:\/root:\/bin\/sh/root:x:0:0:root:\/etc\/root:\/bin\/sh/' /etc/passwd   sed -i  's/root:x:0:0:root:\/root:\/bin\/sh/root:x:0:0:root:\/etc\/root:\/bin\/sh/' /etc/passwd
   mkdir -p /etc/root/.ssh   mkdir -p /etc/root/.ssh
Line 148: Line 152:
  
   # VFP   # VFP
-  ssh root@192.168.121.233 -i ~/.vagrant.d/insecure_private_key +  ssh root@192.168.121.12 -i ~/.vagrant.d/insecure_private_key
-  # VFP+
   /sbin/shutdown -h now   /sbin/shutdown -h now
  
Line 172: Line 175:
     "versions": [     "versions": [
       {       {
-        "version": "17.1R1.8",+        "version": "18.2R1.9",
         "providers": [         "providers": [
           {           {
Line 193: Line 196:
   sudo chown root:libvirt /opt/vagrant/storage/   sudo chown root:libvirt /opt/vagrant/storage/
  
-  mv vcp-hdb.qcow2 /opt/vagrant/storage/vmx-vcp-hdb-17.1R1.8-base.qcow2 +  mv vcp-hdb.qcow2 /opt/vagrant/storage/vmx-vcp-hdb-18.2R1.9-base.qcow2 
-  mv vcp-hdc.img /opt/vagrant/storage/vmx-vcp-hdc-17.1R1.8-base.img+  mv vcp-hdc.img /opt/vagrant/storage/vmx-vcp-hdc-18.2R1.9-base.img
   ll /opt/vagrant/storage/   ll /opt/vagrant/storage/
  
Line 211: Line 214:
     "versions": [     "versions": [
       {       {
-        "version": "17.1R1.8",+        "version": "18.2R1.9",
         "providers": [         "providers": [
           {           {
Line 253: Line 256:
       guest_name = "vmx-vcp-01"       guest_name = "vmx-vcp-01"
       node.vm.box = "juniper/vmx-vcp"       node.vm.box = "juniper/vmx-vcp"
-      node.vm.box_version = "17.1R1.8"+      node.vm.box_version = "18.2R1.9"
       node.vm.guest = :tinycore       node.vm.guest = :tinycore
       node.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true       node.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
Line 265: Line 268:
         domain.disk_bus = "ide"         domain.disk_bus = "ide"
         domain.nic_adapter_count = 1         domain.nic_adapter_count = 1
-        domain.storage :file, :path => "#{username}-#{guest_name}-vmx-vcp-hdb-17.1R1.8-base.qcow2", :size => "196870144", :type => "qcow2", :bus => "ide", :device => "hdb", :allow_existing => true +        domain.storage :file, :path => "#{username}-#{guest_name}-vmx-vcp-hdb-18.2R1.9-base.qcow2", :size => "196870144", :type => "qcow2", :bus => "ide", :device => "hdb", :allow_existing => true 
-        domain.storage :file, :path => "#{username}-#{guest_name}-vmx-vcp-hdc-17.1R1.8-base.img", :size => "16777216", :type => "raw", :bus => "ide", :device => "hdc", :allow_existing => true+        domain.storage :file, :path => "#{username}-#{guest_name}-vmx-vcp-hdc-18.2R1.9-base.img", :size => "16777216", :type => "raw", :bus => "ide", :device => "hdc", :allow_existing => true
       end       end
       add_volumes = [       add_volumes = [
-        "virsh vol-create-as default #{username}-#{guest_name}-vmx-vcp-hdb-17.1R1.8-base.qcow2 196870144",+        "virsh vol-create-as default #{username}-#{guest_name}-vmx-vcp-hdb-18.2R1.9-base.qcow2 196870144",
         "sleep 1",         "sleep 1",
-        "virsh vol-upload --pool default #{username}-#{guest_name}-vmx-vcp-hdb-17.1R1.8-base.qcow2 /opt/vagrant/storage/vmx-vcp-hdb-17.1R1.8-base.qcow2",+        "virsh vol-upload --pool default #{username}-#{guest_name}-vmx-vcp-hdb-18.2R1.9-base.qcow2 /opt/vagrant/storage/vmx-vcp-hdb-18.2R1.9-base.qcow2",
         "sleep 1",         "sleep 1",
-        "virsh vol-create-as default #{username}-#{guest_name}-vmx-vcp-hdc-17.1R1.8-base.img 16777216",+        "virsh vol-create-as default #{username}-#{guest_name}-vmx-vcp-hdc-18.2R1.9-base.img 16777216",
         "sleep 1",         "sleep 1",
-        "virsh vol-upload --pool default #{username}-#{guest_name}-vmx-vcp-hdc-17.1R1.8-base.img /opt/vagrant/storage/vmx-vcp-hdc-17.1R1.8-base.img",+        "virsh vol-upload --pool default #{username}-#{guest_name}-vmx-vcp-hdc-18.2R1.9-base.img /opt/vagrant/storage/vmx-vcp-hdc-18.2R1.9-base.img",
         "sleep 1"         "sleep 1"
       ]       ]
Line 287: Line 290:
      
       delete_volumes = [       delete_volumes = [
-        "virsh vol-delete #{username}-#{guest_name}-vmx-vcp-hdb-17.1R1.8-base.qcow2 default", +        "virsh vol-delete #{username}-#{guest_name}-vmx-vcp-hdb-18.2R1.9-base.qcow2 default", 
-        "virsh vol-delete #{username}-#{guest_name}-vmx-vcp-hdc-17.1R1.8-base.img default"+        "virsh vol-delete #{username}-#{guest_name}-vmx-vcp-hdc-18.2R1.9-base.img default"
       ]       ]
       delete_volumes.each do |i|       delete_volumes.each do |i|
Line 313: Line 316:
       guest_name = "vmx-vfp-01"       guest_name = "vmx-vfp-01"
       node.vm.box = "juniper/vmx-vfp"       node.vm.box = "juniper/vmx-vfp"
-      node.vm.box_version = "17.1R1.8"+      node.vm.box_version = "18.2R1.9"
       node.vm.guest = :tinycore       node.vm.guest = :tinycore
       node.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true       node.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
Line 358: Line 361:
   vagrant ssh vmx-vcp-01   vagrant ssh vmx-vcp-01
      
-TROUBLESHOOTING AUTOMATED DRAFT:\\+TROUBLESHOOTING AUTOMATED:\\
  
   virsh list --all  | egrep -v "Name|------" | awk '{print $2}' > /var/tmp/temp   virsh list --all  | egrep -v "Name|------" | awk '{print $2}' > /var/tmp/temp
-  while read -r line; do echo "virsh destroy $line; done < /var/tmp/temp +  while read -r line; do virsh destroy $line ; done < /var/tmp/temp 
-  while read -r line; do echo "virsh undefine $line --snapshots-metadata   --managed-save; done < /var/tmp/temp +  while read -r line; do virsh undefine $line --snapshots-metadata   --managed-save ; done < /var/tmp/temp 
-  virsh vol-list default | egrep "^ " | egrep -v Name | cut -d' ' -f 2 > /var/  tmp/temp2 +  virsh vol-list default | egrep "^ " | egrep -v Name | cut -d' ' -f 2 > /var/tmp/temp2 
-  while read -r line; do echo "virsh vol-delete --pool default $line; done < /  var/tmp/temp2 +  while read -r line; do virsh vol-delete --pool default $line ; done < /var/tmp/temp2 
-  rm -f /var/lib/libvirt/images/+  rm -f /var/lib/libvirt/images/
-  systemctl restart libvirtd +  sudo systemctl restart libvirtd 
network_stuff/juniper/vmx/step-by-step.1607980020.txt.gz · Last modified: (external edit)