Vnx-modify-rootfs

From VNX
Revision as of 23:20, 7 May 2012 by David (talk | contribs)
Jump to: navigation, search

Updating or modifying a VNX root filesystem

In order to update or modify a VNX root filesystem (rootfs from now on), you have to:

  • Start a virtual machine directly mounting that rootfs and with Internet connection. You can do it in several ways:
    • Using the vnx_modify_rootfs tool (recommended):
    • vnx_modify_rootfs <rootfs_name>
      

      being <rootfs_name> the rootfs filename.

    • Using the libvirt XML virtual machine definition used for creating the rootfs:
    • virsh create rootfs_XXX.xml
      

      and manually opening the console using:

      virt-viewer <vmname>
      

      being <vmname> the name assigned by libvirt to the virtual machine (you can get it with "virsh list" command or just looking for the <name> tag in root_fs_XXX.xml file).

  • Once the virtual machine is started and you have access to the console, you can make the modifications desired, for example, updating the VNXACE daemon following the step described below.

  • </ul>


    Updating VNXACE daemon

    If you have a rootfs with the autoconfiguration and command execution daemon (ACE) already installed, you can use the autoupdate functionality to update the daemon to a newer version. Just follow this procedure:

    Linux and FreeBSD

    • Once the virtual machine is running, execute the update utility:
    • /usr/share/vnx/bin/vnx_update_aced <vmname> /usr/share/vnx/aced/<vnxaced_file_name> 
      

      being <vmname> the name assigned by libvirt to the virtual machine, and <vnxaced_file_name> the filename of the latest VNXACE version (just have a look at /usr/share/vnx/aced directory take the highest version number). For example:

      # virsh list
      Id Nombre               Estado
      

      10 vnx_rootfs_kvm_ubuntu-12.04-v023.qcow2 running
      
      # /usr/share/vnx/bin/vnx_update_aced vnx_rootfs_kvm_ubuntu-12.04-v023.qcow2 /usr/share/vnx/aced/vnx-aced-lf-2.0b.1882.tgz
      
    • Once the ace daemon is automatically updated the virtual machine will be halted automatically.

    In case the VNXACE daemon is not automatilly updated, you can do it manually. From inside the VM:

    • Mount the cdrom with:
    • mount /media/cdrom
      
    • Execute the install script:
    • perl /media/cdrom/install:
      


    • Start the virtual machine (directly using virsh or the vnx_modify_rootfs utility):
    •  /usr/share/vnx/bin/vnx_modify_rootfs rootfs_ubuntu.xml 
      


  • rootfs_XXX.xml, which are libvirt specifications to start virtual machines with Internet connection (through a NAT) using the different VNX root file-systems. They are included to easily allow modifying root filesystems (for example, to install new software packages).
  • Modify root filesystem scenarios (root_fs_XXX.xml)

    To modify a root filesystem, for example, installing new software packages, just start the associated libvirt scenario with:


    To easy the process, you can use the vnx_modify_rootfs simple script that starts the virtual machine and opens the console:

    /usr/share/vnx/bin/vnx_modify_rootfs root_fs_XXX.xml