Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
Creating a symlink in /etc/xen/auto that points to the config file of the machine I want to autostart has worked for me in Fedora 8.
IE I store my config files in /etc/xen
ln s /etc/xen/MachineFile /etc/xen/auto/MachineFile
Next time I boot the virtual machine starts right up.
d
_____
From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Marcel Damásio Sent: Friday, June 06, 2008 11:51 AM To: fedora-xen@redhat.com Subject: [Fedora-xen] Autostart VM on boot
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
Ok, but I used virt-install to create the VMs, so I don't have a config file.
Trying this solution I found the config files at /var/lib/xend/domains/, all generated by virt-install automatic.
So I created a symlink in /etc/xen/auto, but this didn't work.
Any other ideas?
Could you send me an example of config file machine that works for testing? I don't know how to create a VM from one.
On Fri, Jun 6, 2008 at 4:13 PM, David Levinger davidl@matissenetworks.com wrote:
Creating a symlink in /etc/xen/auto that points to the config file of the machine I want to autostart has worked for me in Fedora 8.
IE I store my config files in /etc/xen
ln –s /etc/xen/MachineFile /etc/xen/auto/MachineFile
Next time I boot the virtual machine starts right up.
d
*From:* fedora-xen-bounces@redhat.com [mailto: fedora-xen-bounces@redhat.com] *On Behalf Of *Marcel Damásio *Sent:* Friday, June 06, 2008 11:51 AM *To:* fedora-xen@redhat.com *Subject:* [Fedora-xen] Autostart VM on boot
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
I use virt-install to install my vms as well, but when I used virt-manager (to install) I ran into that other directory path that you mentioned.
To install a para-virt example with virt-install I use something like the following:
virt-install --bridge=xenbr0 --name=machinename --ram=1024 --vcpus=1 --file=/dev/vgmachine/lvmachine --paravirt --location=http://1.1.1.1/pathto/ks -x "ks=http://1.1.1.1/config.cfg" --vnc
Below is an example of a Windows VM that I have that is stored in /etc/xen and worked just fine with the symlink method. If youd like a linux example or a para-virt example just let me know.
name = "MachineName"
uuid = "f771623c-acbe-18df-d3a9-e71246c88f2e"
maxmem = 1024
memory = 1024
vcpus = 2
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
disk = [ "phy:/dev/vgcomp/lvmachine,hda,w", "file:/root/bartpe.iso,hdb:cdrom,r" ]
vif = [ "mac=00:00:00:00:00:00,bridge=eth0,type=ioemu" ]
serial = "pty"
_____
From: Marcel Damásio [mailto:marceldamasio@gmail.com] Sent: Friday, June 06, 2008 12:21 PM To: David Levinger Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Autostart VM on boot
Ok, but I used virt-install to create the VMs, so I don't have a config file.
Trying this solution I found the config files at /var/lib/xend/domains/, all generated by virt-install automatic.
So I created a symlink in /etc/xen/auto, but this didn't work.
Any other ideas?
Could you send me an example of config file machine that works for testing? I don't know how to create a VM from one.
On Fri, Jun 6, 2008 at 4:13 PM, David Levinger davidl@matissenetworks.com wrote:
Creating a symlink in /etc/xen/auto that points to the config file of the machine I want to autostart has worked for me in Fedora 8.
IE I store my config files in /etc/xen
ln s /etc/xen/MachineFile /etc/xen/auto/MachineFile
Next time I boot the virtual machine starts right up.
d
_____
From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Marcel Damásio Sent: Friday, June 06, 2008 11:51 AM To: fedora-xen@redhat.com Subject: [Fedora-xen] Autostart VM on boot
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
Hmmm, Does that mean you have to have a config file in two different formats if you are using virsh?
I configure/build my xen domains using virsh. Do I then need an xm compatible file too to have a vm startup? I'm sure not... if I recall correctly if you create a domain via the gui it starts automatically after boot and that only have xml config files but not sure how to "simulate" that if you create the domains using custom xml config files.
Regards
________________________________
From: fedora-xen-bounces@redhat.com on behalf of David Levinger Sent: Fri 2008/06/06 08:33 PM To: 'Marcel Damásio' Cc: fedora-xen@redhat.com Subject: RE: [Fedora-xen] Autostart VM on boot
I use virt-install to install my vm's as well, but when I used virt-manager (to install) I ran into that other directory path that you mentioned.
To install a para-virt example with virt-install I use something like the following:
virt-install --bridge=xenbr0 --name=machinename --ram=1024 --vcpus=1 --file=/dev/vgmachine/lvmachine --paravirt --location=http://1.1.1.1/pathto/ks -x "ks=http://1.1.1.1/config.cfg" --vnc
Below is an example of a Windows VM that I have that is stored in /etc/xen and worked just fine with the symlink method. If you'd like a linux example or a para-virt example just let me know.
name = "MachineName"
uuid = "f771623c-acbe-18df-d3a9-e71246c88f2e"
maxmem = 1024
memory = 1024
vcpus = 2
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
disk = [ "phy:/dev/vgcomp/lvmachine,hda,w", "file:/root/bartpe.iso,hdb:cdrom,r" ]
vif = [ "mac=00:00:00:00:00:00,bridge=eth0,type=ioemu" ]
serial = "pty"
________________________________
From: Marcel Damásio [mailto:marceldamasio@gmail.com] Sent: Friday, June 06, 2008 12:21 PM To: David Levinger Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Autostart VM on boot
Ok, but I used virt-install to create the VMs, so I don't have a config file.
Trying this solution I found the config files at /var/lib/xend/domains/, all generated by virt-install automatic.
So I created a symlink in /etc/xen/auto, but this didn't work.
Any other ideas?
Could you send me an example of config file machine that works for testing? I don't know how to create a VM from one.
On Fri, Jun 6, 2008 at 4:13 PM, David Levinger davidl@matissenetworks.com wrote:
Creating a symlink in /etc/xen/auto that points to the config file of the machine I want to autostart has worked for me in Fedora 8.
IE I store my config files in /etc/xen
ln -s /etc/xen/MachineFile /etc/xen/auto/MachineFile
Next time I boot the virtual machine starts right up.
d
________________________________
From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Marcel Damásio Sent: Friday, June 06, 2008 11:51 AM To: fedora-xen@redhat.com Subject: [Fedora-xen] Autostart VM on boot
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
Hi,
If the guest is created by libvirt (ie virt-install etc.), then I suggest usign virsh to trigger autostarting. Here's what can be done:
emre@xenroot:~$ virsh Connecting to uri: qemu:///system Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands 'quit' to quit
virsh # list --all Id Name State ---------------------------------- 1 Pardus-PV running - Pardus-2008 shut off
virsh # help autostart NAME autostart - autostart a domain
SYNOPSIS autostart [--disable] <domain>
DESCRIPTION Configure a domain to be automatically started at boot.
OPTIONS <domain> domain name, id or uuid --disable disable autostarting
virsh #
This system is running KVM, but it would be the same for XEN. try it out and let us know :)
Emre
On Mon, Jun 9, 2008 at 2:36 PM, Gerrard Geldenhuis < Gerrard.Geldenhuis@datacash.com> wrote:
Hmmm, Does that mean you have to have a config file in two different formats if you are using virsh?
I configure/build my xen domains using virsh. Do I then need an xm compatible file too to have a vm startup? I'm sure not... if I recall correctly if you create a domain via the gui it starts automatically after boot and that only have xml config files but not sure how to "simulate" that if you create the domains using custom xml config files.
Regards
From: fedora-xen-bounces@redhat.com on behalf of David Levinger Sent: Fri 2008/06/06 08:33 PM To: 'Marcel Damásio' Cc: fedora-xen@redhat.com Subject: RE: [Fedora-xen] Autostart VM on boot
I use virt-install to install my vm's as well, but when I used virt-manager (to install) I ran into that other directory path that you mentioned.
To install a para-virt example with virt-install I use something like the following:
virt-install --bridge=xenbr0 --name=machinename --ram=1024 --vcpus=1 --file=/dev/vgmachine/lvmachine --paravirt --location= http://1.1.1.1/pathto/ks -x "ks=http://1.1.1.1/config.cfg" --vnc
Below is an example of a Windows VM that I have that is stored in /etc/xen and worked just fine with the symlink method. If you'd like a linux example or a para-virt example just let me know.
name = "MachineName"
uuid = "f771623c-acbe-18df-d3a9-e71246c88f2e"
maxmem = 1024
memory = 1024
vcpus = 2
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
disk = [ "phy:/dev/vgcomp/lvmachine,hda,w", "file:/root/bartpe.iso,hdb:cdrom,r" ]
vif = [ "mac=00:00:00:00:00:00,bridge=eth0,type=ioemu" ]
serial = "pty"
From: Marcel Damásio [mailto:marceldamasio@gmail.com] Sent: Friday, June 06, 2008 12:21 PM To: David Levinger Cc: fedora-xen@redhat.com Subject: Re: [Fedora-xen] Autostart VM on boot
Ok, but I used virt-install to create the VMs, so I don't have a config file.
Trying this solution I found the config files at /var/lib/xend/domains/, all generated by virt-install automatic.
So I created a symlink in /etc/xen/auto, but this didn't work.
Any other ideas?
Could you send me an example of config file machine that works for testing? I don't know how to create a VM from one.
On Fri, Jun 6, 2008 at 4:13 PM, David Levinger davidl@matissenetworks.com wrote:
Creating a symlink in /etc/xen/auto that points to the config file of the machine I want to autostart has worked for me in Fedora 8.
IE I store my config files in /etc/xen
ln -s /etc/xen/MachineFile /etc/xen/auto/MachineFile
Next time I boot the virtual machine starts right up.
d
From: fedora-xen-bounces@redhat.com [mailto:fedora-xen-bounces@redhat.com] On Behalf Of Marcel Damásio Sent: Friday, June 06, 2008 11:51 AM To: fedora-xen@redhat.com Subject: [Fedora-xen] Autostart VM on boot
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
-- Marcel Damásio Moreira 9º período de Ciência da Computação - UFES (27) 8128-7105 Estagiário do Suporte - DI/UFES
-- Fedora-xen mailing list Fedora-xen@redhat.com https://www.redhat.com/mailman/listinfo/fedora-xen
Emre ERENOGLU wrote:
This system is running KVM, but it would be the same for XEN. try it out and let us know :)
At least for me (Fedora 8) this does not work with Xen:
virsh # autostart server3 libvir: error : this function is not supported by the hypervisor: virDomainSetAutostart error: Failed to mark domain server3 as autostarted
I guess I should grab some more time and convert my Xen build machines to KVM. ;-)
fs
Felix Schwarz wrote:
Emre ERENOGLU wrote:
This system is running KVM, but it would be the same for XEN. try it out and let us know :)
At least for me (Fedora 8) this does not work with Xen:
virsh # autostart server3 libvir: error : this function is not supported by the hypervisor: virDomainSetAutostart error: Failed to mark domain server3 as autostarted
I guess I should grab some more time and convert my Xen build machines to KVM. ;-)
fs
Autostarting xen VM's via libvirt isn't supported in the version in F-8, but it is supported upstream as of about a month ago. You can try building from upstream or wait for a new release to be cut, at which point it may be backported to f-8.
- Cole
Marcel Damásio wrote:
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
Marcel:
Do you have domain definitions in:
/var/lib/xend/domains
Shutdown the xend.
Edit
/var/lib/xend/domains/<UUID>/config.sxp
Add these two lines to the domain definition:
(on_xend_start start) (on_xend_stop shutdown)
Make sure that "xend" and "xendomains" start automatically in your "init.d".
By the way, I also have these actions in my config.sxp and can't remember if these were the default values after virt-install or not.
(actions_after_crash restart) (actions_after_shutdown destroy) (actions_after_reboot restart)
Let me know how it goes for you.
-- Good luck, Aaron
Hi Aaron,
Thanks a lot for helping me. It worked.
I added into *'/var/lib/xend/domains/<UUID>**/config.sxp' *these lines:
* (on_xend_start start) (on_xend_stop shutdown)*
Now, the VMs are really auto starting and shutting down!
Thanks for helping me.
On Mon, Jun 9, 2008 at 6:51 PM, Aaron Metzger ametzger@silkspeed.com wrote:
Marcel Damásio wrote:
Hi,
I'm using Fedora 8 as DOM0. I created my virtual machines using virt-install. Now I want to configure them to autostart on DOM0's boot, but I can't.
I tried a lot of solutions, but none worked.
Could somebody help me?
Marcel:
Do you have domain definitions in:
/var/lib/xend/domains
Shutdown the xend.
Edit
/var/lib/xend/domains/<UUID>/config.sxp
Add these two lines to the domain definition:
(on_xend_start start) (on_xend_stop shutdown)
Make sure that "xend" and "xendomains" start automatically in your "init.d".
By the way, I also have these actions in my config.sxp and can't remember if these were the default values after virt-install or not.
(actions_after_crash restart) (actions_after_shutdown destroy) (actions_after_reboot restart)
Let me know how it goes for you.
-- Good luck, Aaron