quinta-feira, 12 de novembro de 2015

How to Extend the Virtual Disk Size of a XenVM

This article contains the following procedures:
Extending the disk size in XenServer
Extending a partition size in Windows operating systems using the DiskPart utilityExtending a partition size in Linux operating systems

  • Shut down the corresponding VM.
  • Go to XenServer Command Line Interface (CLI).
  • Find Virtual Disk Image (VDI) Universally Unique Identifier (UUID) by running the following command:
  • # xe vm-disk-list vm=<vm name>
  • Run the following command to resize the VDI:
  • #xe vdi-resize uuid=<vdi uuid> size=GiB, MiB
  • Right Click My Computer and select Manage.
  • Select Disk Management and right click on the disk you want to extend and select Extend:
  • Launch a command prompt.
  • Type in diskpart and press Enter.
  • At the diskpart prompt, enter the following commands:
  • DISKPART>list volume
  • DISKPART>select volume # (For # enter the number of the volume you want to resize)
  • DISKPART>extend size=n (n is size in Megabytes that you are adding to the volume>
  • After you finish your work type exit to close DiskPart.
  • Type exit to exit the command prompt.
  • Click Restart. You might be asked to restart one more time once the operating system starts.
  • If you use ext3: After resizing the disk in XenServer, start the operating system and use the resize2fs tool with the name of the partition that should be extended (refer to the manual for more details). For example to resize a data partition:

  • #umount /dev/xvdc1
  • #fdisk /dev/xvdc1
  • #d (Delete the partition and recreate it)
  • #n (New partition)
  • #w (Write out table)
  • #e2fsck -f /dev/xvdc1
  • #resize2fs /dev/xvdc1
  • #mount /dev/xvdc1 /home
  • Shutdown the VM.

  • Set the VM to boot into single-user mode on the XenServer host CLI
  • #xe vm-param-set uuid=6f04... PV-args=single
  • Boot VM and show disk list make partition table changes in the Linux VM
  • #fdisk -l

  • fdisk /dev/xvda
  • d -Delete Partition
  • n -New create new partition
  • p -Primary
  • 1- Partition number
  • Default values for size
  • w -Write changes

  • reboot vm
  • Note: If you need to run FSCK, you must boot from rescue media.
  • Resize the filesystem:
  • resize2fs /dev/xvda1

  • On XenServer host:

  • Remove the single-user boot mode setting:
  • #xe vm-param-set uuid=6f04... PV-args=
  • If you use xfs: After resizing the disk in XenServer, start the operating system and use the xfs_growfs tool with the name of the partition that should be extended (refer to the manual for more details). For example:
  • # xfs_growfs /dev/xvda1
  • If you use reiserfs: After resizing the disk in XenServer, start the operating system and use the resize_reiserfs tool with the name of the partition that should be extended (refer to the manual for more details). For example:
  • # resize_reiserfs /dev/xvda1
  • How to extend the size of the disk in XenServer:

    With XenCenter 5.6, you can select the VDI from the Storage tab of the virtual machine click Properties, select Size and Location, then increase the size of the disk without using the command line.
    How to extend the partition size in Windows operating systems:
    These steps are also demonstrated in the video HowTo: Extend the Virtual Disk Size of a XenServer VM (Part 1 of 2).
    Using Disk Management:
    Note: This procedure works on Windows 2008 and Windows 7 for both data and system partitions. In Vista you can use this to extend a data partition only.




    This starts the Extend Volume Wizard. Follow the prompts to complete the process.
    Using the DiskPart utility:
      Refer to DiskPart Command-Line Options for more information.

      How to extend the partition size in Linux operating systems:
    These steps are also demonstrated in the video HowTo: Extend the Virtual Disk Size of a XenServer VM (Part 2 of 2).
    Linux operating systems supports many file system types (for example, ext3, xfs, reiserfs). To extend file systems on an extended disk you must use file system tools that correspond to a particular file system type. Recommended file systems are those that can be expanded while the system is running and mounted. For example:

      http://support.citrix.com/article/CTX125405


    Sem comentários: