FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 07-30-2010, 01:47 PM
Dan Sheffner
 
Default vmbuilder strange outcome

So I run this command with vmbuilder without tmpfs since I want this machine persistent.

vmbuilder kvm ubuntu --suite=lucid --flavour=virtual --arch=amd64 --mirror=http://192.168.1.4/ubuntu -o --libvirt=qemu:///system --ip=192.168.1.50 --gw=192.168.1.1 --part vmbuilder.partition --user=user --name=user --pass=pass --addpkg=wget --addpkg=cron --addpkg=vim --addpkg=ntp --addpkg=ntpdate --addpkg=ssh --addpkg=xvfb --addpkg=build-essential --addpkg=linux-headers-virtual --addpkg=locate --addpkg=postfix --addpkg=vpnc --addpkg=acpid --addpkg=clamav --addpkg=chkrootkit --addpkg=rkhunter --addpkg=apache2 --addpkg=openssl* --mem=512 --hostname=vm00 --bridge=br0


I start the vm and it runs fine:

Then I start another vm that I want to do testing on with tmpfs:

vmbuilder kvm ubuntu --suite=lucid --flavour=virtual --arch=amd64 --mirror=http://192.168.1.4/ubuntu -o --libvirt=qemu:///system --tmpfs=- --ip=192.168.1.51 --gw=192.168.1.1 --part vmbuilder.partition --user=user --name=user --pass=pass --addpkg=wget --addpkg=cron --addpkg=vim --addpkg=ntp --addpkg=ntpdate --addpkg=ssh --addpkg=xvfb --addpkg=build-essential --addpkg=linux-headers-virtual --addpkg=locate --addpkg=postfix --addpkg=vpnc --addpkg=acpid --addpkg=clamav --addpkg=chkrootkit --addpkg=rkhunter* --mem=512 --hostname=vm01 --bridge=br0


I start the vm and it runs fine as well.

I then do a reboot on the actual server running both virtual machines.* When the server comes backup vm01 is running and vm00 is not.* Then when I try to start vm00 I get:


*Id Name**************** State
----------------------------------
* 1 vm01**************** running
* - vm00**************** shut off

virsh # start vm00
error: Failed to start domain vm00
error: monitor socket did not show up.: Connection refused


Maybe I'm missing something trivial.* Please let me know.*

here is my /etc/libvirt/qemu/vm00.xml
<domain type='kvm'>
* <name>vm00</name>
* <uuid>3b7c0ae2-0e01-f6a7-d25a-f830ebf743ee</uuid>

* <memory>524288</memory>
* <currentMemory>524288</currentMemory>
* <vcpu>1</vcpu>
* <os>
*** <type arch='x86_64' machine='pc-0.12'>hvm</type>

*** <boot dev='hd'/>
* </os>
* <features>
*** <acpi/>
* </features>
* <clock offset='utc'/>
* <on_poweroff>destroy</on_poweroff>
* <on_reboot>restart</on_reboot>

* <on_crash>destroy</on_crash>
* <devices>
*** <emulator>/usr/bin/kvm</emulator>
*** <disk type='file' device='disk'>
***** <source file='/root/ubuntu-kvm/tmpqDe91O.qcow2'/>

***** <target dev='hda' bus='ide'/>
*** </disk>
*** <disk type='file' device='disk'>
***** <source file='/root/ubuntu-kvm/tmpDiQKxk.qcow2'/>
***** <target dev='hdb' bus='ide'/>

*** </disk>
*** <interface type='bridge'>
***** <mac address='52:54:00:c0:77:0b'/>
***** <source bridge='br0'/>
***** <model type='virtio'/>
*** </interface>

*** <input type='mouse' bus='ps2'/>
*** <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/>
*** <video>
***** <model type='cirrus' vram='9216' heads='1'/>

*** </video>
* </devices>
</domain>


and my vm01.xml

<domain type='kvm'>
* <name>vm01</name>
* <uuid>8787828a-5312-b16a-b418-ff4aeb899cbd</uuid>

* <memory>524288</memory>
* <currentMemory>524288</currentMemory>
* <vcpu>1</vcpu>
* <os>
*** <type arch='x86_64' machine='pc-0.12'>hvm</type>

*** <boot dev='hd'/>
* </os>
* <features>
*** <acpi/>
* </features>
* <clock offset='utc'/>
* <on_poweroff>destroy</on_poweroff>
* <on_reboot>restart</on_reboot>

