LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-03-2014, 07:03 AM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
How-to "remotely" install Slackware in a qemu VM from the host?


I want to try booting a machine to do a Slackware installation remotely, but at the moment have only one real machine (my laptop) at hand.

How can I boot a qemu VM, but from the host? Does any one know how to boot a VM from the host, through PXE or simulating a serial console, whatever? I would be grateful of any clue.

Last edited by Didier Spaier; 07-03-2014 at 07:05 AM.
 
Old 07-03-2014, 07:08 AM   #2
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Rep: Reputation: 44
The easiest way would be to make a isofile from the Slackware DVD and pass it as a parameter to the guest
 
Old 07-03-2014, 07:21 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slacktroll View Post
The easiest way would be to make a isofile from the Slackware DVD and pass it as a parameter to the guest
Yes, I've done that many times, but to be more clear what I really want is not use VM's console as display but a host's terminal (either in console mode or under X) as if the VM was a remote machine. I probably could figure that out from the docs + an Internet search but to be honest I feel a bit lazy today...

Last edited by Didier Spaier; 07-03-2014 at 07:24 AM.
 
Old 07-03-2014, 07:31 AM   #4
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Rep: Reputation: 44
Do that, i would like to know as well
 
Old 07-03-2014, 08:01 AM   #5
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
Is it this You need?

Code:
qemu-kvm -vnc :1 -cdrom /var/lib/kvm/TinyCore-4.7.7.iso
or You can let it PXE-boot

EDIT:
If You just start qemu, it will try to PXE-boot,
so you just have to set up the PXE-server.

and then in an other terminal window:

Code:
gvncviewer localhost:1

Last edited by ml4711; 07-03-2014 at 08:14 AM.
 
2 members found this post helpful.
Old 07-03-2014, 08:16 AM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
You can do that via libvirt and virt-manager, which isn't what you asked for.

(Even there, the cdrom/iso image has to be on same machine as the VM.)
 
1 members found this post helpful.
Old 07-03-2014, 02:26 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
@ ml4711: thanks!

It works well will this command:
Code:
qemu-kvm -m 2047 -vnc :1 -k fr -cdrom ~/slint.fr/testing/slint-14.1.iso -boot order=d -vga std
Amazingly, display using fbterm (as set by the installer) is right in the vnc client with a true type font (DejaVu Sans Mono as set in the installer), though fbterm be supposed to run only when controlled by an interactive tty hence not under X

I tried also without the -vga option (thus defaulting to a cirrus video card), again display is as expected (with a bitmap font is this case as fbterm is not run by the installer because there is no 32bpp vesa mode available).

So far so good, I'm going to try the other methods now.

@ Richard Cranium: thanks for the clue, I don't know libvirt and virt-manager but it never hurts to learn

Last edited by Didier Spaier; 07-03-2014 at 03:00 PM.
 
1 members found this post helpful.
Old 07-03-2014, 06:30 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Now for the PXE-boot:

At first I tried to follow PXE: Installing Slackware over the network written by Eric Hameleers.

But it failed, because as I didn't use qemu's -net option it fell back to the default "-net nic -net user". Then I willingly tried to use qemu's own network stack with this command:
Code:
qemu-kvm -m 2047 -vnc :1 -k fr -vga std -net nic -net user,tftp=/tftpboot/slint-14.1,bootfile=/pxelinux.0 -boot order=n
I lost some time figuring out needed files' layout in /tftpboot/slint.14.1 (I had to "mv isolinux/* .") but eventually that succeeded and I got the same display in the vnc client as previously.

But as that's not what I planned to do I'll try to actually use the host's PXE server tomorrow.

Last edited by Didier Spaier; 07-03-2014 at 06:34 PM.
 
1 members found this post helpful.
Old 07-05-2014, 05:35 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Original Poster
Rep: Reputation: Disabled
Now for the PXE-boot, but this time with the PXE server set in the host and IPs suggested by Eric, just added the option no_subtree_check in /etc/exports. In /etc/dhcpd.conf:
Code:
host qemu {
    hardware ethernet 52:54:00:12:34:56;
    fixed-address 192.168.0.3;
}
and the qemu command:
Code:
qemu-kvm -m 2047 -cpu host machine accel=kvm -k fr -vga std -net nic,macaddr=52:54:00:12:34:56,name=qemu -boot order=n
Slow, but it works.

Reminder: the how-to is in the installation media also, see /usb-and-pxe-installers/README_PXE.TXT

Last edited by Didier Spaier; 07-05-2014 at 05:48 AM.
 
2 members found this post helpful.
Old 07-05-2014, 05:09 PM   #10
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Take a look at virsh when you get a chance, Didier. It' a command line tool that let's you interact directly with the virtual environment through APIs in libvirt. The only other suggestions I'd make is, what your building is considered a loop or img format, you'd have a more compliant image (faster, easier to work with) if you modified it into a qcow2 format (which I think you can do via a snapshot with virsh, but I'm not on my home machine so all that documentation isn't available to me right now).
Once you have them built, you can SSH into them just like they were real machines.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't install kernel module on CentOS. "...likely that xx belongs to a chroot's host" 4Paul4 Linux - Software 2 05-27-2012 11:34 PM
CVS Issue - can't login remotely "host unknown" snowweb Linux - Server 1 08-20-2011 11:01 PM
host only networking for "Crunchbang host" "Arch Linux guest" ted9411 Linux - Virtualization and Cloud 3 06-06-2011 08:29 AM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? munkey Linux - Newbie 3 05-03-2004 04:30 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? help munkey Fedora 6 04-30-2004 06:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration