Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Neil Bothwick
On Sun, 15 Jan 2017 12:49:09 +0100, meino.cra...@gmx.de wrote:

> for the purpose of online banking I want to install Linux on an
> USB-stick.
> 
> All attempts currently fail because the guest OS does not see
> any internet connection / eth0
> 
> I tried this without success:
> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d
> -usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm
> -device intel-iommu -netdev
> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> 
> The image boots successfully...but withoyt any connection to the
> internet.

You need to allow the guest to access the network via the host's network
interface, which is usually done by setting up a bridge. Details are on
the qemu page of the Gentoo wiki. Alternatively you can set up vde, also
documented on the wiki page. vde is simpler to set up but has
disadvantages that probably won't apply to your situation


-- 
Neil Bothwick

Windows Error #09: Mouse not found. Press mouse button to continue.


pgpuHTVMoIlpq.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Meino . Cramer
wabe  [17-01-15 17:20]:
> meino.cra...@gmx.de wrote:
> 
> > Alan McKinnon  [17-01-15 14:08]:
> > > On 15/01/2017 14:52, meino.cra...@gmx.de wrote:  
> > > > Alan McKinnon  [17-01-15 13:40]:  
> > > >> On 15/01/2017 13:49, meino.cra...@gmx.de wrote:  
> > > >>> Hi,
> > > >>>
> > > >>> for the purpose of online banking I want to install Linux on an
> > > >>> USB-stick.
> > > >>>
> > > >>> All attempts currently fail because the guest OS does not see
> > > >>> any internet connection / eth0
> > > >>>
> > > >>> I tried this without success:
> > > >>> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot
> > > >>> order=d -usbdevice host: -m 1G --enable-kvm
> > > >>> -machine q35,accel=kvm -device intel-iommu -netdev
> > > >>> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> > > >>>
> > > >>> The image boots successfully...but withoyt any connection to the
> > > >>> internet.
> > > >>>
> > > >>> How can I acchieve what I want?  
> > > >>
> > > >>
> > > >> When you log into the guest OS and look at the network config it
> > > >> does have, what do you see?
> > > >>
> > > >> What interfaces, routes, etc etc does it actually have once
> > > >> booted?
> > > >>
> > > >>
> > > >> -- 
> > > >> Alan McKinnon
> > > >> alan.mckin...@gmail.com
> > > >>
> > > >>  
> > > > 
> > > > One step back, Alan...
> > > > 
> > > > I am booting an install-disk.iso, which needs a network to access
> > > > the packages from a server, which I want to be part of my
> > > > usbstick.
> > > > 
> > > > The install-disk.iso should be prepared/configured to access the 
> > > > internet (everything else would be at least an error/bug...)...
> > > > 
> > > > So I assume, that qemu is not providing that...  
> > > 
> > > Sounds reasonable. I asked what I did because it looks like you know
> > > what you want, but aren't getting it. So the obvious troubleshooting
> > > step is to see what you did get :-)
> > > 
> > > I assume this guest is something you can log into after it boots?
> > > It has some kind of console login functionality?? If say ssh is the
> > > only way you can get access then you have a chicken and egg
> > > problem, something you'd ideally like to avoid
> > > 
> > > 
> > > -- 
> > > Alan McKinnon
> > > alan.mckin...@gmail.com
> > > 
> > >   
> > 
> > There are neither chicken nor eggsand especially there is no
> > internet connection  :
> > 
> > The iso boots fine and I can chroot into my base installation of my
> > usbstick.
> > Since online banking from the command line is somehow steam-punk-style
> > I wanted a graphical interface (to name onlu one example).
> > But I cannot pull the according package from the providing server,
> > since.no internet.
> > And there they were...my three problems ;)
> > 
> > But in the meanwhile I found a way to tell qemu what I want.
> > 
> > Now I boot my iso like this
> > sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot
> > order=d -usbdevice host: -m 1G --enable-kvm -machine
> > q35,accel=kvm -device intel-iommu -net nic -net user
> > 
> > That's it -- but I am open for suggestions to improve this command --
> > for execution speed inside qemu for example... ;)
> 
> On my system (AMD Phenom II X4 965) "-cpu host" together with "-smp 4" 
> gives the best results on processing speed.
> 
> For graphics output I use "-display gtk" and "-vga vmware". This is 
> on my machine the fastest setting and gives me also the highest screen
> resolution.
> 
> I also use the "hostfwd" option, so I can establish a ssh connection 
> to the VM with the following command:
> 
> ssh -p  @localhost
> 
> 
> That's the whole command that I use to start a VM:
> 
> qemu-system-x86_64 -machine accel=kvm -cpu host -smp 4 -m 4096 -enable-kvm 
> -name banking-vm -net nic,model=virtio -net user,hostfwd=tcp::-:22 
> -localtime -hda /home//qemu/banking-vm.qcow2 -display gtk -vga vmware
> 
> I don't know if this is optimal, but after many tests I found that
> it gives me the best performance on my system.
> 
> --
> Regards
> wabe
> 

