[Libvir] Create domU without any disks

Daniel P. Berrange berrange at redhat.com
Thu Nov 29 17:59:16 UTC 2007

On Thu, Nov 29, 2007 at 12:54:38PM -0500, Michael DeHaan wrote:
> Richard W.M. Jones wrote:
> >Tim Verhoeven wrote:
> >>I'm working on RHEL5.1 (libvirt-0.2.3-9.el5). I would like to know if
> >>it is possible, using libvirt, to create a Xen PVM domU that has no
> >>disks? And if this is possible how to code this ( a simple example is
> >>ok).
> >
> >Did you try taking the XML, either from another running domain or from 
> >the examples we give[1], and stripping out all the <disk> sections?  I 
> >looked at the code and it ought to work -- if it doesn't, then it's 
> >probably a bug.
> (From IRC), Tim says it works for Xen ... and I just verified that qemu 
> doesn't like it.

Yep, QEMU itself wants at least one disk otherwise it complains bitterly.
One option is '-hda /dev/null' - libvirt should probably add this itself
if no disks are set in the XML.

|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

More information about the libvir-list mailing list