No pcifront in F10?
by Jim Lutz
I have a virtual machine landscape consisting of a CentOS 5.3 Dom0 with
Xen 3.1.2, some PV CentOS DomU's with PCI passthrough (same versions),
and I'm trying to implement a F10 DomU with PCI passthrough. I set
everything up for the passthrough, and the F10 guest can't see any of
the devices with lspci. If I boot a CentOS PV machine with the same PCI
passthrough configuration, the devices show up with lspci. I've seen
some posts in various places about this issue, but no solutions. How do
I implement this?
12 years, 11 months
blktap driver for xen-dom0
by 서지혜
I installed xen 3.4.1 & M.young's xendom0 kernel on fedora 12 beta.
Everying works smoothly for me except that I can't use "tap:aio" for PV
guest.
It seems that blktap driver is not installed (not supported) on dom0 kernel.
I think performance of guest OS is better when is mounted by blktap. Is
there anyway I can use this option?
13 years, 6 months
Dom0 kernels
by M A Young
I have built a new set of kernel packages based on fedora rawhide
kernels and the xen/dom0/hackery branch of Jeremy's git repository
( http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=summary ).
This batch (kernel-2.6.29-0.114.2.6.rc6.fc11) is available via the koji
build system at
http://koji.fedoraproject.org/koji/taskinfo?taskID=1149500
These are really for development and debugging purposes only, as I am
still having problems getting them to boot, but others have reported more
success at getting kernels based on this git repository working, so you
might be lucky.
Note to install these packages on Fedora 10 you will need to have
rpm-4.6.0-1.fc10 installed (currently in updates-testing but it should be
available in updates soon) because of the change to SHA-256 file digest
hashing in recent Fedora 11 builds.
Michael Young
13 years, 6 months
Fedora xen-3.4.2 rpms
by Pasi Kärkkäinen
Hello again,
Xen 3.4.2 was released last week with a lot of updates, so it would be
good to sync the Fedora rpm again.
-- Pasi
13 years, 9 months
Re: [Xen-users] How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
I think if you do this, you are only backing up the first 512 bytes of the
logical volume, not the MBR.
Someone correct me if I am wrong.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
On Thu, Nov 12, 2009 at 9:36 AM, Geert Janssens <info(a)kobaltwit.be> wrote:
> On Thursday 12 November 2009, Mr. Teo En Ming (Zhang Enming) wrote:
> > Hi All,
> >
> > I have several Xen virtual machines within logical volumes using LVM2. I
> > did not use disk images for performance reasons.
> >
> > Conventionally, if I want to clone my virtual machines, I have to dd the
> LV
> > to an image file. But this consumes a lot of time and harddisk space.
> >
> > So, instead of doing that, I want to use losetup and kpartx with my
> logical
> > volumes, which contain operating systems of virtual machines.
> >
> > I can backup the filesystems of a virtual machine in this way:
> >
> > # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
> >
> Are you sure you need to call losetup first ?
>
> I remember I used kpartx directly on the lvm containing my vbd.
>
> Also, I think you can treat the lvm based vbd as a real disk.
>
> So
> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
>
> should backup your mbr.
>
> Anyone correct me if I'm wrong please.
>
> Geert
>
> --
> Kobalt W.I.T.
> Web & Information Technology
> Brusselsesteenweg 152
> 1850 Grimbergen
>
> Tel : +32 479 339 655
> Email: info(a)kobaltwit.be
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users(a)lists.xensource.com
> http://lists.xensource.com/xen-users
>
13 years, 10 months
Re: [Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Fri, Nov 13, 2009 at 5:40 AM, Sergey Vlasov <vsu(a)altlinux.ru> wrote:
> On Fri, Nov 13, 2009 at 12:57:22AM +0800, Mr. Teo En Ming (Zhang Enming)
> wrote:
> [...]
> > # VM 11: Rocks 5.1 x86_64 HPC Compute Cluster HVM domU
> >
> > kpartx -av /dev/virtualmachines/rocks0001
> >
> > dd if=/dev/virtualmachines/rocks0001 of=$DEST/rocks0001.mbr bs=512
> count=1
> >
> > partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p1
> > $DEST/virtualmachines-rocks0001p1.img
> >
> > partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p2
> > $DEST/virtualmachines-rocks0001p2.img
> >
> > partimage -d -M -b -z1 save /dev/mapper/virtualmachines-rocks0001p5
> > $DEST/virtualmachines-rocks0001p5.img
>
> Note that this VM (and some other VMs listed in your script) uses
> logical partitions. In this case just saving a copy of MBR will not
> be enough to save partition layout - MBR describes only 4 primary
> partitions, and restoring just MBR will not restore extended
> partitions.
>
> One way to backup the complete partition layout is by saving also
> the output of "sfdisk -d $device"; the resulting file can be used as
> input to sfdisk to restore all partitions, including logical ones.
> Saving MBR is still needed together with sfdisk, because it saves
> the boot code (used for HVM) and CHS geometry information (which can
> be used during boot in some cases).
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkr8gM8ACgkQW82GfkQfsqLa+QCaAqpO5NWhYHtKVi3M5ytERw27
> eC0AnjsJuG34MAR1jZRejBiJCVybQvc1
> =RRGH
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Xen-users mailing list
> Xen-users(a)lists.xensource.com
> http://lists.xensource.com/xen-users
>
Thank you for pointing this out. Otherwise I would made incomplete backups.
Would it be best practice to always backup both the MBR and the partition
geometry using sfdisk whenever cloning our harddisks on desktops and
servers?
Besides sfdisk, there are also other partitioning tools like fdisk, cfdisk,
and parted.
Could these other tools also be used for backing up the partition geometry
like sfdisk?
Thank you.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
13 years, 10 months
Re: [Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Thu, Nov 12, 2009 at 6:37 PM, Fajar A. Nugraha <fajar(a)fajar.net> wrote:
> On Thu, Nov 12, 2009 at 5:10 PM, Mr. Teo En Ming (Zhang Enming)
> <space.time.universe(a)gmail.com> wrote:
> > Hi,
> >
> > I don't think I will be using the LVM snapshot method. I will simply
> ensure
> > that my domU is not running,
>
> Ah, so you can live with the down time. It makes things a lot simpler then.
>
> > then I proceed to do the losetup and kpartx
> > procedure.
>
> Like others mentioned, you don't need losetup for LVs. It will only
> make things slower.
>
> > Subsequently I will backup the MBR of my domU by dd-ing
> > /dev/loopX and clone all the filesystems of the domU using fsarchiver.
> >
> > I would like to use fsarchiver because it can support LZMA compression.
> LZMA
> > can compress better than bzip2 and decompress 3x faster than bzip2.
> > partimage only supports gzip and bzip2.
>
>
> If your concern is the size and speed of backup, here's one final note
> from me: you might want to look at zfs. Possible use scenarios :
> - use opensolaris as dom0. Probably the most supported option when it
> comes to xen + zfs, but you need to be familiar with how opensolaris
> works.
> - use external storage server running solaris/opensolaris as iscsi
> SAN. Think of it as poor-man's Netapp.
> - use zfs-fuse inside Linux dom0, and store domU storage as files
> - use zfs-fuse on domU, and do backup from domU instead of dom0.
>
> With zfs, you'd get zfs snapshot (which is like instaneous in-place
> backup), incremental block-level send (can greatly reduce backup
> storage size if your data doesn't change often), optional transparent
> compression for live data (like what ntfs has).
>
> --
> Fajar
>
I am not familiar with OpenSolaris but that may change with time.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
13 years, 10 months
Re: [Xen-users] How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Thu, Nov 12, 2009 at 6:18 PM, Geert Janssens <info(a)kobaltwit.be> wrote:
> On Thursday 12 November 2009, you wrote:
> > > dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
> >
> > I think if you do this, you are only backing up the first 512 bytes of
> the
> > logical volume, not the MBR.
> >
> > Someone correct me if I am wrong.
>
> I did some tests just to be sure. As far as I can tell, dd interacts with
> lvm
> in exactly the same way as with a physical disk or a loop device.
>
> In the test I copied the first sector directly from the lvm partition or
> via
> the loop device. It results in exactly the same sector being copied.
>
> Also, if you try fdisk -l on the lvm disk or the loop device, it results in
> the same output.
>
> Below is the output from my tests:
>
> [root@aragorn:~]# losetup /dev/loop1 /dev/base/kobaltwit_f11_disk
>
> [root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
>
> Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id
> System
> /dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
> Linux
> [root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
>
> Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id
> System
> /dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
> Linux
>
> [root@aragorn:~]# dd if=/dev/base/kobaltwit_f11_disk of=mbr.lvm bs=512
> count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 7.6e-05 seconds, 6.7 MB/s
>
> [root@aragorn:~]# dd if=/dev/loop1 of=mbr.loop bs=512 count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 0.000151 seconds, 3.4 MB/s
>
> [root@aragorn:~]# diff mbr.l*
> [root@aragorn:~]#
>
> These test seem to indicate to me that the lvm layer in completely
> transparent
> to userland tools such as fdisk or dd.
>
> So I still think the losetup step is superfluous and possibly causing
> unnecessary overhead.
>
> Geert
>
> --
> Kobalt W.I.T.
> Web & Information Technology
> Brusselsesteenweg 152
> 1850 Grimbergen
>
> Tel : +32 479 339 655
> Email: info(a)kobaltwit.be
>
>
Thank you!
I will omit the losetup step.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
13 years, 10 months
Re: How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Thu, Nov 12, 2009 at 10:45 AM, Bryn M. Reeves <bmr(a)redhat.com> wrote:
> On Thu, 2009-11-12 at 09:23 +0000, Mr. Teo En Ming (Zhang Enming) wrote:
> > Hi All,
> >
> > I have several Xen virtual machines within logical volumes using LVM2.
> > I did not use disk images for performance reasons.
> >
> > Conventionally, if I want to clone my virtual machines, I have to dd
> > the LV to an image file. But this consumes a lot of time and harddisk
> > space.
> >
> > So, instead of doing that, I want to use losetup and kpartx with my
> > logical volumes, which contain operating systems of virtual machines.
> >
> > I can backup the filesystems of a virtual machine in this way:
> >
> > # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
>
> What's the point of adding a loopback device on top of the LV? Running
> kpartx on the LV itself will work just fine and this just adds an
> unnecessary layer of overhead and complexity unless I am missing
> something.
>
> > dd if=/dev/hda of=mbr.hda bs=512 count=1
> >
> > Because /dev/hda resides in a logical volume. The logical volume is a
> > virtual harddisk for my virtual machine.
>
> Assuming that the LV given above is a whole-disk image containing a DOS
> MBR partition table:
>
> dd if=/dev/virtualmachines/windows7-x64 of=/tmp.mbr.img bs=512 count=1
>
> You could also do the same with the loopN device that you set up
> earlier, although I still don't see the need for that step.
>
> > 1) re-create the physical volume (PV)
> >
> > 2) re-create the volume group
> >
> > 3) assign the PV to the volume group
> >
> > 4) restore the LVM metadata, i.e. the configuration files for all the
> > logical volumes
> >
> > 5) restore the MBR of my domU
> >
> > 6) restore the filesystems of my domU
>
> Should work fine, just be sure to test each step so that you are
> confident and comfortable with it before you find yourself needing to do
> this in anger.
>
> Regards,
> Bryn.
>
>
> --
> fedora-list mailing list
> fedora-list(a)redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines:
> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>
Hi Bryn,
I have just tried an experiment without the losetup step. I have verified
that it works using kpartx only.
root@sysresccd /root % kpartx -av /dev/virtualmachines/winxphome32
add map virtualmachines-winxphome32p1 (253:22): 0 104840127 linear
/dev/virtualmachines/winxphome32 63
root@sysresccd /root % cd /dev/mapper
root@sysresccd /dev/mapper % ls *winxphome32*
virtualmachines-winxphome32 virtualmachines-winxphome32p1
root@sysresccd /dev/mapper % ls -al *winxphome32*
brw-rw---- 1 root disk 253, 0 2009-11-12 15:49 virtualmachines-winxphome32
brw-rw---- 1 root disk 253, 22 2009-11-12 18:47
virtualmachines-winxphome32p1
root@sysresccd /dev/mapper % ls -al *winxphome32*
brw-rw---- 1 root disk 253, 0 2009-11-12 15:49 virtualmachines-winxphome32
brw-rw---- 1 root disk 253, 22 2009-11-12 18:47
virtualmachines-winxphome32p1
root@sysresccd /dev/mapper % fdisk -l virtualmachines-winxphome32
Disk virtualmachines-winxphome32: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2b362b35
Device Boot Start End Blocks Id
System
virtualmachines-winxphome32p1 * 1 6526 52420063+ 7
HPFS/NTFS
Without the losetup and the corresponding overhead, it will speed up cloning
of my virtual machines within LVs.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
13 years, 10 months
How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
Hi All,
I have several Xen virtual machines within logical volumes using LVM2. I did
not use disk images for performance reasons.
Conventionally, if I want to clone my virtual machines, I have to dd the LV
to an image file. But this consumes a lot of time and harddisk space.
So, instead of doing that, I want to use losetup and kpartx with my logical
volumes, which contain operating systems of virtual machines.
I can backup the filesystems of a virtual machine in this way:
# losetup /dev/loop1 /dev/virtualmachines/windows7-x64
virtualmachines is the name of my volume group.
windows7-x64 is the logical volume.
# kpartx -av /dev/loop1
Then I would see the partitions of the virtual machine within a logical
volume, like so:
/dev/mapper/loop1p1
/dev/mapper/loop1p2
/dev/mapper/loop1p3
Now that I can access the partitions of the virtual machine within a logical
volume, I can use partimage or fsarchiver to backup the partitions (provided
the filesystem is supported by the archiver).
But the problem is that I can only backup/clone the filesystems of my
virtual machine within a logical volume. I can't backup the Master Boot
Record (MBR) of the virtual machine within a logical volume. For example,
dd if=/dev/hda of=mbr.hda bs=512 count=1
Because /dev/hda resides in a logical volume. The logical volume is a
virtual harddisk for my virtual machine.
I would like to know how to backup and also restore the MBR of my virtual
machine/guest operating system/domU within a logical volume because the
losetup and kpartx procedure only allows me access to the partitions, not
the MBR. A complete backup of a virtual machine (and also a bare metal
machine) includes the MBR and all filesystems.
If there is a catastrophic failure with my logical volumes containing domUs,
I would like to
1) re-create the physical volume (PV)
2) re-create the volume group
3) assign the PV to the volume group
4) restore the LVM metadata, i.e. the configuration files for all the
logical volumes
5) restore the MBR of my domU
6) restore the filesystems of my domU
Please advise.
Thank you very much.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
13 years, 10 months