I''m using Xen 3.0 on Fedora Core 5. With VMware ESX, I was able to create a new VM simply by copying the disk image of a previously installed VM and making a few adjustments in the config and networking. Why I try to do the same with Xen, I get an error when I try to boot the new VM. Some error expecting an integer. Then `xm list` shows the original VM loaded twice, when in fact the original is running and and second one which was a copy of the first failed to run. I am copying the file when the original is shutdown. Is there any way to duplicate a working disk image file? Thanks. Glenn _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Jul 28, 2006 at 09:12:39AM -0700, Glenn W. Bach wrote:> Why I try to do the same with Xen, I get an error when I try to > boot the new VM. Some error expecting an integer. > Then `xm list` shows the original VM loaded twice, when in fact the > original is running and and second one which was a copy of > the first failed to run. I am copying the file when the original is shutdown. > > Is there any way to duplicate a working disk image file?It works for me under Debian. I''d suggest the most probably cause is that you''ve not updated the Xen configuration file. To duplicate a Xen guest you need to: 1. Duplicate the disk image, and make appropriate networking changes (as you suggest). 2. Duplicate the /etc/xen/${name}.cfg file. I wonder if you didn''t update the configuration file for the copy? Specifically you''ll want to give it a new "name = " entry. Steve -- http://xen-tools.org/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hmm.... I did change the name, though I now notice that they had the same uuid. Did you change that as well? Is that just a random hex value? Thanks! Glenn Steve Kemp wrote:> On Fri, Jul 28, 2006 at 09:12:39AM -0700, Glenn W. Bach wrote: > >> Why I try to do the same with Xen, I get an error when I try to >> boot the new VM. Some error expecting an integer. >> Then `xm list` shows the original VM loaded twice, when in fact the >> original is running and and second one which was a copy of >> the first failed to run. I am copying the file when the original is shutdown. >> >> Is there any way to duplicate a working disk image file? > > It works for me under Debian. I''d suggest the most probably cause > is that you''ve not updated the Xen configuration file. > > To duplicate a Xen guest you need to: > > 1. Duplicate the disk image, and make appropriate networking > changes (as you suggest). > > 2. Duplicate the /etc/xen/${name}.cfg file. > > I wonder if you didn''t update the configuration file for the copy? > Specifically you''ll want to give it a new "name = " entry. > > Steve_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Jul 28, 2006 at 09:24:16AM -0700, Glenn W. Bach wrote:> Hmm.... I did change the name, though I now notice that they had the > same uuid. Did you change that as well? Is that just a random hex value?I don''t have a uuid line in my configuration files. Try removing it and I expect an appropriate one will be auto-generated. For reference this is a basic configuration file which I''ve copied. The only things I change each time round are the disk images, the IP address and the name: -- kernel = ''/boot/vmlinuz-2.6.16-2-xen-686'' ramdisk = ''/boot/initrd.img-2.6.16-2-xen-686'' memory = ''128'' root = ''/dev/sda1 ro'' disk = [ ''phy:vol/builder.my.flat-disk,sda1,w'', ''phy:vol/builder.my.flat-swap,sda2,w'' ] name = ''builder.my.flat'' vif = [ ''ip=192.168.1.102'' ] on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' -- Steve -- http://www.debian-administration.org/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I removed the uuid, which was apparently just random, and it worked. Thanks! Glenn Steve Kemp wrote:> On Fri, Jul 28, 2006 at 09:24:16AM -0700, Glenn W. Bach wrote: >> Hmm.... I did change the name, though I now notice that they had the >> same uuid. Did you change that as well? Is that just a random hex value? > > I don''t have a uuid line in my configuration files. Try removing > it and I expect an appropriate one will be auto-generated. > > For reference this is a basic configuration file which I''ve copied. > The only things I change each time round are the disk images, the > IP address and the name: > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users