[et-mgmt-tools] Manually creating a sparse file
Caetano, Greg
Greg.Caetano at hp.com
Mon Apr 9 14:46:51 UTC 2007
My goal is to be able to easily enable a Physical to Virtual server
migration ( a physical server running RHEL4u4 to become a VM on a RHEL5
server).
Since I have the RHEL4 system running and configured properly, I just
want to take the data on the DAS storage and move it to the VM.
My test system does have the ability for me to just attach to the
physical drives but I still have not quite gotten the file based disk
image to work well.
I've done the suggested dd commands
I've fdisk'd the new "disk image" and it asks me to set cylinder counts
which I've tried.
The fdisk exits with
=======
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 25:
Inappropriate ioctl for device.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
=======
fdisk -l returns
last_lba(): I don't know how to handle files with mode 81a4
You must set cylinders.
You can do this from the extra functions menu.
Disk gregdisk: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
gregdisk1 1 25 200781 83 Linux
gregdisk2 26 150 1004062+ 83 Linux
gregdisk3 151 267349 2146275967+ 83 Linux
Partition 3 has different physical/logical endings:
phys=(1023, 254, 63) logical=(267348, 254, 63)
# file gregdisk
gregdisk: x86 boot sector; partition 1: ID=0x83, starthead 1,
startsector 63, 401562 sectors; partition 2: ID=0x83, starthead 0,
startsector 401625, 2008125 sectors; partition 3: ID=0x83, starthead 0,
startsector 2409750, 4292551935 sectors
Greg Caetano
HP TSG Linux Solutions Alliances Engineering
Chicago, IL
greg.caetano at hp.com
-----Original Message-----
From: et-mgmt-tools-bounces at redhat.com
[mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of David Robinson
Sent: Saturday, April 07, 2007 6:33 PM
To: Fedora/Linux Management Tools
Subject: Re: [et-mgmt-tools] Manually creating a sparse file
Caetano, Greg wrote:
> I would like to manually create a VM sparse file that I can use fdisk
> to partition then copy a running root partition into the loopback
> sparse file.
>
> How would I manually generate the proper vm sparse file?
A sparse file can be created with dd.
# dd if=/dev/zero of=sparse seek=512 bs=1M count=0
0+0 records in
0+0 records out
0 bytes (0 B) copied, 4.6e-05 seconds, 0.0 kB/s # ls -lah sparse
-rw-r--r-- 1 root root 512M Apr 8 08:47 sparse
Cheers,
Dave
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools at redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
More information about the et-mgmt-tools
mailing list