Q: how to create a bootable OSV image ?

106 views
Skip to first unread message

Lyor Goldstein

unread,
Dec 23, 2013, 4:11:50 AM12/23/13
to osv...@googlegroups.com

Hi,

 

I have successfully built from the source (both for QEMU and RAW), and was looking for some detailed instructions as to how to create a bootable image that I can run as a VM. I understand that Vmware support is still planned for some time in the future, but was wondering if there was a way to create some “.iso” from which one can install the O/S and have it run (even if as an emulated x86-64 bit machine).

 

BTW, I have read the Wiki pages and have not been able to figure out how the OSV boots and runs:

 

-           If I have a Tomcat installed, will it start it automatically ? If so, is there some way to stop/re-start Tomcat so I can upgrade the application or Tomcat itself – or does it require a new image ?

-          How is the network configured ? I saw that some ways that this can be configured, but is there detailed documentation (files, commands, etc.) ?

-          Is there some SSHD daemon running + rudimentary shell that one can use to access the VM remotely ? How can it be configured ?

 

Bottom line – is there some detailed documentation as to how to configure the services that are running on an OSV instance, what are the available CLI commands, etc. ?

 

Thanks – great work so far (hope I can make it run eventually…)

Lyor G.

Tomasz Grabiec

unread,
Dec 23, 2013, 4:40:29 AM12/23/13
to Lyor Goldstein, Osv Dev
Hi,


Hi,



On Mon, Dec 23, 2013 at 10:11 AM, Lyor Goldstein <lgold...@vmware.com> wrote:

Hi,

 

I have successfully built from the source (both for QEMU and RAW), and was looking for some detailed instructions as to how to create a bootable image that I can run as a VM. I understand that Vmware support is still planned for some time in the future, but was wondering if there was a way to create some “.iso” from which one can install the O/S and have it run (even if as an emulated x86-64 bit machine).

 

BTW, I have read the Wiki pages and have not been able to figure out how the OSV boots and runs:

 

-           If I have a Tomcat installed, will it start it automatically ? If so, is there some way to stop/re-start Tomcat so I can upgrade the application or Tomcat itself – or does it require a new image ?


Our build does not automatically copy tomcat. We have a WIKI page which describes how to build and run a tomcat image: https://github.com/cloudius-systems/osv/wiki/Running-apache-tomcat

Feedback welcome.
 

-          How is the network configured ? I saw that some ways that this can be configured, but is there detailed documentation (files, commands, etc.) ?

-          Is there some SSHD daemon running + rudimentary shell that one can use to access the VM remotely ? How can it be configured ?

 

Bottom line – is there some detailed documentation as to how to configure the services that are running on an OSV instance, what are the available CLI commands, etc. ?



You can find some resources here: https://github.com/cloudius-systems/osv/wiki
 

Pekka Enberg

unread,
Dec 23, 2013, 4:45:22 AM12/23/13
to Lyor Goldstein, Osv Dev
Hi Lyor,

On Mon, Dec 23, 2013 at 11:11 AM, Lyor Goldstein <lgold...@vmware.com> wrote:
> I have successfully built from the source (both for QEMU and RAW), and was
> looking for some detailed instructions as to how to create a bootable image
> that I can run as a VM. I understand that Vmware support is still planned
> for some time in the future, but was wondering if there was a way to create
> some “.iso” from which one can install the O/S and have it run (even if as
> an emulated x86-64 bit machine).

The usr.img image should be bootable but please note that there's no
VGA support in OSv so you need a serial console to see anything.

If VMware doesn't support the raw image, you could try converting the
image to VMDK format with qemu-img:

[penberg@localhost osv]$ qemu-img convert -O vmdk
build/release/usr.img usr.vmdk
[penberg@localhost osv]$ file usr.vmdk
usr.vmdk: VMware4 disk image

Pekka

Dor Laor

unread,
Dec 23, 2013, 4:47:40 AM12/23/13
to Tomasz Grabiec, Lyor Goldstein, Osv Dev
On Mon, Dec 23, 2013 at 11:40 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:
Hi,


Hi,



On Mon, Dec 23, 2013 at 10:11 AM, Lyor Goldstein <lgold...@vmware.com> wrote:

Hi,

 

