All of lore.kernel.org
 help / color / mirror / Atom feed
* network boot always enabled with 0.15.0
@ 2011-08-11  8:55 Dietmar Maurer
  2011-08-11  9:05 ` Gleb Natapov
  0 siblings, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11  8:55 UTC (permalink / raw)
  To: kvm

If I use '-boot order=cd' the VM still tries to boot from network. Is that expected? If so, how can I disable network boot?

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11  8:55 network boot always enabled with 0.15.0 Dietmar Maurer
@ 2011-08-11  9:05 ` Gleb Natapov
  2011-08-11  9:12   ` Dietmar Maurer
  0 siblings, 1 reply; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11  9:05 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 08:55:37AM +0000, Dietmar Maurer wrote:
> If I use '-boot order=cd' the VM still tries to boot from network. Is that expected? If so, how can I disable network boot?
> 
Does it tries it only when c & d are not bootable or always?

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11  9:05 ` Gleb Natapov
@ 2011-08-11  9:12   ` Dietmar Maurer
  2011-08-11  9:38     ` Gleb Natapov
  0 siblings, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11  9:12 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> Does it tries it only when c & d are not bootable or always?

Only if c &d are not bootable. 

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11  9:12   ` Dietmar Maurer
@ 2011-08-11  9:38     ` Gleb Natapov
  2011-08-11  9:56       ` Dietmar Maurer
  2011-08-11 10:13       ` Dietmar Maurer
  0 siblings, 2 replies; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11  9:38 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 09:12:42AM +0000, Dietmar Maurer wrote:
> > Does it tries it only when c & d are not bootable or always?
> 
> Only if c &d are not bootable. 
> 
Then it is expected (as in "this is how code works currently"). Why
would you want to disable network boot if other method failed?

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11  9:38     ` Gleb Natapov
@ 2011-08-11  9:56       ` Dietmar Maurer
  2011-08-11 10:25         ` Gleb Natapov
  2011-08-11 10:13       ` Dietmar Maurer
  1 sibling, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11  9:56 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> Then it is expected (as in "this is how code works currently"). Why would you
> want to disable network boot if other method failed?

Because I do not want to start/install a new VM only because I have some other error. Also, I think the behavior was different with earlier versions.

For example, if I set 'boot order=d' (boot from cdrom) and there is no cdrom in the drive slot. Then the VM will boot from the network an our windows installation server (RIS/WDS) will automatically trash all data on the VM disk. That is quite dangerous.

- Dietmar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11  9:38     ` Gleb Natapov
  2011-08-11  9:56       ` Dietmar Maurer
@ 2011-08-11 10:13       ` Dietmar Maurer
  2011-08-11 10:26         ` Gleb Natapov
  1 sibling, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11 10:13 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> Then it is expected (as in "this is how code works currently"). Why would you
> want to disable network boot if other method failed?

If  I start kvm with:

# kvm -boot order=cad

The it tries to boot: cdrom, net, disk, floppy (dnca)

So the boot order is completely wrong!

But the order is correct with kvm 0.14.1

- Dietmar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11  9:56       ` Dietmar Maurer
@ 2011-08-11 10:25         ` Gleb Natapov
  2011-08-11 10:33           ` Dietmar Maurer
  0 siblings, 1 reply; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 10:25 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 09:56:37AM +0000, Dietmar Maurer wrote:
> > Then it is expected (as in "this is how code works currently"). Why would you
> > want to disable network boot if other method failed?
> 
> Because I do not want to start/install a new VM only because I have some other error.
Why would you automatically start install on any computer that does
network boot? You can configure PXE server to not do that.

> Also, I think the behavior was different with earlier versions.
Yes, it was. The behaviour changed when bootindex was introduced. I
think it should be easy to switch it back to what it was for -boot
option, but -boot is/should be deprecated in favor of bootindex anyway.
Implementing opt out from boot process for bootindex is doable but more
involving.

> 
> For example, if I set 'boot order=d' (boot from cdrom) and there is no cdrom in the drive slot. Then the VM will boot from the network an our windows installation server (RIS/WDS) will automatically trash all data on the VM disk. That is quite dangerous.
> 
One can argue that having such brokenly configured server in your
network is dangerous anyway. What about physical computer that can be
trashed before you even realize you had to disable network booting in
the BIOS?

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 10:13       ` Dietmar Maurer
@ 2011-08-11 10:26         ` Gleb Natapov
  0 siblings, 0 replies; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 10:26 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 10:13:15AM +0000, Dietmar Maurer wrote:
> > Then it is expected (as in "this is how code works currently"). Why would you
> > want to disable network boot if other method failed?
> 
> If  I start kvm with:
> 
> # kvm -boot order=cad
> 
> The it tries to boot: cdrom, net, disk, floppy (dnca)
> 
That looks like a bug.

> So the boot order is completely wrong!
> 
> But the order is correct with kvm 0.14.1
> 
> - Dietmar
> 

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 10:25         ` Gleb Natapov
@ 2011-08-11 10:33           ` Dietmar Maurer
  2011-08-11 10:50             ` Gleb Natapov
  0 siblings, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11 10:33 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> > Also, I think the behavior was different with earlier versions.
