Make a KVM VM but skip Ubuntu installation process [closed]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I am currently able to make a Ubuntu 16.04 VM via KVM on my host Ubuntu.
What I'm trying is to install the Ubuntu image but then not have to go through the installation process of choosing a username, password, machine name, and time zone.
Is it possible to do this via KVM?
system-installation kvm
closed as too broad by user117103, waltinator, ravery, muru, Eric Carvalho Mar 1 at 23:28
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
0
down vote
favorite
I am currently able to make a Ubuntu 16.04 VM via KVM on my host Ubuntu.
What I'm trying is to install the Ubuntu image but then not have to go through the installation process of choosing a username, password, machine name, and time zone.
Is it possible to do this via KVM?
system-installation kvm
closed as too broad by user117103, waltinator, ravery, muru, Eric Carvalho Mar 1 at 23:28
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
the command is<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
1
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
1
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am currently able to make a Ubuntu 16.04 VM via KVM on my host Ubuntu.
What I'm trying is to install the Ubuntu image but then not have to go through the installation process of choosing a username, password, machine name, and time zone.
Is it possible to do this via KVM?
system-installation kvm
I am currently able to make a Ubuntu 16.04 VM via KVM on my host Ubuntu.
What I'm trying is to install the Ubuntu image but then not have to go through the installation process of choosing a username, password, machine name, and time zone.
Is it possible to do this via KVM?
system-installation kvm
system-installation kvm
edited Mar 1 at 14:42
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
48.2k13120228
48.2k13120228
asked Feb 27 at 14:49
nadermx
1256
1256
closed as too broad by user117103, waltinator, ravery, muru, Eric Carvalho Mar 1 at 23:28
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by user117103, waltinator, ravery, muru, Eric Carvalho Mar 1 at 23:28
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
the command is<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
1
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
1
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29
add a comment |Â
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
the command is<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
1
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
1
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
the command is
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
the command is
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
1
1
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
1
1
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:virsh snapshot-current --name $dom
and on the destination:virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
add a comment |Â
up vote
0
down vote
You can use virt-builder
to create virtual machine images of a wide variety of Linux distributions.
Virt-builder is included in the libguestfs-tools
package. Install it with:
sudo apt-get install libguestfs-tools
You run virt-builder by telling it what Linux distribution you want to build an image for. To learn what virtual machines it can build, run:
virt-builder --list
....
ubuntu-10.04 x86_64 Ubuntu 10.04 (Lucid)
ubuntu-12.04 x86_64 Ubuntu 12.04 (Precise)
ubuntu-14.04 x86_64 Ubuntu 14.04 (Trusty)
ubuntu-16.04 x86_64 Ubuntu 16.04 (Xenial)
To build a virtual machine, specify whether you want a raw or QCOW2 image, the disk size you want, and a filename, and go:
virt-builder ubuntu-16.04 --format qcow2 --size 10G --output my-ubuntu-vm.qcow2
By default, virt-builder will enable the root account and set a random password for it. If you don't want this, you can set your own root password. You can also add user accounts, install or remove packages, set the VM hostname, and even run arbitrary commands. The virt-builder
man page has all the details on these, if you need them.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:virsh snapshot-current --name $dom
and on the destination:virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
add a comment |Â
up vote
1
down vote
If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:virsh snapshot-current --name $dom
and on the destination:virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
add a comment |Â
up vote
1
down vote
up vote
1
down vote
If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:virsh snapshot-current --name $dom
and on the destination:virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...
First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.
Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host
Then, on the destination host run virsh define domxml.xml
and start the VM.
Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml
for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom
.
Then on the destination use virsh snapshot-create --redefine $dom file.xml
to finish migrating the snapshots.
If you also care about which snapshot is the current one, then additionally do on the source:virsh snapshot-current --name $dom
and on the destination:virsh snapshot-current $dom $name
Note:
If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)
Sources:
This answer shamelessly modeled on answers found on
https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
answered Mar 1 at 16:27
![](https://i.stack.imgur.com/Cfz2Q.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Cfz2Q.jpg?s=32&g=1)
Elder Geek
25.4k949120
25.4k949120
add a comment |Â
add a comment |Â
up vote
0
down vote
You can use virt-builder
to create virtual machine images of a wide variety of Linux distributions.
Virt-builder is included in the libguestfs-tools
package. Install it with:
sudo apt-get install libguestfs-tools
You run virt-builder by telling it what Linux distribution you want to build an image for. To learn what virtual machines it can build, run:
virt-builder --list
....
ubuntu-10.04 x86_64 Ubuntu 10.04 (Lucid)
ubuntu-12.04 x86_64 Ubuntu 12.04 (Precise)
ubuntu-14.04 x86_64 Ubuntu 14.04 (Trusty)
ubuntu-16.04 x86_64 Ubuntu 16.04 (Xenial)
To build a virtual machine, specify whether you want a raw or QCOW2 image, the disk size you want, and a filename, and go:
virt-builder ubuntu-16.04 --format qcow2 --size 10G --output my-ubuntu-vm.qcow2
By default, virt-builder will enable the root account and set a random password for it. If you don't want this, you can set your own root password. You can also add user accounts, install or remove packages, set the VM hostname, and even run arbitrary commands. The virt-builder
man page has all the details on these, if you need them.
add a comment |Â
up vote
0
down vote
You can use virt-builder
to create virtual machine images of a wide variety of Linux distributions.
Virt-builder is included in the libguestfs-tools
package. Install it with:
sudo apt-get install libguestfs-tools
You run virt-builder by telling it what Linux distribution you want to build an image for. To learn what virtual machines it can build, run:
virt-builder --list
....
ubuntu-10.04 x86_64 Ubuntu 10.04 (Lucid)
ubuntu-12.04 x86_64 Ubuntu 12.04 (Precise)
ubuntu-14.04 x86_64 Ubuntu 14.04 (Trusty)
ubuntu-16.04 x86_64 Ubuntu 16.04 (Xenial)
To build a virtual machine, specify whether you want a raw or QCOW2 image, the disk size you want, and a filename, and go:
virt-builder ubuntu-16.04 --format qcow2 --size 10G --output my-ubuntu-vm.qcow2
By default, virt-builder will enable the root account and set a random password for it. If you don't want this, you can set your own root password. You can also add user accounts, install or remove packages, set the VM hostname, and even run arbitrary commands. The virt-builder
man page has all the details on these, if you need them.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You can use virt-builder
to create virtual machine images of a wide variety of Linux distributions.
Virt-builder is included in the libguestfs-tools
package. Install it with:
sudo apt-get install libguestfs-tools
You run virt-builder by telling it what Linux distribution you want to build an image for. To learn what virtual machines it can build, run:
virt-builder --list
....
ubuntu-10.04 x86_64 Ubuntu 10.04 (Lucid)
ubuntu-12.04 x86_64 Ubuntu 12.04 (Precise)
ubuntu-14.04 x86_64 Ubuntu 14.04 (Trusty)
ubuntu-16.04 x86_64 Ubuntu 16.04 (Xenial)
To build a virtual machine, specify whether you want a raw or QCOW2 image, the disk size you want, and a filename, and go:
virt-builder ubuntu-16.04 --format qcow2 --size 10G --output my-ubuntu-vm.qcow2
By default, virt-builder will enable the root account and set a random password for it. If you don't want this, you can set your own root password. You can also add user accounts, install or remove packages, set the VM hostname, and even run arbitrary commands. The virt-builder
man page has all the details on these, if you need them.
You can use virt-builder
to create virtual machine images of a wide variety of Linux distributions.
Virt-builder is included in the libguestfs-tools
package. Install it with:
sudo apt-get install libguestfs-tools
You run virt-builder by telling it what Linux distribution you want to build an image for. To learn what virtual machines it can build, run:
virt-builder --list
....
ubuntu-10.04 x86_64 Ubuntu 10.04 (Lucid)
ubuntu-12.04 x86_64 Ubuntu 12.04 (Precise)
ubuntu-14.04 x86_64 Ubuntu 14.04 (Trusty)
ubuntu-16.04 x86_64 Ubuntu 16.04 (Xenial)
To build a virtual machine, specify whether you want a raw or QCOW2 image, the disk size you want, and a filename, and go:
virt-builder ubuntu-16.04 --format qcow2 --size 10G --output my-ubuntu-vm.qcow2
By default, virt-builder will enable the root account and set a random password for it. If you don't want this, you can set your own root password. You can also add user accounts, install or remove packages, set the VM hostname, and even run arbitrary commands. The virt-builder
man page has all the details on these, if you need them.
answered Mar 1 at 18:07
![](https://i.stack.imgur.com/Ic2rZ.png?s=32&g=1)
![](https://i.stack.imgur.com/Ic2rZ.png?s=32&g=1)
Michael Hampton
957719
957719
add a comment |Â
add a comment |Â
Have you considered using Kickstart to automate the installation?
â dsstorefile1
Feb 27 at 14:57
That seems like the perfect solution! But I can't seem to find the libvirt xml command for extra arguments
â nadermx
Feb 27 at 15:14
the command is
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
â nadermx
Feb 27 at 15:22
1
Have you solved your own problem? If so, please consider posting an answer in the answer box down below
â Zanna
Mar 1 at 14:43
1
@Zanna Answered...
â Elder Geek
Mar 1 at 16:29