Hi wabe,

THAT's a boost! Oh Yeah! Thanks a lot for the fuel :))

Cheers
Meino





Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread wabe
meino.cra...@gmx.de wrote:

> Alan McKinnon  [17-01-15 14:08]:
> > On 15/01/2017 14:52, meino.cra...@gmx.de wrote:  
> > > Alan McKinnon  [17-01-15 13:40]:  
> > >> On 15/01/2017 13:49, meino.cra...@gmx.de wrote:  
> > >>> Hi,
> > >>>
> > >>> for the purpose of online banking I want to install Linux on an
> > >>> USB-stick.
> > >>>
> > >>> All attempts currently fail because the guest OS does not see
> > >>> any internet connection / eth0
> > >>>
> > >>> I tried this without success:
> > >>> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot
> > >>> order=d -usbdevice host: -m 1G --enable-kvm
> > >>> -machine q35,accel=kvm -device intel-iommu -netdev
> > >>> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> > >>>
> > >>> The image boots successfully...but withoyt any connection to the
> > >>> internet.
> > >>>
> > >>> How can I acchieve what I want?  
> > >>
> > >>
> > >> When you log into the guest OS and look at the network config it
> > >> does have, what do you see?
> > >>
> > >> What interfaces, routes, etc etc does it actually have once
> > >> booted?
> > >>
> > >>
> > >> -- 
> > >> Alan McKinnon
> > >> alan.mckin...@gmail.com
> > >>
> > >>  
> > > 
> > > One step back, Alan...
> > > 
> > > I am booting an install-disk.iso, which needs a network to access
> > > the packages from a server, which I want to be part of my
> > > usbstick.
> > > 
> > > The install-disk.iso should be prepared/configured to access the 
> > > internet (everything else would be at least an error/bug...)...
> > > 
> > > So I assume, that qemu is not providing that...  
> > 
> > Sounds reasonable. I asked what I did because it looks like you know
> > what you want, but aren't getting it. So the obvious troubleshooting
> > step is to see what you did get :-)
> > 
> > I assume this guest is something you can log into after it boots?
> > It has some kind of console login functionality?? If say ssh is the
> > only way you can get access then you have a chicken and egg
> > problem, something you'd ideally like to avoid
> > 
> > 
> > -- 
> > Alan McKinnon
> > alan.mckin...@gmail.com
> > 
> >   
> 
> There are neither chicken nor eggsand especially there is no
> internet connection  :
> 
> The iso boots fine and I can chroot into my base installation of my
> usbstick.
> Since online banking from the command line is somehow steam-punk-style
> I wanted a graphical interface (to name onlu one example).
> But I cannot pull the according package from the providing server,
> since.no internet.
> And there they were...my three problems ;)
> 
> But in the meanwhile I found a way to tell qemu what I want.
> 
> Now I boot my iso like this
> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot
> order=d -usbdevice host: -m 1G --enable-kvm -machine
> q35,accel=kvm -device intel-iommu -net nic -net user
> 
> That's it -- but I am open for suggestions to improve this command --
> for execution speed inside qemu for example... ;)

On my system (AMD Phenom II X4 965) "-cpu host" together with "-smp 4" 
gives the best results on processing speed.

For graphics output I use "-display gtk" and "-vga vmware". This is 
on my machine the fastest setting and gives me also the highest screen
resolution.

I also use the "hostfwd" option, so I can establish a ssh connection 
to the VM with the following command:

ssh -p  @localhost


That's the whole command that I use to start a VM:

qemu-system-x86_64 -machine accel=kvm -cpu host -smp 4 -m 4096 -enable-kvm 
-name banking-vm -net nic,model=virtio -net user,hostfwd=tcp::-:22 
-localtime -hda /home//qemu/banking-vm.qcow2 -display gtk -vga vmware

I don't know if this is optimal, but after many tests I found that
it gives me the best performance on my system.

--
Regards
wabe



Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Meino . Cramer
Alan McKinnon  [17-01-15 14:08]:
> On 15/01/2017 14:52, meino.cra...@gmx.de wrote:
> > Alan McKinnon  [17-01-15 13:40]:
> >> On 15/01/2017 13:49, meino.cra...@gmx.de wrote:
> >>> Hi,
> >>>
> >>> for the purpose of online banking I want to install Linux on an USB-stick.
> >>>
> >>> All attempts currently fail because the guest OS does not see
> >>> any internet connection / eth0
> >>>
> >>> I tried this without success:
> >>> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
> >>> -usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm 
> >>> -device intel-iommu -netdev 
> >>> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> >>>
> >>> The image boots successfully...but withoyt any connection to the
> >>> internet.
> >>>
> >>> How can I acchieve what I want?
> >>
> >>
> >> When you log into the guest OS and look at the network config it does
> >> have, what do you see?
> >>
> >> What interfaces, routes, etc etc does it actually have once booted?
> >>
> >>
> >> -- 
> >> Alan McKinnon
> >> alan.mckin...@gmail.com
> >>
> >>
> > 
> > One step back, Alan...
> > 
> > I am booting an install-disk.iso, which needs a network to access the
> > packages from a server, which I want to be part of my usbstick.
> > 
> > The install-disk.iso should be prepared/configured to access the 
> > internet (everything else would be at least an error/bug...)...
> > 
> > So I assume, that qemu is not providing that...
> 
> Sounds reasonable. I asked what I did because it looks like you know
> what you want, but aren't getting it. So the obvious troubleshooting
> step is to see what you did get :-)
> 
> I assume this guest is something you can log into after it boots? It has
> some kind of console login functionality?? If say ssh is the only way
> you can get access then you have a chicken and egg problem, something
> you'd ideally like to avoid
> 
> 
> -- 
> Alan McKinnon
> alan.mckin...@gmail.com
> 
> 

There are neither chicken nor eggsand especially there is no
internet connection  :

The iso boots fine and I can chroot into my base installation of my
usbstick.
Since online banking from the command line is somehow steam-punk-style
I wanted a graphical interface (to name onlu one example).
But I cannot pull the according package from the providing server,
since.no internet.
And there they were...my three problems ;)

But in the meanwhile I found a way to tell qemu what I want.

Now I boot my iso like this
sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
-usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm -device 
intel-iommu -net nic -net user

That's it -- but I am open for suggestions to improve this command --
for execution speed inside qemu for example... ;)

Cheers
Meino








Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Alan McKinnon
On 15/01/2017 14:52, meino.cra...@gmx.de wrote:
> Alan McKinnon  [17-01-15 13:40]:
>> On 15/01/2017 13:49, meino.cra...@gmx.de wrote:
>>> Hi,
>>>
>>> for the purpose of online banking I want to install Linux on an USB-stick.
>>>
>>> All attempts currently fail because the guest OS does not see
>>> any internet connection / eth0
>>>
>>> I tried this without success:
>>> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
>>> -usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm 
>>> -device intel-iommu -netdev 
>>> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
>>>
>>> The image boots successfully...but withoyt any connection to the
>>> internet.
>>>
>>> How can I acchieve what I want?
>>
>>
>> When you log into the guest OS and look at the network config it does
>> have, what do you see?
>>
>> What interfaces, routes, etc etc does it actually have once booted?
>>
>>
>> -- 
>> Alan McKinnon
>> alan.mckin...@gmail.com
>>
>>
> 
> One step back, Alan...
> 
> I am booting an install-disk.iso, which needs a network to access the
> packages from a server, which I want to be part of my usbstick.
> 
> The install-disk.iso should be prepared/configured to access the 
> internet (everything else would be at least an error/bug...)...
> 
> So I assume, that qemu is not providing that...

Sounds reasonable. I asked what I did because it looks like you know
what you want, but aren't getting it. So the obvious troubleshooting
step is to see what you did get :-)

I assume this guest is something you can log into after it boots? It has
some kind of console login functionality?? If say ssh is the only way
you can get access then you have a chicken and egg problem, something
you'd ideally like to avoid


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Meino . Cramer
Alan McKinnon  [17-01-15 13:40]:
> On 15/01/2017 13:49, meino.cra...@gmx.de wrote:
> > Hi,
> > 
> > for the purpose of online banking I want to install Linux on an USB-stick.
> > 
> > All attempts currently fail because the guest OS does not see
> > any internet connection / eth0
> > 
> > I tried this without success:
> > sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
> > -usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm 
> > -device intel-iommu -netdev 
> > user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> > 
> > The image boots successfully...but withoyt any connection to the
> > internet.
> > 
> > How can I acchieve what I want?
> 
> 
> When you log into the guest OS and look at the network config it does
> have, what do you see?
> 
> What interfaces, routes, etc etc does it actually have once booted?
> 
> 
> -- 
> Alan McKinnon
> alan.mckin...@gmail.com
> 
> 

One step back, Alan...

I am booting an install-disk.iso, which needs a network to access the
packages from a server, which I want to be part of my usbstick.

The install-disk.iso should be prepared/configured to access the 
internet (everything else would be at least an error/bug...)...

So I assume, that qemu is not providing that...

Cheers
Meino





Re: [gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Alan McKinnon
On 15/01/2017 13:49, meino.cra...@gmx.de wrote:
> Hi,
> 
> for the purpose of online banking I want to install Linux on an USB-stick.
> 
> All attempts currently fail because the guest OS does not see
> any internet connection / eth0
> 
> I tried this without success:
> sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
> -usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm 
> -device intel-iommu -netdev 
> user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9
> 
> The image boots successfully...but withoyt any connection to the
> internet.
> 
> How can I acchieve what I want?


When you log into the guest OS and look at the network config it does
have, what do you see?

What interfaces, routes, etc etc does it actually have once booted?


-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Online Banking: How can I add an eth0-interface for a guest (linux) in qemu via commandline

2017-01-15 Thread Meino . Cramer
Hi,

for the purpose of online banking I want to install Linux on an USB-stick.

All attempts currently fail because the guest OS does not see
any internet connection / eth0

I tried this without success:
sudo qemu-system-x86_64 -cpu core2duo -cdrom  -boot order=d 
-usbdevice host: -m 1G --enable-kvm -machine q35,accel=kvm -device 
intel-iommu -netdev user,id=mynet0,net=192.168.178.0/24,dhcpstart=192.168.178.9

The image boots successfully...but withoyt any connection to the
internet.

How can I acchieve what I want?

Cheers
Meino