> Yes, it was. The behaviour changed when bootindex was introduced. I think it
> should be easy to switch it back to what it was for -boot option, but -boot
> is/should be deprecated in favor of bootindex anyway.
> Implementing opt out from boot process for bootindex is doable but more
> involving.

But I found no way to disable booting a network device using bootindex - you can 
just set the order with that.

> > For example, if I set 'boot order=d' (boot from cdrom) and there is no cdrom in
> the drive slot. Then the VM will boot from the network an our windows
> installation server (RIS/WDS) will automatically trash all data on the VM disk.
> That is quite dangerous.
> >
> One can argue that having such brokenly configured server in your network is
> dangerous anyway. What about physical computer that can be trashed before
> you even realize you had to disable network booting in the BIOS?

All hardware I know does not boot from network if I have disabled it - that's exactly the point!
I want to disable network boot, so how can I do that?

- Dietmar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 10:33           ` Dietmar Maurer
@ 2011-08-11 10:50             ` Gleb Natapov
  2011-08-11 11:29               ` Dietmar Maurer
  0 siblings, 1 reply; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 10:50 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 10:33:47AM +0000, Dietmar Maurer wrote:
> > > Also, I think the behavior was different with earlier versions.
> > Yes, it was. The behaviour changed when bootindex was introduced. I think it
> > should be easy to switch it back to what it was for -boot option, but -boot
> > is/should be deprecated in favor of bootindex anyway.
> > Implementing opt out from boot process for bootindex is doable but more
> > involving.
> 
> But I found no way to disable booting a network device using bootindex - you can 
> just set the order with that.
> 
Yes. It has to be implemented. Currently BIOS assigns default boot
priority for all devices that do not have bootindex specified. So
bootindex only influence the order in which BIOS will try devices
for booting. This way if you have 10 devices you want BIOS to try to boot
from in no particular order and one device that you want it to try first
you do not need to specify 11 bootindex parameters, but only one (or if
you do not care about the order you don't need to specify anything). We
can change BIOS to only boot from devices that has bootindex, but then
you will have to always specify it for all/most devices, or we can
add noboot device property, but that will require changes on qemu side
too.

> > > For example, if I set 'boot order=d' (boot from cdrom) and there is no cdrom in
> > the drive slot. Then the VM will boot from the network an our windows
> > installation server (RIS/WDS) will automatically trash all data on the VM disk.
> > That is quite dangerous.
> > >
> > One can argue that having such brokenly configured server in your network is
> > dangerous anyway. What about physical computer that can be trashed before
> > you even realize you had to disable network booting in the BIOS?
> 
> All hardware I know does not boot from network if I have disabled it - that's exactly the point!
With RIS/WDS server like above you may find out that you had to disable
network booting to later. I am not arguing that you can't disable network
booting on real HW, I am claiming that having such server in the network
is not good idea regardless.

> I want to disable network boot, so how can I do that?
> 
The only way you can do that currently is to use bios.bin from qemu-0.14.
The problem is mostly in the BIOS, not qemu.

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 10:50             ` Gleb Natapov
@ 2011-08-11 11:29               ` Dietmar Maurer
  2011-08-11 11:48                 ` Gleb Natapov
  0 siblings, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11 11:29 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> We can change BIOS to only boot from devices that has bootindex, but then you
> will have to always specify it for all/most devices, or we can add noboot device
> property, but that will require changes on qemu side too.