I have successfully built from the source (both for QEMU and RAW), and was looking for some detailed instructions as to how to create a bootable image that I can run as a VM. I understand that Vmware support is still planned for some time in the future, but was wondering if there was a way to create some “.iso” from which one can install the O/S and have it run (even if as an emulated x86-64 bit machine).


We intend to support this. The 'install' phase will be similar to our image creation process which is mainly
about copying the kernel, libraries, few files and possible the application into a newly created ZFS partition
on a virtual disk. In the case of .iso, it will be copied from the iso (similar to the linux 'dd' block copy but
it won't be block based since the target image vary in size).

The trouble is that we don't have cdrom driver yet in OSv. That's something we talked about and we probably 
need to prioritize.
 

 

BTW, I have read the Wiki pages and have not been able to figure out how the OSV boots and runs:

 

-           If I have a Tomcat installed, will it start it automatically ? If so, is there some way to stop/re-start Tomcat so I can upgrade the application or Tomcat itself – or does it require a new image ?


Our build does not automatically copy tomcat. We have a WIKI page which describes how to build and run a tomcat image: https://github.com/cloudius-systems/osv/wiki/Running-apache-tomcat

Feedback welcome.

Just to elaborate, the make image=XYZ is the most friendliest way to bundle the OS and an application
 
 

-          How is the network configured ? I saw that some ways that this can be configured, but is there detailed documentation (files, commands, etc.) ?


We assume DHCP on all NICs
 

-          Is there some SSHD daemon running + rudimentary shell that one can use to access the VM remotely ? How can it be configured ?


There is a java sshd we use called CRaSH, it's automatically in, it's possible to compile it out. 

 

Bottom line – is there some detailed documentation as to how to configure the services that are running on an OSV instance, what are the available CLI commands, etc. ?



You can find some resources here: https://github.com/cloudius-systems/osv/wiki
 

--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pekka Enberg

unread,
Dec 23, 2013, 11:46:24 AM12/23/13
to Lyor Goldstein, Osv Dev
Hi Lyor,

(Please keep the list CC'd.)

On Mon, Dec 23, 2013 at 2:14 PM, Lyor Goldstein <lgold...@vmware.com> wrote:
> I tried this, but when I tried to use the VMDK and power on the VM (using
> Vmware Workstation 10.0) nothing happened - no boot messages, no shell,
> etc..

Is VMware supposed to show you serial console output? Remember,
there's no VGA support so for example default QEMU doesn't show
anything either...

Lyor Goldstein

unread,
Dec 29, 2013, 5:37:07 AM12/29/13
to Pekka Enberg, Osv Dev
Hi Pekka,

I have followed the instruction in this article
(http://www.arkf.net/blog/?p=199) to set up a serial console emulation,
and I still don't see any messages opf the boot process or CLI prompt.
Could it be some serial port configuration issue ? I used speed=9600, 8
data bits, 1 stop bit, no parity, Xon/Xoff flow control as the consumer
client (Putty).

Thanks,
Lyor

Pekka Enberg

unread,
Dec 30, 2013, 3:10:42 AM12/30/13
to Lyor Goldstein, Osv Dev, Avi Kivity
Hi Lyor,

On Sun, Dec 29, 2013 at 12:37 PM, Lyor Goldstein <lgold...@vmware.com> wrote:
> I have followed the instruction in this article
> (http://www.arkf.net/blog/?p=199) to set up a serial console emulation,
> and I still don't see any messages opf the boot process or CLI prompt.
> Could it be some serial port configuration issue ? I used speed=9600, 8
> data bits, 1 stop bit, no parity, Xon/Xoff flow control as the consumer
> client (Putty).

Could you please try out master? Avi fixed an A20 related problem when
booting on VMware. See commit 0a73fbe ("x64: enable A20 gate very
early") for details.

Pekka

Avi Kivity

unread,
Dec 30, 2013, 4:10:04 AM12/30/13
to Pekka Enberg, Lyor Goldstein, Osv Dev
It will boot but immediately panic, since Asias hasn't written a vmware
pvscsi driver yet.

btw, the point about having an .iso image is interesting. Instead of
the current cpio-over-tcp thing we have, we could easily make a bootable
.iso image with genisoimage and use that to install osv. This would be
useful for more traditional installation flows.

We'd need an iso9660 boot loader, a file system driver, and an IDE
driver, so it's not immediate, but certainly something for the future.

Nadav Har'El

unread,
Dec 30, 2013, 4:17:12 AM12/30/13
to Avi Kivity, Pekka Enberg, Lyor Goldstein, Osv Dev
On Mon, Dec 30, 2013 at 11:10 AM, Avi Kivity <a...@cloudius-systems.com> wrote:
btw, the point about having an .iso image is interesting.  Instead of the current cpio-over-tcp thing we have, we could easily make a bootable .iso image with genisoimage and use that to install osv. This would be useful for more traditional installation flows.

How would this work? Because usually one does not write into a .iso image, I assume you mean we'll have both the .iso image, where we get the kernel and the files to install, and a second empty image into which we copy OSv on first boot, and later can write to.

If this is what you meant, then we don't really need cdrom support for this: We can also use the ramfs stuff like we did initially, but instead of always running with ramfs, on the first boot we can copy everything from it to the second image, and in later boots, use the second image instead of ramfs.


We'd need an iso9660 boot loader, a file system driver, and an IDE driver, so it's not immediate, but certainly something for the future.
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Avi Kivity

unread,
Dec 30, 2013, 4:26:39 AM12/30/13
to Nadav Har'El, Pekka Enberg, Lyor Goldstein, Osv Dev
On 12/30/2013 11:17 AM, Nadav Har'El wrote:
On Mon, Dec 30, 2013 at 11:10 AM, Avi Kivity <a...@cloudius-systems.com> wrote:
btw, the point about having an .iso image is interesting.  Instead of the current cpio-over-tcp thing we have, we could easily make a bootable .iso image with genisoimage and use that to install osv. This would be useful for more traditional installation flows.

How would this work? Because usually one does not write into a .iso image, I assume you mean we'll have both the .iso image, where we get the kernel and the files to install, and a second empty image into which we copy OSv on first boot, and later can write to.

Yes.



If this is what you meant, then we don't really need cdrom support for this: We can also use the ramfs stuff like we did initially, but instead of always running with ramfs, on the first boot we can copy everything from it to the second image, and in later boots, use the second image instead of ramfs.


There's a limit to how large a ramfs can be, and with some applications we might exceed it.

But the real motivation for .iso is to work well with flows that expect it.

EBo

unread,
Dec 30, 2013, 9:51:41 AM12/30/13
to osv...@googlegroups.com
On Dec 30 2013 2:17 AM, Nadav Har'El wrote:
> On Mon, Dec 30, 2013 at 11:10 AM, Avi Kivity
> <a...@cloudius-systems.com>wrote:
>
>> btw, the point about having an .iso image is interesting. Instead
>> of the
>> current cpio-over-tcp thing we have, we could easily make a bootable
>> .iso
>> image with genisoimage and use that to install osv. This would be
>> useful
>> for more traditional installation flows.
>>
>
> How would this work? Because usually one does not write into a .iso
> image,
> I assume you mean we'll have both the .iso image, where we get the
> kernel
> and the files to install, and a second empty image into which we copy
> OSv
> on first boot, and later can write to.

Having an .iso is the first thing that many of us look for in a project
when we want to test it or install. If I start with an iso and set up a
kvm image with copy on write I think it might still be useful without an
install. It has been several years since I mucked with this, but it is
how I used to play with virtual machines of Plan9 for testing
distributed code and mucking with the OS.

> If this is what you meant, then we don't really need cdrom support
> for
> this: We can also use the ramfs stuff like we did initially, but
> instead of
> always running with ramfs, on the first boot we can copy everything
> from it
> to the second image, and in later boots, use the second image instead
> of
> ramfs.

cdrom support is good for initial installs. It does seem rather
essential, but maybe I am missing your point here. If you see a way to
set up an install without it then it is likely sufficient.

>> We'd need an iso9660 boot loader, a file system driver, and an IDE
>> driver,
>> so it's not immediate, but certainly something for the future.

fair enough.

EBo --

Lyor Goldstein

unread,
Dec 31, 2013, 1:26:43 AM12/31/13
to Pekka Enberg, Osv Dev, Avi Kivity
Hi Pekka,

Tried the latest version, but now I am getting an error when I try to run
it in the Vmware Workstation (version 10.0):

"A fault has occurred causing a virtual CPU to enter the shutdown
state. If this fault had occurred outside of a virtual machine, it would
have caused the physical machine to restart. The shutdown state can be
reached by incorrectly configuring the virtual machine, a bug in the guest
operating system, or a problem in VMware Workstation."

I find OSV a very interesting and promising project which may prove very
useful. Please let me know when Vmware support is available.
Thanks a lot,
Lyor

-----Original Message-----
From: Pekka Enberg [mailto:pen...@cloudius-systems.com]
Sent: Monday, December 30, 2013 10:11
To: Lyor Goldstein
Cc: Osv Dev; Avi Kivity
Subject: Re: Q: how to create a bootable OSV image ?

Hi Lyor,

On Sun, Dec 29, 2013 at 12:37 PM, Lyor Goldstein <lgold...@vmware.com>
wrote:
> I have followed the instruction in this article
>
(https://urldefense.proofpoint.com/v1/url?u=http://www.arkf.net/blog/?p%3D
199&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=8os749fCw6D5uj%2BFBSGIP6zKE0hlqG
sZDpGpqUAHhmA%3D%0A&m=dLZhL%2Fx3x5eLfvxeKM1vSvs1v5I6puQQ7w%2BEZ%2BLvi10%3D
%0A&s=a814d7953639bc133dafce5734342eab3901f1613339a5d311f4256305e6a4df) to

Avi Kivity

unread,
Dec 31, 2013, 4:15:55 AM12/31/13
to Lyor Goldstein, Pekka Enberg, Osv Dev
On 12/31/2013 08:26 AM, Lyor Goldstein wrote:
> Hi Pekka,
>
> Tried the latest version, but now I am getting an error when I try to run
> it in the Vmware Workstation (version 10.0):
>
> "A fault has occurred causing a virtual CPU to enter the shutdown
> state. If this fault had occurred outside of a virtual machine, it would
> have caused the physical machine to restart. The shutdown state can be
> reached by incorrectly configuring the virtual machine, a bug in the guest
> operating system, or a problem in VMware Workstation."
>
>

I also tried under v10, and I get "The CPU has been disabled by the
guest operating system. Power off or reset the virtual machine.", which
happens when osv was unable to find a driver for the storage device, so
it panicked and turned itself off.

Here's the serial log:

VFS: mounting ramfs at /
VFS: mounting devfs at /dev
RAM disk at 0x0xffffc0003f041000 (4096K bytes)
Initializing network stack...
Done!
VFS: mounting zfs at /zfs
[E/31 bsd-panic]: solaris assert: nvlist_lookup_string(config,
ZPOOL_CONFIG_POOL_NAME, &pname) == 0, file:
/home/avi/osv/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c,
line: 3991
Aborted

Can you attach the serial log from your machine?

What hardware compatibility are you using? I'm using "VMware
workstation 10.0 virtual machine".

Lyor Goldstein

unread,
Dec 31, 2013, 4:21:43 AM12/31/13
to Avi Kivity, Pekka Enberg, Osv Dev
I don't know what you mean by the "serial log" - like I said, I see
nothing via the serial device named pipe collector. I am attaching the
"vmware.log" file that is created by the VM - if that helps.

P.S. I am also using "VMware workstation 10.0 virtual machine" hardware
compatibility

-----Original Message-----
From: Avi Kivity [mailto:a...@cloudius-systems.com]
Sent: Tuesday, December 31, 2013 11:16
To: Lyor Goldstein; Pekka Enberg
Cc: Osv Dev
Subject: Re: Q: how to create a bootable OSV image ?

vmware.log

Avi Kivity

unread,
Dec 31, 2013, 4:30:07 AM12/31/13
to Lyor Goldstein, Pekka Enberg, Osv Dev
On 12/31/2013 11:21 AM, Lyor Goldstein wrote:
> I don't know what you mean by the "serial log" - like I said, I see
> nothing via the serial device named pipe collector. I am attaching the
> "vmware.log" file that is created by the VM - if that helps.
>

No, I need the output from the virtual COM1 device attached to the guest.

It seems impossible to configure it from the GUI - I edited my osv.vmx
to read

serial0.present = "TRUE"
serial0.fileType = "file"
serial0.fileName = "/tmp/osv.log"

after executing, the output is in /tmp/osv.log. You will need the
latest version to include commit b8b5df334bf739, otherwise you will get
garbage.
Reply all
Reply to author
Forward
0 new messages