* <on_crash>destroy</on_crash>
* <devices>
*** <emulator>/usr/bin/kvm</emulator>
*** <disk type='file' device='disk'>
***** <source file='/root/ubuntu-kvm/tmppPDWFz.qcow2'/>

***** <target dev='hda' bus='ide'/>
*** </disk>
*** <disk type='file' device='disk'>
***** <source file='/root/ubuntu-kvm/tmp3pp8px.qcow2'/>
***** <target dev='hdb' bus='ide'/>

*** </disk>
*** <interface type='bridge'>
***** <mac address='52:54:00:37:07:d1'/>
***** <source bridge='br0'/>
***** <model type='virtio'/>
*** </interface>

*** <input type='mouse' bus='ps2'/>
*** <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/>
*** <video>
***** <model type='cirrus' vram='9216' heads='1'/>

*** </video>
* </devices>
</domain>







--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-30-2010, 02:21 PM
"Serge E. Hallyn"
 
Default vmbuilder strange outcome

Quoting Dan Sheffner (dsheffner@gmail.com):
> I then do a reboot on the actual server running both virtual machines. When
> the server comes backup vm01 is running and vm00 is not. Then when I try to
> start vm00 I get:
>
> Id Name State
> ----------------------------------
> 1 vm01 running
> - vm00 shut off
>
> virsh # start vm00
> error: Failed to start domain vm00
> error: monitor socket did not show up.: Connection refused

Interesting - is there any helpful info under /var/log/libvirt?

> Maybe I'm missing something trivial. Please let me know.

Well it is possible that you are not in group libvirt, and
that you couldn't manually start vm01 either? It was
auto-started after all. What does 'groups' show?

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-30-2010, 05:12 PM
Dan Sheffner
 
Default vmbuilder strange outcome

actually both files for vm00 are gone.* I also tried this again without using tmpfs and got the same results.* It seems like creating the second vm is deleting the files for the first vm.* Is this even possible?



On Fri, Jul 30, 2010 at 9:21 AM, Serge E. Hallyn <serge.hallyn@canonical.com> wrote:


Quoting Dan Sheffner (dsheffner@gmail.com):

> I then do a reboot on the actual server running both virtual machines. *When

> the server comes backup vm01 is running and vm00 is not. *Then when I try to

> start vm00 I get:

>

> *Id Name * * * * * * * * State

> ----------------------------------

> * 1 vm01 * * * * * * * * running

> * - vm00 * * * * * * * * shut off

>

> virsh # start vm00

> error: Failed to start domain vm00

> error: monitor socket did not show up.: Connection refused



Interesting - is there any helpful info under /var/log/libvirt?



> Maybe I'm missing something trivial. *Please let me know.



Well it is possible that you are not in group libvirt, and

that you couldn't manually start vm01 either? *It was

auto-started after all. *What does 'groups' show?



--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-30-2010, 09:18 PM
"Serge E. Hallyn"
 
Default vmbuilder strange outcome

Quoting Dan Sheffner (dsheffner@gmail.com):
> actually both files for vm00 are gone. I also tried this again without
> using tmpfs and got the same results. It seems like creating the second vm
> is deleting the files for the first vm. Is this even possible?
>
>
> On Fri, Jul 30, 2010 at 9:21 AM, Serge E. Hallyn <serge.hallyn@canonical.com
> > wrote:
>
> > Quoting Dan Sheffner (dsheffner@gmail.com):
> > > I then do a reboot on the actual server running both virtual machines.
> > When
> > > the server comes backup vm01 is running and vm00 is not. Then when I try
> > to
> > > start vm00 I get:
> > >
> > > Id Name State
> > > ----------------------------------
> > > 1 vm01 running
> > > - vm00 shut off
> > >
> > > virsh # start vm00
> > > error: Failed to start domain vm00
> > > error: monitor socket did not show up.: Connection refused
> >
> > Interesting - is there any helpful info under /var/log/libvirt?
> >
> > > Maybe I'm missing something trivial. Please let me know.

Doh, yes, something trivial indeed.

At least here on lucid, the vm gets placed inside $CWD/ubuntu.kvm.
That is, the second vmbuilder argument + '.' + the first argument.
You used the same for both When you run the command a second time,
it deletes that directory and creates a new one!

So, my recommendation:

mkdir vm1; cd vm1; (first_vmbuilder_command); cd ..
mkdir vm2; cd vm2; (second_vmbuilder_command); cd ..

Doh.

-serge

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 05:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org