fc xen list
2008-Feb-02 20:48 UTC
[Fedora-xen] what steps are required to manually move a PV domU from one machine to another?
Hi, I am having a problem - I created a lovely bunch of F8 x86_64 domUs and I want to create a vast clone army of them using different dom0s. The problem is, I do: fm # virt-install c1 (no graphics) fm # xm start c1 fm # xm shutdown c1 [ ok I don''t _always_ shut it down :P ] fm # scp -p c1.img othermachine:/var/lib/xen/images then: om1 # virsh define c1.xml om1 # xm start c1 and hangville, if I do: om1 # xmstart c1 -c it seems to hang just after the grub boot menu. I assume I am "doing it wrong" but this worked great in the past. I''ve been selling F8/Xen as the answer to all problems, any help would be appreciated. VMWare looms like a line of dark clouds on the horizon... Thanks.
Daniel P. Berrange
2008-Feb-02 20:57 UTC
Re: [Fedora-xen] what steps are required to manually move a PV domU from one machine to another?
On Sat, Feb 02, 2008 at 12:48:20PM -0800, fc xen list wrote:> Hi, > > I am having a problem - I created a lovely bunch of F8 x86_64 domUs and I > want to create a vast clone army of them using different dom0s. The problem > is, I do: > > fm # virt-install c1 (no graphics) > fm # xm start c1 > fm # xm shutdown c1 [ ok I don''t _always_ shut it down :P ]Welcome to the world of massive data corruption if you copy the disk without shutting down.> fm # scp -p c1.img othermachine:/var/lib/xen/images > then: > om1 # virsh define c1.xmlYou can''t just use the same XML for each - you need to change the UUID, the namem, and disk image in the XML at very least.> om1 # xm start c1 > > and hangville, > if I do: > om1 # xmstart c1 -c > it seems to hang just after the grub boot menu.Define hang ? If the guest is configured with graphical framebuffer it is perfectly expected that you''ll not see anything on the text console while booting.> I assume I am "doing it wrong" but this worked great in the past.You might want to try the ''virt-clone'' tool which will automate much of the stuff. 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 -=|
fc xen list
2008-Feb-02 21:38 UTC
Re: [Fedora-xen] what steps are required to manually move a PV domU from one machine to another?
My bad, the clone army master was on eth0 and the clone army slaves were on eth1 so when I copied the xml dump, I changed everything but that <source bridge=''eth1''/> ugh, but please read below for problems with vanilla F8 and virt-clone. Daniel P. Berrange wrote:> On Sat, Feb 02, 2008 at 12:48:20PM -0800, fc xen list wrote: >> Hi, >> >> I am having a problem - I created a lovely bunch of F8 x86_64 domUs and I >> want to create a vast clone army of them using different dom0s. The problem >> is, I do: >> >> fm # virt-install c1 (no graphics) >> fm # xm start c1 >> fm # xm shutdown c1 [ ok I don''t _always_ shut it down :P ] > > Welcome to the world of massive data corruption if you copy the > disk without shutting down.Yeah, I know, but they are pretty inactive and it has worked great in the past.> >> fm # scp -p c1.img othermachine:/var/lib/xen/images >> then: >> om1 # virsh define c1.xml > > You can''t just use the same XML for each - you need to change the UUID, > the namem, and disk image in the XML at very least.Sorry, I do change that - id, name, image, MAC address, etc.> >> om1 # xm start c1 >> >> and hangville, >> if I do: >> om1 # xmstart c1 -c >> it seems to hang just after the grub boot menu. > > Define hang ? If the guest is configured with graphical framebuffer it > is perfectly expected that you''ll not see anything on the text console > while booting.I always choose no graphics on the virt-install The xm list state is usually --p--> >> I assume I am "doing it wrong" but this worked great in the past. > > You might want to try the ''virt-clone'' tool which will automate much of > the stuff.Thanks for mentioning that, I can''t - my VMs always enter a "no state" state when I shut them down and virt-clone won''t clone them unless they are in a different state that I can''t seem to get them to go into. One confusing thing is xm list and virsh use different terms. In xm list the VM shows as state "------" Example: # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 5143 8 r----- 10708.0 c1 30 1200 1 -b---- 3294.3 c2 28 768 1 -b---- 349.4 c3 34 2465 1 ------ 0.0 # virsh list --all Id Name State ---------------------------------- 0 Domain-0 running 28 m66 blocked 30 m62 blocked - m82 no state I have never had a machine go to any other state, other than "------" (or "no state" in virsh) after a xm shutdown*, should be using some other shutdown method? All my builds are using vanilla F8 x86_64 and virt-install, no custom kernels or other monkey business. A different dom0 with a centos51 and F8 domU that I just did xm shutdown on, they both go to no state: # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 2358 4 r----- 15402.7 d1 7 375 1 -b---- 466.3 c51 22 768 1 ------ 138.9 f8-2 21 512 1 ------ 57.3 [root@sc-t131 ~]# virsh list --all Id Name State ---------------------------------- 0 Domain-0 running 7 d1 blocked - c51 no state - f8-2 no state Example of state during hanging after xm start attempt of c3: # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 5143 8 r----- 10715.6 c1 30 1200 1 -b---- 3294.3 c2 28 768 1 -b---- 349.4 c3 35 2465 1 --p--- 0.0 # virsh list --all Id Name State ---------------------------------- 0 Domain-0 running 28 m66 blocked 30 m62 blocked 35 m82 paused I''d love to use virt-clone...> > Dan.* OK, one goes into "---s-d" but that is upgraded from a previous Fedora version, so I don''t worry about that one. All others are new virt-install installs.
itamar
2008-Feb-02 22:21 UTC
Re: [Fedora-xen] what steps are required to manually move a PV domU from one machine to another?
Can you explain for me how to do this using LVM ? there are a easy way to move a lvm partition from a machine to another over network ? Daniel P. Berrange wrote:> On Sat, Feb 02, 2008 at 12:48:20PM -0800, fc xen list wrote: > >> Hi, >> >> I am having a problem - I created a lovely bunch of F8 x86_64 domUs and I >> want to create a vast clone army of them using different dom0s. The problem >> is, I do: >> >> fm # virt-install c1 (no graphics) >> fm # xm start c1 >> fm # xm shutdown c1 [ ok I don''t _always_ shut it down :P ] >> > > Welcome to the world of massive data corruption if you copy the > disk without shutting down. > > >> fm # scp -p c1.img othermachine:/var/lib/xen/images >> then: >> om1 # virsh define c1.xml >> > > You can''t just use the same XML for each - you need to change the UUID, > the namem, and disk image in the XML at very least. > > >> om1 # xm start c1 >> >> and hangville, >> if I do: >> om1 # xmstart c1 -c >> it seems to hang just after the grub boot menu. >> > > Define hang ? If the guest is configured with graphical framebuffer it > is perfectly expected that you''ll not see anything on the text console > while booting. > > >> I assume I am "doing it wrong" but this worked great in the past. >> > > You might want to try the ''virt-clone'' tool which will automate much of > the stuff. > > Dan. >
Olivier Renault
2008-Feb-04 08:27 UTC
Re: [Fedora-xen] what steps are required to manually move a PV domU from one machine to another?
itamar wrote:> Can you explain for me how to do this using LVM ? > > > there are a easy way to move a lvm partition from a machine to another > over network ? > >You can easily do it with dd. Create your LV on the host you would like to copy the VM to. dd if=/dev/rootvg/guest1 | ssh newhost dd of=/dev/rootvg/copyguest1 Regards, Olivier> > > > Daniel P. Berrange wrote: >> On Sat, Feb 02, 2008 at 12:48:20PM -0800, fc xen list wrote: >> >>> Hi, >>> >>> I am having a problem - I created a lovely bunch of F8 x86_64 domUs >>> and I want to create a vast clone army of them using different dom0s. >>> The problem is, I do: >>> >>> fm # virt-install c1 (no graphics) >>> fm # xm start c1 >>> fm # xm shutdown c1 [ ok I don''t _always_ shut it down :P ] >>> >> >> Welcome to the world of massive data corruption if you copy the >> disk without shutting down. >> >> >>> fm # scp -p c1.img othermachine:/var/lib/xen/images >>> then: >>> om1 # virsh define c1.xml >>> >> >> You can''t just use the same XML for each - you need to change the UUID, >> the namem, and disk image in the XML at very least. >> >> >>> om1 # xm start c1 >>> >>> and hangville, >>> if I do: >>> om1 # xmstart c1 -c >>> it seems to hang just after the grub boot menu. >>> >> >> Define hang ? If the guest is configured with graphical framebuffer it >> is perfectly expected that you''ll not see anything on the text console >> while booting. >> >> >>> I assume I am "doing it wrong" but this worked great in the past. >>> >> >> You might want to try the ''virt-clone'' tool which will automate much of >> the stuff. >> >> Dan. >> > > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen >-- Red Hat France SARL, 171 Avenue Georges Clemenceau, 92024 Nanterre Cedex, France. Siret n° 421 199 464 00056