Hi, I''ve created a Windows XP guest on FC7 using xen 3.1 and virt-manager. the installation has been successful thanks to red-hat explanation found here : https://virt.108.redhat.com/articles/2007/01/15/xen-guest-installation.pdf but this installation guide is talking about the guest config file "winxp" placed in /etc/xen. It seems that building a guest with virt-manager doesn''t create a config file. How can I forced virt-manager to generate a config file for my guest?
Daniel P. Berrange
2007-Jun-06 16:11 UTC
Re: [Fedora-xen] virt-manager and guest config file
On Wed, Jun 06, 2007 at 06:07:45PM +0200, mathieu rohon wrote:> Hi, > > I''ve created a Windows XP guest on FC7 using xen 3.1 and virt-manager. > the installation has been successful thanks to red-hat explanation found > here : > https://virt.108.redhat.com/articles/2007/01/15/xen-guest-installation.pdf > > but this installation guide is talking about the guest config file "winxp" > placed in /etc/xen. > It seems that building a guest with virt-manager doesn''t create a config > file.In Fedora 7 / Xen 3.1.0 config files no longer live in /etc/xen. They are managed internally by XenD itself so we have no direct access to them any longer. XenD will store them in /var/lib/xend/domains, but you can''t edit those directly or your changes will be ignored/overwritten by XenD. Dan. -- |=- 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 -=|
Great, thanks for your answer Daniel. So the following logical question is : How can I modify my guests parameters? let''s say, add usb support for example? More generally, can you tell me where this is documented? thanks 2007/6/6, Daniel P. Berrange <berrange@redhat.com>:> > On Wed, Jun 06, 2007 at 06:07:45PM +0200, mathieu rohon wrote: > > Hi, > > > > I''ve created a Windows XP guest on FC7 using xen 3.1 and virt-manager. > > the installation has been successful thanks to red-hat explanation found > > here : > > > https://virt.108.redhat.com/articles/2007/01/15/xen-guest-installation.pdf > > > > but this installation guide is talking about the guest config file > "winxp" > > placed in /etc/xen. > > It seems that building a guest with virt-manager doesn''t create a config > > file. > > In Fedora 7 / Xen 3.1.0 config files no longer live in /etc/xen. They > are managed internally by XenD itself so we have no direct access to > them any longer. XenD will store them in /var/lib/xend/domains, but you > can''t edit those directly or your changes will be ignored/overwritten > by XenD. > > Dan. > -- > |=- 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 -=| >
Richard W.M. Jones
2007-Jun-07 14:31 UTC
Re: [Fedora-xen] virt-manager and guest config file
mathieu rohon wrote:> Great, thanks for your answer Daniel. > > So the following logical question is : How can I modify my guests > parameters? let''s say, add usb support for example?Using virsh, you can do this on an inactive (not running) domain: virsh dumpxml DOMAINNAME > guest.xml vi guest.xml virsh define guest.xml or if you''ve got a really recent version of virsh and you want to just attach a device to a running domain, try the ''virsh attach-device'' command.> More generally, can you tell me where this is documented?The XML is documented here: http://libvirt.org/format.html Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Kanwar Ranbir Sandhu
2007-Jun-15 03:10 UTC
Re: [Fedora-xen] virt-manager and guest config file
On Thu, 2007-06-07 at 15:31 +0100, Richard W.M. Jones wrote:> Using virsh, you can do this on an inactive (not running) domain: > > virsh dumpxml DOMAINNAME > guest.xml > vi guest.xml > virsh define guest.xmlI just tried this, and it didn''t work. I had to "undefine" the guest before I could define it again: ... virsh undefine DOMAINNAME virsh define guest.xml Regards, Ranbir -- Kanwar Ranbir Sandhu Linux 2.6.20-1.2944.fc6 i686 GNU/Linux 23:07:00 up 5 days, 13:55, 5 users, load average: 0.48, 0.66, 0.64
Kanwar Ranbir Sandhu
2007-Jun-17 05:53 UTC
Re: [Fedora-xen] virt-manager and guest config file
On Fri, 2007-06-15 at 09:53 -0400, Hugh Brock wrote:> >> virsh dumpxml DOMAINNAME > guest.xml > >> vi guest.xml > >> virsh define guest.xml > > > > I just tried this, and it didn''t work. I had to "undefine" the guest > > before I could define it again: > > > > Hmm, it should work... what do you mean by "it didn''t work?" Error message?Here''s what happens: 1. I do a a xml dump of the domU: [root@xenmaster xen]# virsh dumpxml asterisk > guest.xml libvir: error : failed to read configuration file /etc/xen/guest.xml Though there''s an error, guest.xml is created and looks okay. 2. I try to define the domU with the xml file I just dumped (after editing the RAM parameters): [root@xenmaster xen]# virsh define guest.xml libvir: error : configuration file syntax error: expecting a name libvir: Xen Daemon error : internal error domain with name already exists error: Failed to define domain from guest.xml I check domU config file, and nothing has changed: the define really did fail. 3. I undefine said domU: [root@xenmaster xen]# virsh undefine asterisk libvir: error : configuration file syntax error: expecting a name Domain asterisk has been undefined The asterisk config has been deleted, so it looks good so far. 4. I again try to define the asterisk domU with the xml file I dumped earlier: [root@xenmaster xen]# virsh define guest.xml libvir: error : configuration file syntax error: expecting a name Domain asterisk defined from guest.xml I check the domU config, and it''s been updated with the changes I made to the xml dump. I hope that helps. Regards, Ranbir -- Kanwar Ranbir Sandhu Linux 2.6.20-1.2944.fc6 i686 GNU/Linux 01:47:34 up 7 days, 16:35, 1 user, load average: 0.78, 0.50, 0.40
Daniel P. Berrange
2007-Jun-17 16:13 UTC
Re: [Fedora-xen] virt-manager and guest config file
On Sun, Jun 17, 2007 at 01:53:49AM -0400, Kanwar Ranbir Sandhu wrote:> On Fri, 2007-06-15 at 09:53 -0400, Hugh Brock wrote: > > >> virsh dumpxml DOMAINNAME > guest.xml > > >> vi guest.xml > > >> virsh define guest.xml > > > > > > I just tried this, and it didn''t work. I had to "undefine" the guest > > > before I could define it again: > > > > > > > Hmm, it should work... what do you mean by "it didn''t work?" Error message? > > Here''s what happens: > > 1. I do a a xml dump of the domU: > > [root@xenmaster xen]# virsh dumpxml asterisk > guest.xml > libvir: error : failed to read configuration file /etc/xen/guest.xml > > Though there''s an error, guest.xml is created and looks okay.Were you in the /etc/xen directory when you ran that command ? It looks like you were since it mentions /etc/xen/guest.xml Basically /etc/xen should only ever contain the master Xen config files. Never create any other type of files in there. In this case the guest.xml file is getting parsed as if it were a Xen config file & thus you see the error.> 2. I try to define the domU with the xml file I just dumped (after editing the RAM parameters): > > [root@xenmaster xen]# virsh define guest.xml > libvir: error : configuration file syntax error: expecting a name > libvir: Xen Daemon error : internal error domain with name already exists > error: Failed to define domain from guest.xml > > I check domU config file, and nothing has changed: the define really did fail.That''s a bug. If you update to the recently released 0.2.3 libvirt RPMs it should be fixed. We pushed them to Fedora last week IIRC, although its possible they''re still only in updates-testing. With the new version you should be able to define the VM, without first having to undefine it. Dan. -- |=- 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 -=|