DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th March 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default QEMU on OpenBsd, mounting a vnd0 device

I am using QEMU for a VM on my OpenBsd 6.2 system , it works pretty good, but I have run into a problem mounting a vnd image after I make one.
To clarify:
This works fine for my Freedos image:
Code:
vnconfig vnd0 freedos.img 
mount /dev/vnd0i dos
It then is mounted in a sub dir "dos", and I can read,write,edit all the files on the image, copy to and from the host system, etc.
When I am done:
Code:
umount /dev/vnd0i 
vnconfig -u vnd0
Ok, with the Dos image, it works fine, no problems.
How ever I decided to create a windowsXP VM , and successfully did install a old windowsXP version I have, it works ok. I hate windows, and have no reason to need it, but one of my nephews needs it for some of his school work, he is also some what interested in OpenBsd, and more so when I suggested that if he installed OpenBsd, he could install QEMU, and have a windows VM to do his school work, so any way I am experimenting with it, and if I can get it working ok, including being able to create a VND device, and mount, similar to the way I do with my FreeDos image.
And that is where I run into a problem, the windows image does not mount, after I create the VND device.
Code:
# vnconfig vnd0 windowsXP.img
# disklabel vnd0
# /dev/rvnd0c:
type: vnd
disk: vnd device
label: fictitious
duid: b8599b80caf8c77f
flags:
bytes/sector: 512
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 14534
total sectors: 1453440
boundstart: 0
boundend: 1453440
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:          1453440                0  unused
Here , I try 2 different versions of the command:
Code:
#  mount /dev/vnd0c mnt
mount_ffs: /dev/vnd0c on /home/garry/Images/ISO-images/windows/mnt: Invalid argument
#  mount /dev/vnd0c: mnt
mount_nfs: can't resolve address for host /dev/vnd0c
#
(mnt is the sub directory, but even if I try to just mount it in the same dir, it won't work)
I do not remember where I found the instructions on mounting the dos vnd, but in any event in all my searches I could not find anything for a windows image, How can I mount the image , so it is read,writable , from my host system (OpneBsd) ?
If any one knows, thanks, in any event thank you for reading.
P.S, I am also reading "man mount", right now, maybe I will find something, but if any one has a quick /easy example I can try that would be nice.
__________________
My best friends are parrots
Reply With Quote
  #2   (View Single Post)  
Old 26th March 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

vnode(9) devices must be raw. Check the format of your disk image with qemu-img(1), and convert if using a different format (such as qcow2).
Reply With Quote
  #3   (View Single Post)  
Old 26th March 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Thanks, you hit the nail on the head here, I did not think to include that in my details, but
Code:
qemu-img create -f qcow2 windowsXP.img 15G
Quote:
convert if using a different format (such as qcow2).
, is exactly what I did when I made the image to start with.
I could also try making a new image, and start over. Looking at the manual, but am having trouble understanding how I would implement the "convert" option.
Thanks
==== edited====
I think I got it, it does mount now, thanks a bunch. Now to see if it still boots in the VM as well.
==== edited again ====
YES, it boots fine, and it works well, I was able to copy images, and music from the OpenBsd host, to the windows guest, etc,... I think my nephew will like this.
His Windows 7 laptop crashed and burned, on him, apparently viruses were involved, so any way , I suggested he might be interested in OpenBsd, instead of windows, especially if he wants to use internet, but then he mentioned that they require him to use some of the windows office and word programs in school, I think the VM will be sufficient for his needs.
====== edited again=======
on the convert option , it turned out to be quite simple:
the actual command I used:
Code:
 qemu-img convert windows-xp.img windowsXP.img
Pretty simple, windows-xp.img was the name of the image that had been made using the
qcow2 format, windowsXP.img is the name of the new converted image.
(the original image was not lost or changed)
__________________
My best friends are parrots

Last edited by PapaParrot; 27th March 2018 at 07:21 PM. Reason: To show the qemu-image convert command I used
Reply With Quote
  #4   (View Single Post)  
Old 20th April 2018
mefisto mefisto is offline
Shell Scout
 
Join Date: Sep 2017
Posts: 97
Default

Hi GarryR,

this is of great interest to me. Since I started using OpenBSD in September 2017, I have been able to find replacement for most tools except Microsoft Office and AutoCAD R14.

Could you comment on the performance of the Office (mainly Word and Exel) under QEMU? Do you think that Windows 7 would also work?

Kindest regards,

M
Reply With Quote
  #5   (View Single Post)  
Old 20th April 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Sorry, I have not yet tried it with Windows 7, but I am sure it would work.
Like wise , I can't comment on the performance of Microsoft Office and AutoCAD R14. I have never really used any MS software, nor windows , nor needed to, I think a lot would depend on your hardware, cpu capabilities, etc.
See:
Code:
man vmm
Quote:
Although VMs execute independently of each other and the host, they do
consume host resources and, as such, the number of VMs (and their
configurations) should be taken into consideration when planning host
capacity.
We still have not tried it on my nephews laptop either.
I don't have a windows 7 install CD/DVD, to start with, and then the software/programs, are expensive, but if you have them, you could just try it.

There may be someone else here that can tell you more.
When I was trying to do the XP , I did some searches, found 1 tutorial , and it mentioned windows 7, so I am sure it would work. This is what I read:
https://cromwell-intl.com/open-sourc...ows-howto.html

Sorry I couldn't be of more help
__________________
My best friends are parrots
Reply With Quote
  #6   (View Single Post)  
Old 21st April 2018
mefisto mefisto is offline
Shell Scout
 
Join Date: Sep 2017
Posts: 97
Default

Hi GarryR,

first, thank you for the reply. Since you mentioned that you had installed QEMU with WindowsXP for your nephew I assumed, that you had set up the whole environment for him. My stupidity. If he does add Microsoft Office, could you please ask him?

Thank you also for the link to the tutorial.

So contrary to your assertion, your answer was helpful because it showed that QEMU installation is not as difficult as I had read and Windows works under it.

Kindest regards,

M
Reply With Quote
  #7   (View Single Post)  
Old 21st April 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Quote:
QEMU installation is not as difficult as I had read ---snip---
Installing QEMU, is the easy part, but setting up and configuring the VM, for a particular OS can get some what more complicated, my first one was for FreeDos, that was not very complicated, then
the next one was for Debian 7, also not real complicated, but for windowsXP, it got a little more complicated, for example, when I used the raw format, like I had done with both Free Dos, and linux,
the windowsXP installer, did not like that, and could not install, so when I read the tutorial, it mentioned to use "qcow2", and it installed ok,... however as you can see, in this thread, I was not able to mount the image, as a "VND" device, or a vnode, ... the solution turned out pretty simple, I was able to convert it, like jggimi suggested,... Being able to mount the image as a vnd device it important, so that one can access, add files, or even programs, etc,....
If you start to try, and have problems, then post the details, I am sure some one will know how to proceed,... I am just starting to learn about this, one thing I have not figured out is how to set it up so that it has more memory (cpu), and to run the programs you want you will need a lot more the just the
500 or 600 mb , I use.
My computer would not be able to handle windows 7 on a VM, with Microsoft Office and AutoCAD R14. on it.
When I bought it (the computer) it did have windows 7, but just barely could run it, it was really slow, with OpenBsd it is very efficient,... but of course any VM is still going to be limited to what the hosts capacity is,..quote again
Quote:
Although VMs execute independently of each other and the host, they do
consume host resources and, as such, the number of VMs (and their
configurations) should be taken into consideration when planning guest
capacity.
I just noticed, I think they made a typo, "when planning host capacity", should be "guest capacity".
That is to say, my PC has 2gb ram , max. Obviously if I set up a VM, that has programs that use more then that, it either would not work, or be very slow, poor performance.
Debian 9, Windows 7, Gnome, and all the inefficient memory Ram hogs, do not perform well on this PC, and would be even worse on a VM,... sorry to go off topic, but that leads to a big reason I choose OpenBsd, after Debian and Linux started going down hill. OpenBsd is very efficient and runs/performs well on it.
__________________
My best friends are parrots
Reply With Quote
  #8   (View Single Post)  
Old 21st April 2018
mefisto mefisto is offline
Shell Scout
 
Join Date: Sep 2017
Posts: 97
Default

Hi GarryR,

Quote:
but setting up and configuring the VM, for a particular OS can get some what more complicated,
Yes, that is what I meant, sorry for my imprecise English. Once I summon the courage to attempt the VM route and encounter problems, I will certainly post questions.
Quote:
When I bought it (the computer) it did have windows 7, but just barely could run it, it was really slow, with OpenBsd it is very efficient,
Since we are off-topic, I concur. I need to collaborate with my clients; therefore, Microsoft Office format is for all practical purposes mandatory. Thus, I have OpenBSD/Windows 7 dual boot set up, and the difference in performance is nothing short of shocking.

Kindest regards,

M
Reply With Quote
  #9   (View Single Post)  
Old 21st April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by GarryR View Post
See:
Code:
man vmm
The vmm(4) hypervisor does not support graphics hardware. This makes installation and operation of Windows guests fairly improbable.
Reply With Quote
Old 21st April 2018
mefisto mefisto is offline
Shell Scout
 
Join Date: Sep 2017
Posts: 97
Default

Hi jggimi,

that is true, hence my interest in QEMU. However, on a different forum someone suggested that the VM could be treated as a remote system and accessed by RDP-like application. Would this be a viable idea?

I am asking because the vmm is actively developed, and given the quality of OpenBSD code, it would be great to have a native application.

Please note that I just started learning about VM's, so likely I do not know what I am talking about.

Kindest regards,

M
Reply With Quote
Old 21st April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by mefisto View Post
Would this be a viable idea?
I believe you would require video hardware (real or virtual) in order to install and configure such a solution. Will such a pre-provisioned system boot and run as a guest of vmm(4)? That's unclear. To my knowledge, untested. And testing would be difficult, as you would not have any visibility into operating errors. As an example, the Blue Screen of Death wouldn't be visible.
Reply With Quote
Old 21st April 2018
mefisto mefisto is offline
Shell Scout
 
Join Date: Sep 2017
Posts: 97
Default

Hi jggimi,

I see, back to Qemu.

Kindest regards,

M
Reply With Quote
Old 21st April 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Ok, well, in spite of that , some graphics seem to work, but with QEMU, I have not tried the the "vmm", all though I have sort of read the manual,...

============================

===========================

======
Using QEMU it seems to work,
I suppose "improbable" is not the same as impossible, and I don't know if it would be at all useful
or practical, probably just using the "dual boot", will be easier, and more practical,... it is interesting to me though, sort of a "tinker toy" thing.
__________________
My best friends are parrots

Last edited by PapaParrot; 21st April 2018 at 06:20 PM.
Reply With Quote
Old 21st April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

For clarity, Garry, we were discussing Windows guests of vmm(4).
  • vmm(4).has no virtual graphics card support. It is not likely you will be able to provision Windows to operate in a vmm() guest.
  • Qemu has virtual graphics card support.
Reply With Quote
Old 21st April 2018
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

Ok, thanks, I get confused easily But I am glad you brought that up, when I first installed qemu, I was not aware of "vmm", and still do not know much of anything about it, so any way, based on what you say , it would
not be a viable option if one wants a a VM with windows as the guest, ....thanks
__________________
My best friends are parrots
Reply With Quote
Old 21st April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Qemu is a computer emulator. On the other hand, vmm(4) uses virtualization hardware on the host to provide high-performance guest virtual machines. This latter facility is classically termed a hypervisor. While both facilities provide guest virtual machines, they operate quite differently.
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
Installing OpenBSD under QEMU/KVM bsd007 OpenBSD Packages and Ports 4 26th October 2017 11:37 AM
HOWTO: mounting an USB device as normal non-root user in OpenBSD J65nko Guides 6 20th May 2017 12:03 PM
QEMU 1.4.0 boosts large storage device performance J65nko News 0 18th February 2013 04:03 PM
QEMU 1.3 supports new device pass-through technology J65nko News 0 4th December 2012 11:07 PM
OpenBSD qemu usb passthrough kolaloka OpenBSD Packages and Ports 9 9th October 2011 12:15 AM


All times are GMT. The time now is 06:56 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