Hello All, We would appreciate your advice on the following issue. We have created a full virtualized Xen guest that its disk is an image file of 4GB. We want to use this image file as a template for creating Xen guests which their disk will be an LVM device. The disk image file is of type: file /var/lib/xen/images/rhel52.img /var/lib/xen/images/rhel52.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 9221247 sectors; partition 2: ID=0x83, starthead 0, startsector 9221310, 19438650 sectors, code offset 0x48 By dd/cat this image file to an empty LVM device cat /var/lib/xen/images/rhel52.img > /dev/VolGroup00/rhel52 and by using this configuration file name = "rhel52" uuid = "b8ba7d42-191c-3ab9-5f78-40d1c1f1ab67" maxmem = 2048 memory = 2048 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 keymap = "en-us" disk = [ "phy:/dev/VolGroup00/rhel52,hda,w" ] vif = [ "mac=00:16:3e:36:b5:50,bridge=xenbr0" ] serial = "pty" we can boot the machine and everything is working properly. We want to be able to provide the flexibility to enlarge partition number 1 size to the size of the LVM device. Please note that we are not aware of the LVM device size in advance, that''s why we need this flexibility. For example our LVM size is 20GB and our image file is just 4GB. How can we adjust the partition size ( 4GB in our case ) to the LVM size ( 20GB in our case ) ? If there is a better way to accomplish this task we would also be happy to know. Thanks, Ido & Alexandra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
i suggest you to clone the current disk(4GB) in to bigger size disk(20GB).... try to boot it in new cloned disk 20GB. if its ok then destroy your old disk(4GB)... On Wed, Sep 24, 2008 at 2:38 PM, Ido Levy <IDOL@il.ibm.com> wrote:> > Hello All, > > We would appreciate your advice on the following issue. > > We have created a full virtualized Xen guest that its disk is an image file > of 4GB. > We want to use this image file as a template for creating Xen guests which > their disk will be an LVM device. > The disk image file is of type: > > file /var/lib/xen/images/rhel52.img > /var/lib/xen/images/rhel52.img: x86 boot sector; partition 1: > ID=0x83, active, starthead 1, startsector 63, 9221247 sectors; > partition 2: ID=0x83, starthead 0, startsector 9221310, 19438650 > sectors, code offset 0x48 > > > By dd/cat this image file to an empty LVM device > > cat /var/lib/xen/images/rhel52.img > /dev/VolGroup00/rhel52 > > and by using this configuration file > > name = "rhel52" > uuid = "b8ba7d42-191c-3ab9-5f78-40d1c1f1ab67" > maxmem = 2048 > memory = 2048 > vcpus = 1 > builder = "hvm" > kernel = "/usr/lib/xen/boot/hvmloader" > boot = "c" > pae = 1 > acpi = 1 > apic = 1 > localtime = 0 > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > device_model = "/usr/lib/xen/bin/qemu-dm" > sdl = 0 > vnc = 1 > vncunused = 1 > keymap = "en-us" > disk = [ "phy:/dev/VolGroup00/rhel52,hda,w" ] > vif = [ "mac=00:16:3e:36:b5:50,bridge=xenbr0" ] > serial = "pty" > > we can boot the machine and everything is working properly. > > We want to be able to provide the flexibility to enlarge partition number 1 > size to the size of the LVM device. > Please note that we are not aware of the LVM device size in advance, that''s > why we need this flexibility. > > For example our LVM size is 20GB and our image file is just 4GB. > > How can we adjust the partition size ( 4GB in our case ) to the LVM size > ( 20GB in our case ) ? > > If there is a better way to accomplish this task we would also be happy to > know. > > Thanks, > > Ido & Alexandra > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Regards Shan, Development Engineer, Binary Karma. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You could use nfsclone http://www.linux-ntfs.org/doku.php?id=ntfsclone and with losetup and kpartx help you can clone nfspartitions from dom0, and it works faster than with dd. Ido Levy wrote:> Hello All, > > We would appreciate your advice on the following issue. > > We have created a full virtualized Xen guest that its disk is an image file > of 4GB. > We want to use this image file as a template for creating Xen guests which > their disk will be an LVM device. > The disk image file is of type: > > file /var/lib/xen/images/rhel52.img > /var/lib/xen/images/rhel52.img: x86 boot sector; partition 1: > ID=0x83, active, starthead 1, startsector 63, 9221247 sectors; > partition 2: ID=0x83, starthead 0, startsector 9221310, 19438650 > sectors, code offset 0x48 > > > By dd/cat this image file to an empty LVM device > > cat /var/lib/xen/images/rhel52.img > /dev/VolGroup00/rhel52 > > and by using this configuration file > > name = "rhel52" > uuid = "b8ba7d42-191c-3ab9-5f78-40d1c1f1ab67" > maxmem = 2048 > memory = 2048 > vcpus = 1 > builder = "hvm" > kernel = "/usr/lib/xen/boot/hvmloader" > boot = "c" > pae = 1 > acpi = 1 > apic = 1 > localtime = 0 > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > device_model = "/usr/lib/xen/bin/qemu-dm" > sdl = 0 > vnc = 1 > vncunused = 1 > keymap = "en-us" > disk = [ "phy:/dev/VolGroup00/rhel52,hda,w" ] > vif = [ "mac=00:16:3e:36:b5:50,bridge=xenbr0" ] > serial = "pty" > > we can boot the machine and everything is working properly. > > We want to be able to provide the flexibility to enlarge partition number 1 > size to the size of the LVM device. > Please note that we are not aware of the LVM device size in advance, that''s > why we need this flexibility. > > For example our LVM size is 20GB and our image file is just 4GB. > > How can we adjust the partition size ( 4GB in our case ) to the LVM size > ( 20GB in our case ) ? > > If there is a better way to accomplish this task we would also be happy to > know. > > Thanks, > > Ido & Alexandra > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Forgive me if I misunderstood the question, but wouldn''t this simply be a matter of expanding the virtual PV in the DomU? Thank you, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Ido Levy Sent: Wednesday, September 24, 2008 2:09 AM To: xen-users@lists.xensource.com Cc: Alexandra Kisin Subject: [Xen-users] How to manipulate xen image size Hello All, We would appreciate your advice on the following issue. We have created a full virtualized Xen guest that its disk is an image file of 4GB. We want to use this image file as a template for creating Xen guests which their disk will be an LVM device. The disk image file is of type: file /var/lib/xen/images/rhel52.img /var/lib/xen/images/rhel52.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 9221247 sectors; partition 2: ID=0x83, starthead 0, startsector 9221310, 19438650 sectors, code offset 0x48 By dd/cat this image file to an empty LVM device cat /var/lib/xen/images/rhel52.img > /dev/VolGroup00/rhel52 and by using this configuration file name = "rhel52" uuid = "b8ba7d42-191c-3ab9-5f78-40d1c1f1ab67" maxmem = 2048 memory = 2048 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 keymap = "en-us" disk = [ "phy:/dev/VolGroup00/rhel52,hda,w" ] vif = [ "mac=00:16:3e:36:b5:50,bridge=xenbr0" ] serial = "pty" we can boot the machine and everything is working properly. We want to be able to provide the flexibility to enlarge partition number 1 size to the size of the LVM device. Please note that we are not aware of the LVM device size in advance, that''s why we need this flexibility. For example our LVM size is 20GB and our image file is just 4GB. How can we adjust the partition size ( 4GB in our case ) to the LVM size ( 20GB in our case ) ? If there is a better way to accomplish this task we would also be happy to know. Thanks, Ido & Alexandra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users