I''m on F8, and decided to have a go a creating a PV guest on LVM (x86_64 F8 DomU on x86_64 F8 Dom0) using virt-install. virt-manager doesn''t appear to do anything on my (out-of-the-box) F8 Dom0; you just enter a root password, and the GUI disappears. I''ve already done a couple of other guests ''manually'' on this DomU, without problems. It took me a few hours to get through installation, because of various problems with NFS firewalls, DNS problems, and so on. I had to abort the install several times. when this happened, my previous VM name was ''used up''. xm list showed a zombie domain with that name, even if the installation had barely started. I couldn''t start a new installation with the same name, because virt-install complained that the VM already existed. So, I Googled around, found others with the same problem, and found out that I could remove the zombie entry with ''virsh undefine''. I eventually created a VM with the correct name, which ran Ok, and shut down the machine. This morning I turned on the box, did an ''xm list'', and found what appeared to be a zombie with the new VM name (no ID, no status; just a name). So, I virsh undefined it. This seems to have been a big mistake. I then discovered that virt-install doesn''t create a config file, and there was nothing in /var/lib/xend/domains, presumably because of the undefine (none of this is documented in Fedora7VirtQuickStart, by the way). How do I get my VM back? Is there some way to get the XML config back? If not, is my only option to manually make an /etc/xen config file? There''s a little bit of information in xend.log which I could use for the config file. Finally, I''m (very) confused about what exactly is ''Xen'' and what exactly is ''Fedora''. You seem to have done various things which I''m guessing are Fedora-specific, but which don''t seem to be documented (I''ve had a lot of trouble with /etc/inittab, for example). Is this documented somewhere? And am I going to run into any problems if I convert a virt-install domain back to plain-old-Xen? Thanks - Evan
Evan Lavelle wrote:> How do I get my VM back? Is there some way to get the XML config back? > If not, is my only option to manually make an /etc/xen config file?There don''t seem to be any surprises in the VM, and a trivial config file boots it. For anyone else who comes this way, and doesn''t know how to do this, the config file is: # -*- mode: python; -*- name = "fc8-64-001" memory = 1024 vcpus = 1 vif = [ ''mac=00:0f:b5:ae:4f:2b, bridge=xenbr0'' ] disk = [ ''phy:/dev/VG_Guests/FC8-64-001,hda,w'' ]; bootloader ="/usr/bin/pygrub" boot = "cd" sdl = 1 vnc = 0 1 - name this file (for example) fc8-64.pv (the name doesn''t matter) 2 - put it in /etc/xen 3 - change the VM name ("fc8-64-001") to whatever you want, as long as all your VM names are unique 4 - the memory line is the maximum to allocate to this VM, in MB (this config is for 1GB. 512MB is common, but don''t make it less than about 256MB) 5 - ''vcpus'' is the number of CPUs to allocate to this VM; it defaults to 1 anyway. I''m running on dual-core, so I allocate one to the current DomU, and one to Dom0 6 - the MAC address is optional; you''ll get a random one if you delete everything before ''bridge'' 7 - substitute ''/dev/VG_Guests/FC8-64-001'' for whatever the path to your device or image file is (for example, /var/lib/xen/images/myimage) 8 - start your VM with # /usr/sbin/xm create -c fc8-64.pv 9 - xm searches for ''fc8-64.pv'' in /etc/xen (or you can put it somewhere else and supply a full path). the ''-c'' turns your shell into the DomU console. you''ll see the DomU grub loader screen. You need to select the Xen kernel; not the stock kernel. This will be selected by default anyway, if you leave it long enough. 10 - the boot messages appear on the console; you''ll get a window on the Dom0 when booting completes. Evan
On Sat, Dec 29, 2007 at 03:08:00PM +0000, Evan Lavelle wrote:> I''m on F8, and decided to have a go a creating a PV guest on LVM (x86_64 > F8 DomU on x86_64 F8 Dom0) using virt-install. virt-manager doesn''t > appear to do anything on my (out-of-the-box) F8 Dom0; you just enter a > root password, and the GUI disappears. I''ve already done a couple of > other guests ''manually'' on this DomU, without problems. > > It took me a few hours to get through installation, because of various > problems with NFS firewalls, DNS problems, and so on. I had to abort the > install several times. when this happened, my previous VM name was ''used > up''. xm list showed a zombie domain with that name, even if the > installation had barely started. I couldn''t start a new installation > with the same name, because virt-install complained that the VM already > existed. > > So, I Googled around, found others with the same problem, and found out > that I could remove the zombie entry with ''virsh undefine''. I eventually > created a VM with the correct name, which ran Ok, and shut down the machine. > > This morning I turned on the box, did an ''xm list'', and found what > appeared to be a zombie with the new VM name (no ID, no status; just a > name). So, I virsh undefined it.You should ''virsh destroy'' zombies, rather than ''virsh undefine''. ''Destroy'' will forcably kill the VM. ''Undefine'' merely removes its config file.> This seems to have been a big mistake. I then discovered that > virt-install doesn''t create a config file, and there was nothing in > /var/lib/xend/domains, presumably because of the undefine (none of this > is documented in Fedora7VirtQuickStart, by the way).virt-install *does* create a config file. You explicitly deleted the config file by running ''virsh undefine''. The config files are managed by XenD in /var/lib/xend/domains, /etc/xen is a legacy location no longer used by default from Xen 3.0.4 and later.> How do I get my VM back? Is there some way to get the XML config back?Check /root/.virt-install/virt-install.log where you may well have a copy of the config file in the logs> If not, is my only option to manually make an /etc/xen config file? > There''s a little bit of information in xend.log which I could use for > the config file.Re-run ''virt-install'' with the same parameters and pointing to your existing installed disk image. When the installer pops up, instead of going through the install process, simply ''virsh destroy'' to shutdown the guest VM. You should now have a config file for the guest again.> Finally, I''m (very) confused about what exactly is ''Xen'' and what > exactly is ''Fedora''. You seem to have done various things which I''m > guessing are Fedora-specific, but which don''t seem to be documented > (I''ve had a lot of trouble with /etc/inittab, for example). Is this > documented somewhere? And am I going to run into any problems if I > convert a virt-install domain back to plain-old-Xen?There''s no difference between a VM created by ''virt-install'' and one created another way. If you use the same VM config params in both approaches you''ll end up with the same VM. libvirt & virt-install ultimately talk to the same underlying XenD APIs as any other tool. libvirt is simply exposing an API / toolset which is not Xen-specific / portable to virtualization like QEMU, KVM, OpenVZ etc Regards, 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 -=|