I guess 'noboot' is the way to go. We already have that for disks.

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 11:29               ` Dietmar Maurer
@ 2011-08-11 11:48                 ` Gleb Natapov
  2011-08-11 11:57                   ` Dietmar Maurer
  0 siblings, 1 reply; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 11:48 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 11:29:29AM +0000, Dietmar Maurer wrote:
> > We can change BIOS to only boot from devices that has bootindex, but then you
> > will have to always specify it for all/most devices, or we can add noboot device
> > property, but that will require changes on qemu side too.
> 
> I guess 'noboot' is the way to go. We already have that for disks.
> 

Agree. noboot sounds optimal, but also requires more codding that other
options (sigh, isn't it always this way?). But how do we have it for
disks?

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 11:48                 ` Gleb Natapov
@ 2011-08-11 11:57                   ` Dietmar Maurer
  2011-08-11 12:06                     ` Gleb Natapov
  0 siblings, 1 reply; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11 11:57 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> Agree. noboot sounds optimal, but also requires more codding that other
> options (sigh, isn't it always this way?). But how do we have it for disks?

-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]
       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]
       [,cache=writethrough|writeback|none|unsafe][,format=f]
       [,serial=s][,addr=A][,id=name][,aio=threads|native]
       [,readonly=on|off][,boot=on|off]

I thought 'boot=off' would do exactly that.

- Dietmar



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 11:57                   ` Dietmar Maurer
@ 2011-08-11 12:06                     ` Gleb Natapov
  2011-08-11 13:57                       ` Dietmar Maurer
  2011-08-12  7:10                       ` Dietmar Maurer
  0 siblings, 2 replies; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 12:06 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 11:57:28AM +0000, Dietmar Maurer wrote:
> > Agree. noboot sounds optimal, but also requires more codding that other
> > options (sigh, isn't it always this way?). But how do we have it for disks?
> 
> -drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]
>        [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]
>        [,cache=writethrough|writeback|none|unsafe][,format=f]
>        [,serial=s][,addr=A][,id=name][,aio=threads|native]
>        [,readonly=on|off][,boot=on|off]
> 
> I thought 'boot=off' would do exactly that.
> 

No, this boot= option is deprecated too. AFAIK boot=off does (and always
did) nothing.  boot=on tells qemu to boot from the disk using extboot
option rom. This was needed to boot from virtio disks. Now SeaBIOS can
boot from virtio disk natively, so extboot no longer needed. But due
to the ways BIOS boot specification is written only one disk can be
bootable in the system, so if one disk has bootindex specified other
disks will not participate in the boot even if the disk with bootindex
specified is not bootable.

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 12:06                     ` Gleb Natapov
@ 2011-08-11 13:57                       ` Dietmar Maurer
  2011-08-11 13:59                         ` Gleb Natapov
  2011-08-11 16:59                         ` Gerd Hoffmann
  2011-08-12  7:10                       ` Dietmar Maurer
  1 sibling, 2 replies; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-11 13:57 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> No, this boot= option is deprecated too. AFAIK boot=off does (and always
> did) nothing.  boot=on tells qemu to boot from the disk using extboot option
> rom. This was needed to boot from virtio disks. Now SeaBIOS can boot from
> virtio disk natively, so extboot no longer needed. But due to the ways BIOS boot
> specification is written only one disk can be bootable in the system, so if one
> disk has bootindex specified other disks will not participate in the boot even if
> the disk with bootindex specified is not bootable.

Thanks for that info.

Another possibility to disable network boot would be to avoid loading 
the pxe-XXX.rom network boot ROMs. Or is that a bad idea?

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 13:57                       ` Dietmar Maurer
@ 2011-08-11 13:59                         ` Gleb Natapov
  2011-08-11 21:37                           ` Michael Tokarev
  2011-08-11 16:59                         ` Gerd Hoffmann
  1 sibling, 1 reply; 20+ messages in thread
From: Gleb Natapov @ 2011-08-11 13:59 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: kvm

On Thu, Aug 11, 2011 at 01:57:04PM +0000, Dietmar Maurer wrote:
> > No, this boot= option is deprecated too. AFAIK boot=off does (and always
> > did) nothing.  boot=on tells qemu to boot from the disk using extboot option
> > rom. This was needed to boot from virtio disks. Now SeaBIOS can boot from
> > virtio disk natively, so extboot no longer needed. But due to the ways BIOS boot
> > specification is written only one disk can be bootable in the system, so if one
> > disk has bootindex specified other disks will not participate in the boot even if
> > the disk with bootindex specified is not bootable.
> 
> Thanks for that info.
> 
> Another possibility to disable network boot would be to avoid loading 
> the pxe-XXX.rom network boot ROMs. Or is that a bad idea?
> 
Ah yeah. Don't see anything bad if you do not what to boot from net.

--
			Gleb.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 13:57                       ` Dietmar Maurer
  2011-08-11 13:59                         ` Gleb Natapov
@ 2011-08-11 16:59                         ` Gerd Hoffmann
  2011-08-12  5:08                           ` Dietmar Maurer
  1 sibling, 1 reply; 20+ messages in thread
From: Gerd Hoffmann @ 2011-08-11 16:59 UTC (permalink / raw)
  To: Dietmar Maurer; +Cc: Gleb Natapov, kvm

   Hi,

> Another possibility to disable network boot would be to avoid loading
> the pxe-XXX.rom network boot ROMs. Or is that a bad idea?

Just add the romfile property to your nic with an empty string, i.e.

qemu $otheropts -device e1000,romfile=,mac=...

HTH,
   Gerd


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: network boot always enabled with 0.15.0
  2011-08-11 13:59                         ` Gleb Natapov
