LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-19-2010, 02:35 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
How to use QEMU with LVM


I am having a small confusion which I do not know how to get rid of.
I am using QEMU
I did
Code:
Code:
dd of=hd.img bs=1024 seek=6000000 count=0
 qemu-system-x86-64  -boot d -cdrom /dev/cdrom  -hda hd.img
Every thing is working perfectly find as desired.I am able to install.
But
1) I want to use an LVM instead of hard disk image.
2) and want to export this QEMU installation to use on Xen.
This I am not clear with LVM part specially.
There is no LVM right now existing for QEMU I know how to create LVM's
but in this case how do I proceed.
 
Old 05-19-2010, 11:44 AM   #2
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by tkmsr View Post
I am having a small confusion which I do not know how to get rid of.
I am using QEMU
I did
Code:
Code:
dd of=hd.img bs=1024 seek=6000000 count=0
 qemu-system-x86-64  -boot d -cdrom /dev/cdrom  -hda hd.img
Every thing is working perfectly find as desired.I am able to install.
But
1) I want to use an LVM instead of hard disk image.
2) and want to export this QEMU installation to use on Xen.
This I am not clear with LVM part specially.
There is no LVM right now existing for QEMU I know how to create LVM's
but in this case how do I proceed.
I don't think Qemu itself needs to support LVM directly, once the guest supports it (in the kernel). Thus you use Qemu to create a raw disk image for your guest and then use your guest OS to create your Logical Volumes on this raw image. Qemu doesn't need to be directly involved in the LVM setup on the guest as far as I know. You don't use a raw hard disk image OR LVM; you use LVM as a layer *on top* of your raw disk image. And the LVM part of it is controlled by the guest OS, not Qemu. So you need to make sure your guest OS has the LVM userspace tools installed.

System Rescue CD has a nice guide to LVM - perhaps it will help.

http://www.sysresccd.org/Sysresccd-Guide-EN-LVM2
 
Old 05-19-2010, 02:13 PM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
When bringing the VM up, simply specify an LV instead of a file as the disk attached
 
Old 05-19-2010, 02:22 PM   #4
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Okay.But while doing so I found that during installation if I am giving one of them as LVM then they are not accepting mount point as root.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 03:36 AM
After qemu-img, qemu is not capable to detect the C drive (empty) frenchn00b Linux - General 3 10-18-2009 05:39 AM
lvm ontop of raid10 or combine two raid1 via lvm? okar Linux - Server 3 09-11-2009 02:37 PM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
qemu: qemu stopped right after command exec bitpicker Linux - Software 1 03-04-2005 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration