How To: Extend the Virtual Disk Size of a XenServer VM
2011-12-23 16:25
639 查看
扩展XenServer虚拟机虚拟磁盘的大小
虚拟机CentOS5 uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d
1>关闭要扩展虚拟磁盘大小的vm
xe vm-shutdown uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d
2>设置让虚拟机从单用户模式启动
xe vm-param-set uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d PV-args=single
3>确定你要扩展的磁盘
xe vm-disk-list vm=CentOS5
Disk 0 VBD:
uuid ( RO) : 916ca80d-3ae5-9ea1-dd4a-e38257d45575
vm-name-label ( RO): CentOS5
userdevice ( RW): 0
Disk 0 VDI:
uuid ( RO) : e321f4fd-88f9-4288-9f28-3196cc359399
name-label ( RW): CentOS5 0
sr-name-label ( RO): Local storage
virtual-size ( RO): 10737418240
4>在XenServer主机扩展虚拟机的磁盘空间
xe vdi-resize uuid=e321f4fd-88f9-4288-9f28-3196cc359399 disk-size=20GiB
5>启动虚拟机,显示磁盘分区信息
xe vm-start vm=CentOS5
fdisk -l
df -Th
umount /dev/xvda2
fdisk /dev/xvda
d -Delete Partition 删除要扩展大小的分区 我们这里要删除的是xvda2
n -New create new partition 新建一个分区
p -Primary 主分区
1- Partition number 分区号
Default values for size
w -Write changes 存盘退出
e2fsck -f /dev/xvda2
resize2fs /dev/xvda2
7>把虚拟机改回graphical utf8模式
xe vm-param-set uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d PV-args="graphical utf8"
8>xe vm-reboot vm=CentOS5
附:XenServer主机添加物理硬盘
添加硬盘扩容(需移出pool处理)
pvcreate /dev/sdb
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST31000528AS_5VP5ZV21 name-label='local storage2'
本文出自 “憂零的博客” 博客,请务必保留此出处http://sunyu.blog.51cto.com/744725/749570
虚拟机CentOS5 uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d
1>关闭要扩展虚拟磁盘大小的vm
xe vm-shutdown uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d
2>设置让虚拟机从单用户模式启动
xe vm-param-set uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d PV-args=single
3>确定你要扩展的磁盘
xe vm-disk-list vm=CentOS5
Disk 0 VBD:
uuid ( RO) : 916ca80d-3ae5-9ea1-dd4a-e38257d45575
vm-name-label ( RO): CentOS5
userdevice ( RW): 0
Disk 0 VDI:
uuid ( RO) : e321f4fd-88f9-4288-9f28-3196cc359399
name-label ( RW): CentOS5 0
sr-name-label ( RO): Local storage
virtual-size ( RO): 10737418240
4>在XenServer主机扩展虚拟机的磁盘空间
xe vdi-resize uuid=e321f4fd-88f9-4288-9f28-3196cc359399 disk-size=20GiB
5>启动虚拟机,显示磁盘分区信息
xe vm-start vm=CentOS5
fdisk -l
df -Th
umount /dev/xvda2
fdisk /dev/xvda
d -Delete Partition 删除要扩展大小的分区 我们这里要删除的是xvda2
n -New create new partition 新建一个分区
p -Primary 主分区
1- Partition number 分区号
Default values for size
w -Write changes 存盘退出
e2fsck -f /dev/xvda2
resize2fs /dev/xvda2
7>把虚拟机改回graphical utf8模式
xe vm-param-set uuid=f0dae858-ddaf-a47a-6581-30b871e61c1d PV-args="graphical utf8"
8>xe vm-reboot vm=CentOS5
附:XenServer主机添加物理硬盘
添加硬盘扩容(需移出pool处理)
pvcreate /dev/sdb
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST31000528AS_5VP5ZV21 name-label='local storage2'
本文出自 “憂零的博客” 博客,请务必保留此出处http://sunyu.blog.51cto.com/744725/749570
相关文章推荐
- Extend the size of ext3 partition online in VM
- android Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
- Convert the virtual disk to Eager Zeroed Thick and extend disk
- One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot"
- VMware Convert Error: The size of all flat source disks will exceed the capacity of xxxxx
- The size of the object heap + VM data exceeds the maximum representable size问题解决办法
- virtualbox vdi extend the disk usage
- 完美解决java.lang.OutOfMemoryError: bitmap size exceeds VM budget
- mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero
- Shrinking Virtual Disks of VMWare
- How To: set udev rule for setting the disk permission on ASM disks when using multipath on Linux 6.x
- android-java.lang.OutOfMemoryError: bitmap size exceeds VM budge
- 异常:java.sql.SQLException: The total number of locks exceeds the lock table size
- android-java.lang.OutOfMemoryError: bitmap size exceeds VM budge
- How to: How to disable Java Security Warning "The application requires an earlier version of Java."
- .NET中使用GridView控件输入数据时出现“ Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"的问题
- The shared folders setting of Ubuntu in Virtualbox
- 转载 Android解决java.lang.OutOfMemoryError: bitmap size exceeds VM budget
- Android解决java.lang.OutOfMemoryError: bitmap size exceeds VM budget(转)
- warning: the frame size of 1040 bytes is larger than 1024 bytes