@ 2011-08-11 21:37                           ` Michael Tokarev
  0 siblings, 0 replies; 20+ messages in thread
From: Michael Tokarev @ 2011-08-11 21:37 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Dietmar Maurer, kvm

11.08.2011 17:59, Gleb Natapov wrote:
> On Thu, Aug 11, 2011 at 01:57:04PM +0000, Dietmar Maurer wrote:
[]
>> Another possibility to disable network boot would be to avoid loading 
>> the pxe-XXX.rom network boot ROMs. Or is that a bad idea?
>>
> Ah yeah. Don't see anything bad if you do not what to boot from net.

Actually this is a very good idea, to stop loading pxe bootrom
if no network booting is requested.  This way it will be possible
to use standard PXE code from ipxe -- compiled with all default
options, including the 2-second boot delay...

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 16:59                         ` Gerd Hoffmann
@ 2011-08-12  5:08                           ` Dietmar Maurer
  0 siblings, 0 replies; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-12  5:08 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Gleb Natapov, kvm

> > Another possibility to disable network boot would be to avoid loading
> > the pxe-XXX.rom network boot ROMs. Or is that a bad idea?
> 
> Just add the romfile property to your nic with an empty string, i.e.
> 
> qemu $otheropts -device e1000,romfile=,mac=...

Thanks, I can use that a sworkaround.

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: network boot always enabled with 0.15.0
  2011-08-11 12:06                     ` Gleb Natapov
  2011-08-11 13:57                       ` Dietmar Maurer
@ 2011-08-12  7:10                       ` Dietmar Maurer
  1 sibling, 0 replies; 20+ messages in thread
From: Dietmar Maurer @ 2011-08-12  7:10 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

> No, this boot= option is deprecated too. AFAIK boot=off does (and always
> did) nothing.  boot=on tells qemu to boot from the disk using extboot option
> rom. This was needed to boot from virtio disks. Now SeaBIOS can boot from
> virtio disk natively, so extboot no longer needed. But due to the ways BIOS boot
> specification is written only one disk can be bootable in the system, so if one
> disk has bootindex specified other disks will not participate in the boot even if
> the disk with bootindex specified is not bootable.

And how does 'boot order=" relates to bootindex? Is 'order=' also depreciated? 

(docs/bootindex.txt does not mention that.)

- Dietmar


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-08-12  7:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-11  8:55 network boot always enabled with 0.15.0 Dietmar Maurer
2011-08-11  9:05 ` Gleb Natapov
2011-08-11  9:12   ` Dietmar Maurer
2011-08-11  9:38     ` Gleb Natapov
2011-08-11  9:56       ` Dietmar Maurer
2011-08-11 10:25         ` Gleb Natapov
2011-08-11 10:33           ` Dietmar Maurer
2011-08-11 10:50             ` Gleb Natapov
2011-08-11 11:29               ` Dietmar Maurer
2011-08-11 11:48                 ` Gleb Natapov
2011-08-11 11:57                   ` Dietmar Maurer
2011-08-11 12:06                     ` Gleb Natapov
2011-08-11 13:57                       ` Dietmar Maurer
2011-08-11 13:59                         ` Gleb Natapov
2011-08-11 21:37                           ` Michael Tokarev
2011-08-11 16:59                         ` Gerd Hoffmann
2011-08-12  5:08                           ` Dietmar Maurer
2011-08-12  7:10                       ` Dietmar Maurer
2011-08-11 10:13       ` Dietmar Maurer
2011-08-11 10:26         ` Gleb Natapov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.