jim burns
2008-Feb-24 15:53 UTC
Fwd: Re: [Xen-users] Xen 3.1, Fedora 8 and PCI passthrough
---------- Forwarded Message ---------- Subject: Re: [Xen-users] Xen 3.1, Fedora 8 and PCI passthrough Date: Sunday 24 February 2008 From: jim burns <jim_burn@bellsouth.net> To: deshantm@gmail.com On Friday 22 February 2008 09:34:17 pm Todd Deshane wrote:> The configuration in both python and SXP format is covered in the xen user > manual [0]. > > Fedora still does make a config file, I don''t have a system on hand to > check the location of it. > > According to this post [1] there are in /var/lib/xend/domains > > [0] > http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/user.html#SECTI >ON03230000000000000000 [1] > http://forums.fedoraforum.org/showthread.php?t=179944I''ve never found a flat config file on fedora, after using virt-manager. Here''s an example of a dumpxml file, and then the flat config file I created from it. Just remove any references to the currently running vm, like the domain id, pty, etc. from the xml file, and put the flat config file in /etc/xen (otherwise you need to specify the complete path to ''xm''. xml: <domain type=''xen''> <name>fc8</name> <uuid>10461fc0-adac-ef4b-e6d6-b27d95ac9b24</uuid> <bootloader>/usr/bin/pygrub</bootloader> <os> <type>linux</type> </os> <memory>524288</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <interface type=''bridge''> <mac address=''00:16:3e:1f:12:dd''/> <script path=''vif-bridge''/> </interface> <disk type=''file'' device=''disk''> <driver name=''tap'' type=''aio''/> <source file=''/var/lib/xen/images/fc8''/> <target dev=''xvda''/> </disk> <graphics type=''vnc'' port=''-1'' keymap=''en-us'' /> <console protocol=''vt100'' /> </devices> </domain> and flat config: name=''fc8'' memory=512 uuid=''10461fc0-adac-ef4b-e6d6-b27d95ac9b24'' bootloader=''/usr/bin/pygrub'' on_poweroff=''destroy'' on_reboot=''restart'' on_crash=''restart'' vcpu=1 disk=[ ''tap:aio:/var/lib/xen/images/fc8,xvda,w'' ] vif=[ ''mac=00:16:3e:1f:12:dd'' ] vfb=[ ''type=vnc, keymap=en-us, vnclisten=0.0.0.0, vncunused=1'' ] vncconsole=1 stdvga=1 usbdevice=''tablet'' extra = ''xencons=tty'' The stdvga parm will give you 640x480, besides the normal 800x600. The usbdevice parm needs to be supplemented by the instructions in the xen docs mentioned above, in the section ''A.4.3 Mouse issues, especially under VNC''. I find the method that worked for me was the ''USB tablet over USB port.'' one. It tells you to go to another url for the general download and config instructions, but to replace part of the xorg.conf in the domu with the stanza given in the xen docs. I found that even after this change, I still had to change the MaxX and MaxY parms to match the *current* resolution in the domu, which means that every time you change the resolution, you have to change MaxX/Y. Also, the ''Identifier "Tablet"'' statement has to be changed to ''Identifier "touchscreen"''. Good luck. ------------------------------------------------------- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Kenneth Lundström
2008-Feb-25 15:48 UTC
Re: Fwd: Re: [Xen-users] Xen 3.1, Fedora 8 and PCI passthrough
Hello everybody, thank you very much for your help so far. Only config file (in Fedora 8) I´ve found is located in /var/lib/xend/domains/UUID/config.sxp To get the NIC found in geust I added the following text (device (pci (dev (domain 0) (bus 04) (slot 00) ) ) ) After I have started the guest once the text i rewritten like this: (device ((uuid 8b227afe-1b04-ab6a-4071-21d53dfb4254) (dev (slot 00) (bus 04) (domain 0)) ) ) If I do a dumpxml I get the following: <domain type=''xen'' id=''1''> <name>Test</name> <uuid>9a795b3f-21cc-4b63-9399-c86aca5ad6ba</uuid> <bootloader>/usr/bin/pygrub</bootloader> <os> <type>linux</type> </os> <memory>524288</memory> <vcpu>1</vcpu> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <interface type=''bridge''> <source bridge=''eth1''/> <target dev=''vif1.0''/> <mac address=''00:16:3e:60:78:57''/> <script path=''vif-bridge''/> </interface> <disk type=''file'' device=''disk''> <driver name=''file''/> <source file=''/home/xen/test.img''/> <target dev=''xvda''/> </disk> <input type=''mouse'' bus=''xen''/> <graphics type=''vnc'' port=''5900''/> <console tty=''/dev/pts/3''/> </devices> </domain> The interface section is as I understand wrong because the guest is now using the PCI NIC directly, not via a bridge. If I try to shutdown the guest it never stops, in virt-manager it says Running and if i try in virsh shutdown test it says Domain test is being shutdown. If I now restart the computer and then open virt-manager my test domain is nowhere to be found. I have to edit the config.sxp file and remove the section about the NIC. I insert my own text and then my domain is back again. Is there a way to find out what the problem might be? Kenneth Lundström _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
jim burns
2008-Feb-25 22:29 UTC
Re: Fwd: Re: [Xen-users] Xen 3.1, Fedora 8 and PCI passthrough
On Monday 25 February 2008 10:48:42 am Kenneth Lundström wrote:> If I now restart the computer and then open virt-manager my test domain > is nowhere to be found. I have to edit the config.sxp file and remove > the section about the NIC. I insert my own text and then my domain is > back again. Is there a way to find out what the problem might be?It''s probably not a great idea to edit the UUID/config.sxp, and definitely not when the guest is running. This points out the different styles virt-manager and the usual ''xm'' usage employ. When you create a domain in virt-manager / virt-install, it does the equivalent of a ''virsh define xmlfile'', which creates your UUID/config.sxp. Then to start the guest, the gui does the equivalent of ''virsh start domain-name(as defined in the xml file)''. When you shutdown, virt-manager still has the definition until you do a ''virsh undefine ...''. (The corresponding xm commands are xm new, xm start, and xm delete.) The user who uses xm instead of a gui typically uses xm create, and xm destroy or shutdown (or shuts down gracefully from within the guest), which leaves no residual trace of the domain in the xenstore databases. It''s always a good idea to have copies of the dumpxml, or the flat config you created from it, in case the xenstore definitions disappear, or are corrupted (in which case you erase /var/lib/xend/domains/UUID after rebooting into a non-xen kernel). The difference between the dumpxml and the flat config is which command you create the domain with. virsh define/create uses xml, xm new/create uses the flat config. I personally always create a domain from a config, which is backed up along with everything else important, and don''t worry about whether xen will remember my domain''s definition w/o corruption in it''s database. Also, having a config you can edit allows you to add more advanced features (like pci passthrough) that the gui can''t handle. Editing a database is, again, probably a bad idea. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
jim burns
2008-Feb-25 22:42 UTC
Re: Fwd: Re: [Xen-users] Xen 3.1, Fedora 8 and PCI passthrough
On Monday 25 February 2008 10:48:42 am Kenneth Lundström wrote:> Kenneth LundströmThen, after you have added all the advanced features you want to your xml or flat config file, and you have tested them out with xm/virsh create, if you prefer using a gui, then you can shutdown the guest, do a ''virsh define xml-config'' or ''xm new flat-config'', and voila! - You can use the gui (virt-manager) again. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users