D
D
duoman2014-08-07 16:03:32
ubuntu
duoman, 2014-08-07 16:03:32

How to install ubuntu as a guest on a remote server?

Good afternoon. There is a server, ubuntu 12.04 server is installed on it, kvm, virt-viewer, etc. are installed
when executing the command:

sudo virt-install -n web_dev -r 256 --disk path=/var/lib/libvirt/images/web_dev.img,bus=virtio,size=4 -c ubuntu-12.04-server-amd64.iso --accelerate --network network=default,model=virtio --connect=qemu:///system --vnc -v

takes off:
Cannot open display: 
Run 'virt-viewer --help' to see a full list of available command line options
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.

I tried to connect via vnc open vnc://192.168.122.2, but nothing happens.
Hence the question: how to install ubuntu on a virtual machine through the console?
PS I just started doing virtualization. Much more is unknown...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor, 2014-08-07
@merryjane

Make a virtual machine configuration file in xml format. In it, you specify which disks you connect, cdrom, network, set the boot from cdrom and set the vnc settings (hypervisor ip and port). As a cdrom iso-image with the required installation disk.
More details in the documentation:
libvirt.org/formatdomain.html
Do You virsh define имя_конфиг_файлаwill create a virtual machine.
It remains to run it. virsh start имя_машины
Next, connect to the address and port you specified via vnc and install as usual. Don't forget to open the port for vnc in iptables on the hypervisor, if any.
Option two: connect to the hypervisor from a Linux PC via virt-manager and create the desired virtual machine through it.

D
duoman, 2014-08-07
@duoman

In xml I added the following lines

<graphics type='vnc' port='5910' autoport='no' listen='192.168.122.20'>
      <listen type='address' address='192.168.122.20'/>
    </graphics>

virbr0 = 192.168.122.1 I
reboot the virtual machine, but the address is not even pinged.

E
ERiC, 2014-08-08
@typ6o0jiehb

i use virt-manager on my ubuntu + hypervisor (virtual server on ubuntu in the server room)
do this:
to the machine where the hypervisor is running] copy your ssh-key [ssh-copy-id [email protected]]) - this is done only once with each hypervisor,
1.connect via ssh to the desired server
sudo virt-install --connect qemu:/ //system --name servername -r 1024 --vcpus=4 -v --disk pool=uh0,size=18,bus=virtio,cache=none --accelerate --os-type=linux --os-variant =ubuntutrusty --vnc -w bridge:br0,model=virtio --cdrom /opt/trusty-server-amd64.iso
in the console, he swears, it's nothing.
2. switch to the "Virtual Machine Manager" on the local system, and then the newly created machine appears in the list.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question