ssh from host to guest using qemu to boot VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey!

How do I setup ssh from the host to the guest using qemu?

1) I am able to use port redirection when I boot the VM without any
special parameter(explained in point 2) as follows:

/usr/bin/qemu-system-x86_64 -hda ubuntu1204 -m 512 -redir tcp:7777::8001

2) But when I try to boot using the following

/usr/bin/qemu-system-x86_64 \
-m 1024 \
-name vserialtest \
-cdrom ubuntu-12.04-desktop-amd64.iso \
-hda ubuntu1204-virtio-serial \
-chardev socket,host=localhost,port=7777,server,nowait,id=port1-char \
-device virtio-serial \
-device virtserialport,id=port1,chardev=port1-char,name=org.fedoraproject.port.0
\
-net user,hostfwd=tcp:7777::8001

I get the following error and the VM does not boot:

qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: invalid host
forwarding rule 'tcp:7777::8001'
qemu-system-x86_64: -net user,hostfwd=tcp:7777::8001: Device 'user'
could not be initialized

Please note that I am able to boot the VM without the -net parameter
without any issues, however, I want to setup ssh from the host to the
guest. ssh from guest to host works fine as expected.

-- 

Thanks and regards,
Jobin Raju George
Final Year, Information Technology
College of Engineering Pune
Alternate e-mail: georgejr10.it@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux