LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Qemu (https://www.linuxquestions.org/questions/general-10/qemu-4175734091/)

garryjp 02-21-2024 09:18 AM

Qemu
 
I'm looking for a way to achieve the followings.
1. Steps to Configure and adapt Qemu images to replicate SunStation 5 SPARC and HP-UX PARISC servers
2. Steps to Create a network share between Qemu instances and the Debian server.

The goals is to configure and adapt Qemu images to replicate SunStation 5 SPARC and HP-UX PARISC servers, as well as setting up a virtualized production environment

wpeckham 02-21-2024 10:50 AM

Sharing with the host might be slightly problematic. Configuring a cloud server inside your local network that both can access might be the "best" way.

There are multiple pages that document ways to set up sparkstation and solaris on qemu, but I might start from Virtual Machine Manager rather than doing it by hand. I find VMM generates guests that perform better.

For sparstation guests I would start with
https://learn.adafruit.com/build-you...laris/overview
and https://wiki.qemu.org/Documentation/Platforms/SPARC
and perhaps https://learn.adafruit.com/build-you...e-a-disk-image
as places to start your research.

As for HP-UX PA-RISK I would start with https://wiki.qemu.org/Features/HPPA
and https://wiki.qemu.org/Features/HPPA if you want to understand the base

garryjp 02-21-2024 12:33 PM

It is a bit complex i m not sure where to start? what about the Steps to Create a network share between Qemu instances and the Debian server. Does anyone ever done that before? i will need your guidance.

jefro 02-22-2024 02:57 PM

I had played with qemu a long time about and tried a few different arches. There used to be a web page that would build you a batch file for windows based on what you want to run.

How much does a used Sun machine cost?

rknichols 02-23-2024 09:20 AM

First, you have to ensure that your firewall allows VMs to talk to each other. Perhaps you have already done that. It's basically a matter of configuring each VM network as a "routed" network -- details in https://serverfault.com/questions/76...rtual-networks

Once that is done, sharing from a VM is no different than sharing from a base system. You create /etc/exports listing the directories you want to share and the systems that are granted access, and make sure that "nfs" and "nfs3" services are allowed in the firewall and that the nfs-server service is started.

Turbocapitalist 02-23-2024 11:07 AM

Quote:

Originally Posted by garryjp (Post 6485018)
2. Steps to Create a network share between Qemu instances and the Debian server.

That part is doable with the right Qemu device settings. Where should the share be (host or guest) and what kind of share should it be (samba, nfs, ceph, etc)?

jayjwa 03-06-2024 01:18 PM

I have a ss-5 SPARC Solaris 9 host under QEMU, but not an HP-UX. You might be able to get something more modern, but I wanted specifically to see the SPARC 32bit working. Solaris will connect easily with Linux via UUCP, r* commands, telnet, ftp, NFS, serial lines and SMB. You can also catch a remote desktop via XDMCP. Make a Linux bridge and attach the virtual machine via tuntaps. I've posted an example script (rc.bridge-vlan-setup) to do this before on this site.
  • Get install media
  • Use QEMU 8.0.x (8.1.x is broken wrt SPARC - the cursor does not work)
  • Create disk: qemu-img create -f qcow2 solaris_9.img 36g
  • Fill out track/sector count as in: https://astr0baby.wordpress.com/2018...86_64-mint-19/
  • Install. After install edit /a/etc/system to include set scsi_options=0x58 (might not be needed with version 9)
  • Shut down system, make backing file/shadow file of harddisk image
  • Restart with shadow file/backing image file by changing command line to use new backing image file

Solaris suffers badly if not shutdown properly, hence the backing image/shadow file. Run off that, so that you can revert back to it if something goes sideways.
Code:

qemu-img create  -f qcow2 -b solaris_9.img  -F qcow2 solaris_9_sf.img
 (to commit changes)
qemu-img commit solaris_9_sf.img

Despite what you might read, the graphics display works fine. If you are on Wayland, the cursor might become "desync'd" with the Linux one. To fix this, press ctrl-alt-g to get the Linux cursor back. Orient the Linux cursor over top of the Solaris cursor and click. Do not go outside of the simulation window without ctrl-alt-g. Xorg supports cursor grab and thus doesn't have that problem. The command line is similar to this
Code:

qemu-system-sparc -m 256m -M SS-5 -drive file=solaris_9_sf.img,bus=0,unit=0,media=disk -drive file=sol-9-905hw-ga-sparc-dvd.iso,format=raw,if=scsi,bus=0,unit=2,media=cdrom,readonly=on -net nic,macaddr=52:54:00:12:34:58 -net tap,ifname=tap8,id=net0,script=no,downscript=no -audiodev pa,id=snd0 -rtc base=utc -vga cg3 -boot menu=on,order=cd -serial pty -daemonize
Once set up, you can login via the serial line shown upon execution of the above command (/dev/pts/10 in my case). Solaris keeps files in very strange places. NFS is in /etc/dfs/, so fill out dfstab.
Code:

[13:41 jayjwa@kulve:/etc/dfs >] cat dfstab                      [term/a hst:23]

#      Place share(1M) commands here for automatic execution
#      on entering init state 3.
#
#      Issue the command '/etc/init.d/nfs.server start' to run the NFS
#      daemon processes and the share commands, after adding the very
#      first entry to this file.
#
#      share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#      .e.g,
share  -F nfs  -o rw=atr2.lan  -d "Home dirs"  /export/home

...

jayjwa@atr2 /o/s/Solaris> showmount -e kulve.lan
Export list for kulve.lan:
/export/home atr2.lan

Run NFS on Linux like usual, then mount the exported directories.

There's a "companion CD" with many of the free software tools like you'd see on Linux. You'll at least want file, locate, and probably gcc. You can also find the Sun Studio compilers if you look hard enough. If you give it an ip6 address (from your prefix, as from radvd on a bridge), be careful as it will be reachable on the internet. The old CDE, RPC, and Java code had alot of vulnerabilities and Solaris runs alot of services by default.

Code:

jayjwa@atr2 /o/s/Solaris> mailx -s "Hello from Linux" 'kulve!jayjwa'
To: kulve!jayjwa
Subject: Hello from Linux

Good day, Solaris.
^D
-------
(Preliminary) Envelope contains:
To: kulve!jayjwa
Subject: Hello from Linux
Send this message [yes/no, empty: recompose]? yes

...

[14:01 jayjwa@kulve:~ >] mailx                                  [term/a hst:28]
mailx version 5.0 Sat Apr  6 14:57:29 PST 2002  Type ? for help.
"/var/mail/jayjwa": 1 message 1 new
>N  1 jayjwa            Wed Mar  6 14:02  22/875  Hello from Linux
? 1
Message  1:
From jayjwa@atr2.lan Wed Mar  6 14:02:34 2024
From: jayjwa <jayjwa@atr2.lan>
Date: Wed, 06 Mar 2024 14:02:27 -0500
To: jayjwa@kulve.lan
Subject: Hello from Linux
User-Agent: mailx v14.9.24

Good day, Solaris.

?



All times are GMT -5. The time now is 04:14 PM.