DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default OpenBSD in virtualized environment

Hello to all,

I am new on this forum and to OpenBSD. After spending some time on the openbsd.org website, and reading other material, I would like to start experimenting with openbsd. I am currently running ubuntu 14.04 on an Acer S3 series laptop. I would like to install vmware on this machine and install openbsd on it, before I do a permanent install. What I really want to know is, if running openbsd in a virtual environment is a good way to test for hardware compatibility (e.g. processor, wlan, graphics, etc...)l? Are there any pitfalls of learning openbsd in a virtual environment VS doing a direct install? Any information would be greatly appreciated.
Reply With Quote
  #2   (View Single Post)  
Old 11th November 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

At this moment I have a HP Proliant server with Linux Mint 17 (Xfce) and I am playing with KVM.

I never used Vmware, but KVM emulates, or whatever you want to call, for example a Cirrus Logic VGA adapter which does not exist natively on the HP host. So with my limited experience it does not look like a virtualized environment is a good way to test hardware compatibility.

For getting acquainted with OpenBSD and the way it does things it seems to be a good environment. You can make snapshots and clone a host before you start modifying the configuration, so you always can go back to a working system when you happen to mess it up beyond repair

A few days ago I installed an OpenBSD amd64-current snapshot, X Window worked out of the box. So I installed firefox 33 and I could even watch youtube movies. Although without sound because the HP box does not have any sound capabilities.

If you want to use it to experiment, go for it
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 11th November 2014 at 05:21 AM. Reason: typo ;)
Reply With Quote
  #3   (View Single Post)  
Old 11th November 2014
raindog308 raindog308 is offline
Fdisk Soldier
 
Join Date: Sep 2011
Posts: 67
Default

I run OpenBSD in several KVMs (by which I mean, at several hosting providers). In fact just set one up tonight :-)

FYI, some settings I use:

- Intel/AMD CPU for the CPU Model (instead of qemu)
- VIRTIO for Ethernet
- VIRTIO for Hard Drive
- APIC off (get a kernel panic on boot in 5.6 if this is on)
- ACPI on
- PAE on
Reply With Quote
  #4   (View Single Post)  
Old 11th November 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Whenever I want to experiment with some new (to me) feature or function in OpenBSD, I always start with testing/learning in a virtual machine-based laboratory environment before provisioning the solution in production.

I use QEMU virtual machines, as my host environment is also OpenBSD. For network solutions testing, I interconnect virtual machines with QEMU's multicast sockets.

Edited to add:
---------------

In the last 18 months I've used this to design solutions with carp(4), pflow(4), gif(4), and iked(8) that I then deployed in production. I've also used this to design information infrastructures for large server farms, And, over the years I've also used the same "lab" to try to recreate problems people have reported here, in an effort to assist with problem determination and possible solutions.

Virtual machines are rarely functional hardware tests, because there is always a software layer between the host and guests. Only when that layer is the hardware's own microcode could you consider the hardware directly involved. If there is a host OS or a hypervisor, then the guest is divorced from the hardware. We could argue how large a separation that is, but there is still a separation from the hardware.

Last edited by jggimi; 11th November 2014 at 03:11 PM.
Reply With Quote
  #5   (View Single Post)  
Old 11th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Thanks everyone for your input. I will try to see if I can find a manual or tutorial for kvm.
Reply With Quote
  #6   (View Single Post)  
Old 11th November 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

To test hardware compatibility you could install OpenBSD on an USB stick. See http://www.openbsd.org/faq/faq14.html#flashmemLive

For KVM docs see https://help.ubuntu.com/community/KVM
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #7   (View Single Post)  
Old 12th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

thanks for the info.

Last edited by jjstorm; 12th November 2014 at 05:07 AM.
Reply With Quote
  #8   (View Single Post)  
Old 12th November 2014
raindog308 raindog308 is offline
Fdisk Soldier
 
Join Date: Sep 2011
Posts: 67
Default

As an addendum, I checked and some of the KVM instances I run have both ACPI and APIC turned off. If you run into boot issues, turning both off is a good place to start.

(PAE is usually irrelevant since my OpenBSD VMs are small.)
Reply With Quote
  #9   (View Single Post)  
Old 23rd November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

I have successfully installed Openbsd 5.6 release in a virtual environment and using virtual machine manager. I am interested in creating a clone of the image as I progress just in case i muck the original install up, but I have some questions.

What is the difference between sharing an existing image with both new and original machine, and cloning, which creates a new independent copy of the original disk? I am concerned because the HD in this laptop is not that large.

thanks in advance.

Last edited by jjstorm; 23rd November 2014 at 10:49 PM.
Reply With Quote
Old 24th November 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Because I have disk space enough, I only have used cloning. I have no idea how sharing would protect you from messing up a cloned install. Maybe some disk snapshot feature?

If you want to save disk space you could compress the original image with xz.
Code:
 # ls -lh
total 149G
-rw------- 1 root         root  20G nov 15 05:47 FreeBSD-10.1-release.img
-rw------- 1 root         root 8,1G nov  7 05:11 FreeBSD-amd64-9.3-clone.img
-rw------- 1 root         root 8,0G nov 12 01:18 FreeBSD-amd64-9.3.img
-rw------- 1 root         root 8,0G nov 12 07:52 NetBSD-6.1.5.img
-rw------- 1 root         root 8,0G nov 18 03:27 OBSD-linuxtype-current-nov-3.img
-rw------- 1 root         root  10G nov 22 02:20 OpenBSD56-current.img
-rw------- 1 root         root  15G nov 22 02:26 OpenBSD56-current-nov18a.img
-rw------- 1 root         root 152M nov 20 00:30 OpenBSD56-current-nov18a.img.xz
-rw------- 1 root         root  15G nov 19 05:40 OpenBSD56-current-nov18.img
-rw------- 1 root         root 4,0G nov 15 23:41 OpenBSD-current-nov11.img
-rw------- 1 root         root  16G nov 16 02:32 OpenBSD-current-nov15.img
-rw------- 1 root         root  12G nov 19 05:33 OpenBSD-current-nov17.img
-rw------- 1 root         root 8,0G nov 22 04:24 OpenBSD-current-nov-3.img
-rw------- 1 root         root  15G nov 21 04:58 OpenBSD-release-5.6.img
-rw------- 1 libvirt-qemu kvm   20G nov 24 01:01 OpenBSD-test.img
Although it took quite a long time to compress that image, the compression is extraordinaire
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 24th November 2014
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

If your version of Virtual Machine Manager does not provide a method to make a snapshot of the VM disk image, you could check if you have virsh installed. I did not play with it yet, but the man page for virsh(1) explains how to create such a snapshot.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 24th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Quote:
Originally Posted by J65nko View Post
Because I have disk space enough, I only have used cloning. I have no idea how sharing would protect you from messing up a cloned install. Maybe some disk snapshot feature?

If you want to save disk space you could compress the original image with xz.
Code:
 # ls -lh
total 149G
-rw------- 1 root         root  20G nov 15 05:47 FreeBSD-10.1-release.img
-rw------- 1 root         root 8,1G nov  7 05:11 FreeBSD-amd64-9.3-clone.img
-rw------- 1 root         root 8,0G nov 12 01:18 FreeBSD-amd64-9.3.img
-rw------- 1 root         root 8,0G nov 12 07:52 NetBSD-6.1.5.img
-rw------- 1 root         root 8,0G nov 18 03:27 OBSD-linuxtype-current-nov-3.img
-rw------- 1 root         root  10G nov 22 02:20 OpenBSD56-current.img
-rw------- 1 root         root  15G nov 22 02:26 OpenBSD56-current-nov18a.img
-rw------- 1 root         root 152M nov 20 00:30 OpenBSD56-current-nov18a.img.xz
-rw------- 1 root         root  15G nov 19 05:40 OpenBSD56-current-nov18.img
-rw------- 1 root         root 4,0G nov 15 23:41 OpenBSD-current-nov11.img
-rw------- 1 root         root  16G nov 16 02:32 OpenBSD-current-nov15.img
-rw------- 1 root         root  12G nov 19 05:33 OpenBSD-current-nov17.img
-rw------- 1 root         root 8,0G nov 22 04:24 OpenBSD-current-nov-3.img
-rw------- 1 root         root  15G nov 21 04:58 OpenBSD-release-5.6.img
-rw------- 1 libvirt-qemu kvm   20G nov 24 01:01 OpenBSD-test.img
Although it took quite a long time to compress that image, the compression is extraordinaire
If I can compress to 1/10th the size as you show, then that may be possible.
Reply With Quote
Old 24th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Quote:
Originally Posted by J65nko View Post
If your version of Virtual Machine Manager does not provide a method to make a snapshot of the VM disk image, you could check if you have virsh installed. I did not play with it yet, but the man page for virsh(1) explains how to create such a snapshot.
looks like I do have virsh installed. I will check it out, thanks.
Reply With Quote
Old 26th November 2014
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 144
Default

Quote:
Originally Posted by jggimi View Post
Whenever I want to experiment with some new (to me) feature or function in OpenBSD, I always start with testing/learning in a virtual machine-based laboratory environment before provisioning the solution in production.

I use QEMU virtual machines, as my host environment is also OpenBSD. For network solutions testing, I interconnect virtual machines with QEMU's multicast sockets.

Edited to add:
---------------

In the last 18 months I've used this to design solutions with carp(4), pflow(4), gif(4), and iked(8) that I then deployed in production. I've also used this to design information infrastructures for large server farms, And, over the years I've also used the same "lab" to try to recreate problems people have reported here, in an effort to assist with problem determination and possible solutions.

Virtual machines are rarely functional hardware tests, because there is always a software layer between the host and guests. Only when that layer is the hardware's own microcode could you consider the hardware directly involved. If there is a host OS or a hypervisor, then the guest is divorced from the hardware. We could argue how large a separation that is, but there is still a separation from the hardware.
Very interesting. I plan on using my virtual environment in similar ways.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a partition for OpenBSD in a multi-boot OS environment cravuhaw2C OpenBSD Installation and Upgrading 9 14th July 2014 09:16 AM
Simple Desktop Environment for OpenBSD 5.4 shep Guides 4 27th January 2014 06:47 PM
Xfce 4.8.0 desktop environment released J65nko News 4 18th January 2011 05:23 PM
I. Treating 'iso-itis' in an OpenBSD environment with USBmediazine® J65nko Guides 3 31st July 2008 01:51 AM
How to duplicate an installed Operating Environment dk_netsvil General software and network 0 22nd July 2008 03:01 PM


All times are GMT. The time now is 10:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick